Remove tabler-react

This commit is contained in:
Anthony Laibe 2018-10-18 16:07:38 +01:00 committed by Pascal Precht
parent 627fec5b49
commit a1c33a23a2
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
13 changed files with 114 additions and 134 deletions

View File

@ -10383,14 +10383,6 @@
"scroll-to": "0.0.2"
}
},
"react-text-mask": {
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/react-text-mask/-/react-text-mask-5.4.3.tgz",
"integrity": "sha1-mR77QpnjDC5sLEbRP2FxaUY+DS0=",
"requires": {
"prop-types": "^15.5.6"
}
},
"react-textarea-autosize": {
"version": "6.1.0",
"resolved": "http://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-6.1.0.tgz",
@ -11908,16 +11900,6 @@
}
}
},
"tabler-react": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/tabler-react/-/tabler-react-1.18.0.tgz",
"integrity": "sha512-X806m4s0YiVd5BC4rORlVsvhuatkc3sFegW5Y/XU7m5tSSFl4fJ5E+9xw9tiujcxcoZO1p5f9KDn25d1kE+I8A==",
"requires": {
"classnames": "^2.2.5",
"react-popper": "^1.0.0-beta.6",
"react-text-mask": "^5.4.1"
}
},
"tapable": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz",

View File

@ -70,7 +70,6 @@
"simple-line-icons": "^2.4.1",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"tabler-react": "^1.18.0",
"url-loader": "0.6.2",
"web3": "^1.0.0-beta.36",
"webpack": "3.8.1",

View File

@ -1,5 +1,5 @@
import React from 'react';
import {Row, Col, Card, CardHeader, CardBody, CardTitle} from 'reactstrap';
import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap';
import PropTypes from 'prop-types';
import Description from './Description';

View File

@ -1,5 +1,5 @@
import React from 'react';
import {Row, Col, Card, CardHeader, CardTitle, CardBody} from 'reactstrap';
import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap';
import {Link} from 'react-router-dom';
import PropTypes from 'prop-types';

View File

@ -1,5 +1,5 @@
import React from 'react';
import {Row, Col, Card, CardHeader, CardBody, CardTitle} from 'reactstrap';
import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap';
import PropTypes from 'prop-types';
import Description from './Description';

View File

@ -1,6 +1,6 @@
import React from 'react';
import {Link} from "react-router-dom";
import {Row, Col, Card, CardHeader, CardTitle, CardBody} from 'reactstrap';
import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap';
import PropTypes from 'prop-types';
import CardTitleIdenticon from './CardTitleIdenticon';

View File

