mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-20 17:38:28 +00:00
fix(cockpit): fix aside not opening correctly and typos
This commit is contained in:
parent
8a4b5d3d5d
commit
a714e078c4
@ -6,7 +6,7 @@ import FontAwesomeIcon from 'react-fontawesome';
|
|||||||
|
|
||||||
export const TextEditorToolbarTabs = {
|
export const TextEditorToolbarTabs = {
|
||||||
Interact: { label: 'Interact', icon: 'bolt' },
|
Interact: { label: 'Interact', icon: 'bolt' },
|
||||||
Ietails: { label: 'Details', icon: 'info-cicle' },
|
Details: { label: 'Details', icon: 'info-circle' },
|
||||||
Debugger: { label: 'Debugger', icon: 'bug' },
|
Debugger: { label: 'Debugger', icon: 'bug' },
|
||||||
Transactions: { label: 'Transactions', icon: 'list-alt' },
|
Transactions: { label: 'Transactions', icon: 'list-alt' },
|
||||||
Browser: { label: 'Browser', icon: 'eye' }
|
Browser: { label: 'Browser', icon: 'eye' }
|
||||||
|
@ -68,7 +68,7 @@ class EditorContainer extends React.Component {
|
|||||||
<Col sm={8} md={this.textEditorMdSize()} className="text-editor-container">
|
<Col sm={8} md={this.textEditorMdSize()} className="text-editor-container">
|
||||||
<TextEditorContainer currentFile={this.props.currentFile} onFileContentChange={(newContent) => this.onFileContentChange(newContent)} />
|
<TextEditorContainer currentFile={this.props.currentFile} onFileContentChange={(newContent) => this.onFileContentChange(newContent)} />
|
||||||
</Col>
|
</Col>
|
||||||
{this.state.currentAsideTab &&
|
{this.state.currentAsideTab.label &&
|
||||||
<Col sm={12} md={3} className="border-left-0 relative">
|
<Col sm={12} md={3} className="border-left-0 relative">
|
||||||
<div className="editor-aside">
|
<div className="editor-aside">
|
||||||
<TextEditorAsideContainer currentAsideTab={this.state.currentAsideTab}
|
<TextEditorAsideContainer currentAsideTab={this.state.currentAsideTab}
|
||||||
|
@ -18,29 +18,29 @@ class TextEditorAsideContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderContent(contract, index) {
|
renderContent(contract, index) {
|
||||||
switch (this.props.currentAsideTab) {
|
switch (this.props.currentAsideTab.label) {
|
||||||
case TextEditorToolbarTabs.Debugger:
|
case TextEditorToolbarTabs.Debugger.label:
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<h2>{contract.className} - Debugger</h2>
|
<h2>{contract.className} - Debugger</h2>
|
||||||
<ContractDebuggerContainer key={index} contract={contract}/>
|
<ContractDebuggerContainer key={index} contract={contract}/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
case TextEditorToolbarTabs.Details:
|
case TextEditorToolbarTabs.Details.label:
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<h2>{contract.className} - Details</h2>
|
<h2>{contract.className} - Details</h2>
|
||||||
<ContractDetail key={index} contract={contract}/>
|
<ContractDetail key={index} contract={contract}/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
case TextEditorToolbarTabs.Transactions:
|
case TextEditorToolbarTabs.Transactions.label:
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<h2>{contract.className} - Transactions</h2>
|
<h2>{contract.className} - Transactions</h2>
|
||||||
<ContractTransactionsContainer key={index} contract={contract}/>
|
<ContractTransactionsContainer key={index} contract={contract}/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
case TextEditorToolbarTabs.Interact:
|
case TextEditorToolbarTabs.Interact.label:
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<h2>{contract.className} - Interact</h2>
|
<h2>{contract.className} - Interact</h2>
|
||||||
@ -53,7 +53,7 @@ class TextEditorAsideContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.props.currentAsideTab === TextEditorToolbarTabs.Browser) {
|
if (this.props.currentAsideTab.label === TextEditorToolbarTabs.Browser.label) {
|
||||||
return <Preview/>;
|
return <Preview/>;
|
||||||
}
|
}
|
||||||
return this.props.contracts.map((contract, index) => {
|
return this.props.contracts.map((contract, index) => {
|
||||||
|
@ -271,7 +271,7 @@ class ContractsManager {
|
|||||||
function getGasPriceForNetwork(callback) {
|
function getGasPriceForNetwork(callback) {
|
||||||
return callback(null, self.contractsConfig.gasPrice);
|
return callback(null, self.contractsConfig.gasPrice);
|
||||||
},
|
},
|
||||||
function prepareContractsFromCompilation(gasPrice, callback) {
|
function prepareContractsForCompilation(gasPrice, callback) {
|
||||||
let className, compiledContract, contractConfig, contract;
|
let className, compiledContract, contractConfig, contract;
|
||||||
for (className in self.compiledContracts) {
|
for (className in self.compiledContracts) {
|
||||||
compiledContract = self.compiledContracts[className];
|
compiledContract = self.compiledContracts[className];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user