diff --git a/embark-ui/src/components/ContractOverview.css b/embark-ui/src/components/ContractOverview.css
index 5f34a49d..d5645d35 100644
--- a/embark-ui/src/components/ContractOverview.css
+++ b/embark-ui/src/components/ContractOverview.css
@@ -1,13 +1,3 @@
-.contract-function-container .collapse.show .card-body {
- min-height: 65px;
-}
-
-.contract-function-container .contract-function-button {
- position: absolute;
- bottom: 15px;
- right: 15px;
-}
-
.contract-function-container .gas-price-form #gasPrice {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
diff --git a/embark-ui/src/components/ContractOverview.js b/embark-ui/src/components/ContractOverview.js
index f02b27fb..1c0ed194 100644
--- a/embark-ui/src/components/ContractOverview.js
+++ b/embark-ui/src/components/ContractOverview.js
@@ -8,6 +8,7 @@ import {
Label,
Input,
Button,
+ Badge,
Card,
CardBody,
CardHeader,
@@ -20,6 +21,7 @@ import {
import GasStationContainer from "../containers/GasStationContainer";
import {formatContractForDisplay} from '../utils/presentation';
import FontAwesome from 'react-fontawesome';
+import classnames from 'classnames';
import "./ContractOverview.css";
@@ -94,69 +96,75 @@ class ContractFunction extends Component {
render() {
return (
-
- this.toggleFunction()}>
-
- {ContractFunction.isPureCall(this.props.method) &&
-
- }
- {ContractFunction.isEvent(this.props.method) &&
-
- }
- {this.props.method.name}({this.props.method.inputs.map(input => input.name).join(', ')})
-
-
-
-
-
- {!ContractFunction.isPureCall(this.props.method) &&
-
-
- this.toggleOptions()}>
-
- Advanced Options
-
-
-
-
-
- this.toggleGasPrice()}>
-
- Gas price estimator
-
-
- {
- if (instance) this.gasStation = instance.getWrappedInstance();
- }}/>
-
+
+ this.toggleFunction()}>
+
+ {ContractFunction.isPureCall(this.props.method) && Boolean(this.props.method.inputs.length) &&
+ call
+ }
+ {ContractFunction.isPureCall(this.props.method) && !this.props.method.inputs.length &&
+
+ }
+ {ContractFunction.isEvent(this.props.method) &&
+ event
+ }
+ {this.props.method.name}({this.props.method.inputs.map(input => input.name).join(', ')})
+
+
+ {!ContractFunction.isEvent(this.props.method) &&
+
+
+
+ {!ContractFunction.isPureCall(this.props.method) &&
+
+
+ this.toggleOptions()}>
+
+ Advanced Options
+
+
+
+
+
+ this.toggleGasPrice()}>
+
+ Gas price estimator
+
+
+ {
+ if (instance) this.gasStation = instance.getWrappedInstance();
+ }}/>
-
-
- }
-
-
-
+
+
+
+ }
+
+
+
{this.props.contractFunctions && this.props.contractFunctions.length > 0 &&
{this.props.contractFunctions.map(contractFunction => (
@@ -167,7 +175,9 @@ class ContractFunction extends Component {
))}
}
-
+ }
+
+
);
}
}
@@ -193,7 +203,7 @@ const ContractOverview = (props) => {
{(contractDisplay.state === 'Deployed') &&
Deployed at {contractDisplay.address}
}
{(contractDisplay.state !== 'Deployed') &&
{contractDisplay.address}
}
-
+
{contractProfile.methods
.filter((method) => {
return props.onlyConstructor ? method.type === 'constructor' : method.type !== 'constructor';
@@ -202,7 +212,7 @@ const ContractOverview = (props) => {
method={method}
contractFunctions={filterContractFunctions(props.contractFunctions, contractProfile.name, method.name)}
contractProfile={contractProfile}
- postContractFunction={props.postContractFunction} />)}
+ postContractFunction={props.postContractFunction}/>)}
);
};
diff --git a/embark-ui/src/components/SearchBar.js b/embark-ui/src/components/SearchBar.js
index 9167ef2a..bd6a1466 100644
--- a/embark-ui/src/components/SearchBar.js
+++ b/embark-ui/src/components/SearchBar.js
@@ -54,7 +54,7 @@ class SearchBar extends React.Component {
value={this.state.searchValue}
onBlur={() => this.hideForm()}
onKeyPress={e => this.onKeyPress(e)}/>
-