@ -1,11 +1,6 @@
import PropTypes from "prop-types";
import React from 'react';
import {
Page,
Grid,
Table,
Form
} from "tabler-react";
import {Row, Col, Table, FormGroup, Label, Input, Form} from 'reactstrap';
const TX_STATES = {Success: '0x1', Fail: '0x0', Any: ''};
const EVENT = 'event';
@ -63,78 +58,83 @@ class ContractLogger extends React.Component {
render() {
return (
<Page.Content title={this.props.contract.className + ' Logger'}>
<React.Fragment>
<Form>
<Grid.Row>
<Grid.Col md={6}>
<Form.Group label="Functions">
<Form.Select onChange={(event) => this.updateState('method', event.target.value)} value={this.state.method}>
<Row>
<Col md={6}>
<FormGroup>
<Label htmlFor="functions">Functions</Label>
<Input type="select" name="functions" id="functions" onChange={(event) => this.updateState('method', event.target.value)} value={this.state.method}>
<option value=""></option>
{this.getMethods().map((method, index) => <option value={method.name} key={index}>{method.name}</option>)}
</Form.Select>
</Form.Group>
</Grid.Col>
<Grid.Col md={6}>
<Form.Group label="Events">
<Form.Select onChange={(event) => this.updateState('event', event.target.value)} value={this.state.event}>
</Input>
</FormGroup>
</Col>
<Col md={6}>
<FormGroup>
<Label htmlFor="events">Events</Label>
<Input type="select" name="events" id="events" onChange={(event) => this.updateState('eveny', event.target.value)} value={this.state.event}>
<option value=""></option>
{this.getEvents().map((event, index) => <option value={event.name} key={index}>{event.name}</option>)}
</Form.Select>
</Form.Group>
</Grid.Col>
<Grid.Col>
<Form.Group label="Tx Status">
{Object.keys(TX_STATES).map(key => (
<Form.Radio
key={key}
isInline
label={key}
value={TX_STATES[key]}
onChange={(event) => this.updateState('status', event.target.value)}
checked={TX_STATES[key] === this.state.status}
/>
))}
</Form.Group>
</Grid.Col>
</Grid.Row>
</Input>
</FormGroup>
</Col>
<Col>
<FormGroup row>
<Col md="3">
<Label>Tx Status</Label>
</Col>
<Col md="9">
{Object.keys(TX_STATES).map(key => (
<FormGroup key={key} check inline>
<Input className="form-check-input"
type="radio"
id={key}
name={key}
value={TX_STATES[key]}
onChange={(event) => this.updateState('status', event.target.value)}
checked={TX_STATES[key] === this.state.status} />
<Label check className="form-check-label" htmlFor={key}>{key}</Label>
</FormGroup>
))}
</Col>
</FormGroup>
</Col>
</Row>
</Form>
<Grid.Row>
<Grid.Col>
<Table
responsive
cards
verticalAlign="center"
className="text-nowrap">
<Table.Header>
<Table.Row>
<Table.ColHeader>Call</Table.ColHeader>
<Table.ColHeader>Events</Table.ColHeader>
<Table.ColHeader>Gas Used</Table.ColHeader>
<Table.ColHeader>Block number</Table.ColHeader>
<Table.ColHeader>Status</Table.ColHeader>
<Table.ColHeader>Transaction hash</Table.ColHeader>
</Table.Row>
</Table.Header>
<Table.Body>
<Row>
<Col>
<Table>
<thead>
<tr>
<th>Call</th>
<th>Events</th>
<th>Gas Used</th>
<th>Block number</th>
<th>Status</th>
<th>Transaction hash</th>
</tr>
</thead>
<tbody>
{
this.dataToDisplay().map((log, index) => {
return (
<Table.Row key={'log-' + index}>
<Table.Col>{`${log.name}.${log.functionName}(${log.paramString})`}</Table.Col>
<Table.Col>{log.events.join(', ')}</Table.Col>
<Table.Col>{log.gasUsed}</Table.Col>
<Table.Col>{log.blockNumber}</Table.Col>
<Table.Col>{log.status}</Table.Col>
<Table.Col>{log.transactionHash}</Table.Col>
</Table.Row>
<tr key={'log-' + index}>
<td>{`${log.name}.${log.functionName}(${log.paramString})`}</td>
<td>{log.events.join(', ')}</td>
<td>{log.gasUsed}</td>
<td>{log.blockNumber}</td>
<td>{log.status}</td>
<td>{log.transactionHash}</td>
</tr>
);
})
}
</Table.Body>
</tbody>
</Table>
</Grid.Col>
</Grid.Row>
</Page.Content>
</Col>
</Row>
</React.Fragment>
);
}
}

View File

@ -1,6 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import {Card, Icon} from 'tabler-react';
import {Card, CardHeader, CardTitle, CardBody} from 'reactstrap';
import FontAwesomeIcon from 'react-fontawesome';
import ContractFunctions from '../components/ContractFunctions';
const TextEditorContractDeploy = (props) => {
@ -10,21 +12,19 @@ const TextEditorContractDeploy = (props) => {
methods: props.result[name].abiDefinition
};
return (
<Card statusColor="success"
statusSide
className="success-card">
<Card.Header>
<Card.Title color="success">
<Icon name="check" className="mr-1" />
<Card className="bg-success">
<CardHeader>
<CardTitle>
<FontAwesomeIcon className="mr-1" name="check"/>
Deploy Contract
</Card.Title>
</Card.Header>
<Card.Body>
</CardTitle>
</CardHeader>
<CardBody>
<ContractFunctions contractProfile={profile}
contractFunctions={props.contractDeploys}
onlyConstructor
postContractFunction={props.postContractDeploy}/>
</Card.Body>
</CardBody>
</Card>
);
};

View File

@ -1,22 +1,21 @@
import React from 'react';
import PropTypes from 'prop-types';
import {Card, Icon, List} from 'tabler-react';
import {Card, CardBody, CardHeader, CardTitle, ListGroup, ListGroupItem} from 'reactstrap';
import FontAwesomeIcon from 'react-fontawesome';
const TextEditorContractErrors = (props) => (
<Card statusColor="danger"
statusSide
className="errors-card">
<Card.Header>
<Card.Title color="danger">
<Icon name="alert-circle" className="mr-1" />
<Card className="bg-danger">
<CardHeader>
<CardTitle>
<FontAwesomeIcon className="mr-1" name="minus-circle"/>
Failed to compile
</Card.Title>
</Card.Header>
<Card.Body>
<List.Group>
{props.errors.map((error, index) => <List.GroupItem key={index}>{error.formattedMessage}</List.GroupItem>)}
</List.Group>
</Card.Body>
</CardTitle>
</CardHeader>
<CardBody>
<ListGroup>
{props.errors.map((error, index) => <ListGroupItem key={index}>{error.formattedMessage}</ListGroupItem>)}
</ListGroup>
</CardBody>
</Card>
);

View File

@ -1,6 +1,7 @@
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {Grid, Badge, Icon} from 'tabler-react';
import {Col, Badge, Icon} from 'reactstrap';
import FontAwesomeIcon from 'react-fontawesome';
import TextEditorToolbar from './TextEditorToolbar';
class TextEditorContractToolbar extends Component {
@ -8,12 +9,12 @@ class TextEditorContractToolbar extends Component {
return (
<React.Fragment>
<TextEditorToolbar {...this.props} />
<Grid.Col md={6} className="text-right">
<Col md={6} className="text-right">
{this.props.compilingContract &&
<Badge color="warning"><Icon name="slash" className="mr-1" />compiling</Badge>}
<Badge color="warning"><FontAwesomeIcon name="exclamation-triangle " className="mr-1" />compiling</Badge>}
{!this.props.compilingContract && this.props.contractCompile.result &&
<Badge color="success"><Icon name="check" className="mr-1" />compiled</Badge>}
</Grid.Col>
<Badge color="success"><FontAwesomeIcon name="check" className="mr-1" />compiled</Badge>}
</Col>
</React.Fragment>
);
}

View File

@ -1,22 +1,21 @@
import React from 'react';
import PropTypes from 'prop-types';
import {Card, Icon, List} from 'tabler-react';
import {Card, CardHeader, CardBody, CardTitle, ListGroup, ListGroupItem} from 'reactstrap';
import FontAwesomeIcon from 'react-fontawesome';
const TextEditorContractWarnings = (props) => (
<Card statusColor="warning"
statusSide
className="warnings-card">
<Card.Header>
<Card.Title color="warning">
<Icon name="alert-triangle" className="mr-1" />
<Card className="bg-warning">
<CardHeader>
<CardTitle color="warning">
<FontAwesomeIcon className="mr-1" name="exclamation-triangle"/>
Warning during compilation
</Card.Title>
</Card.Header>
<Card.Body>
<List.Group>
{props.warnings.map((warning, index) => <List.GroupItem key={index}>{warning.formattedMessage}</List.GroupItem>)}
</List.Group>
</Card.Body>
</CardTitle>
</CardHeader>
<CardBody>
<ListGroup>
{props.warnings.map((warning, index) => <ListGroupItem key={index}>{warning.formattedMessage}</ListGroupItem>)}
</ListGroup>
</CardBody>
</Card>
);

View File

@ -1,6 +1,6 @@
import React from 'react';
import {Link} from 'react-router-dom';
import {Row, Col, Card, CardHeader, CardBody, CardTitle} from 'reactstrap';
import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap';
import PropTypes from 'prop-types';
import Description from './Description';

View File

@ -1,6 +1,6 @@
import React from 'react';
import {Link} from "react-router-dom";
import {Row, Col, Card, CardHeader, CardTitle, CardBody} from 'reactstrap';
import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap';
import PropTypes from 'prop-types';
import CardTitleIdenticon from './CardTitleIdenticon';