1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

finalize contract settings layout

This commit is contained in:
Tim Daubenschütz 2015-09-14 17:38:26 +02:00
parent 209d141939
commit 24f0d84fbc
4 changed files with 79 additions and 87 deletions

View File

@ -95,91 +95,86 @@ let ContractSettings = React.createClass({
return ( return (
<CollapsibleParagraph <CollapsibleParagraph
title={getLangText('Contract Settings')} title={getLangText('Contracts')}
show={true} show={true}
defaultExpanded={true}> defaultExpanded={false}>
<CollapsibleParagraph <CollapsibleParagraph
title={getLangText('List Contracts')} title={getLangText('Public Contracts')}
show={true} show={true}
defaultExpanded={true}> defaultExpanded={true}>
<CollapsibleParagraph {createPublicContractForm}
title={getLangText('Public Contracts')} {publicContracts.map((contract, i) => {
show={true} return (
defaultExpanded={true}> <ActionPanel
{createPublicContractForm} key={i}
{publicContracts.map((contract, i) => { title={contract.name}
return ( content={contract.name}
<ActionPanel buttons={
key={i} <div className="pull-right">
title={contract.name} <button className="btn btn-default btn-sm margin-left-2px">
content={contract.name} UPDATE
buttons={ </button>
<div className="pull-right"> <a
<button className="btn btn-default btn-sm margin-left-2px"> className="btn btn-default btn-sm margin-left-2px"
UPDATE href={contract.blob.url_safe}
</button> target="_blank">
<a PREVIEW
className="btn btn-default btn-sm margin-left-2px" </a>
href={contract.blob.url_safe} <button
target="_blank"> className="btn btn-default btn-sm margin-left-2px"
PREVIEW onClick={this.removeContract(contract)}>
</a> REMOVE
<button </button>
className="btn btn-default btn-sm margin-left-2px" </div>
onClick={this.removeContract(contract)}> }
REMOVE leftColumnWidth="40%"
</button> rightColumnWidth="60%"/>
</div> );
} })}
leftColumnWidth="40%" </CollapsibleParagraph>
rightColumnWidth="60%"/> <CollapsibleParagraph
); title={getLangText('Private Contracts')}
})} show={true}
</CollapsibleParagraph> defaultExpanded={true}>
<CollapsibleParagraph <CreateContractForm
title={getLangText('Private Contracts')} isPublic={false}
show={true} fileClassToUpload={{
defaultExpanded={true}> singular: 'new private contract',
<CreateContractForm plural: 'new private contracts'
isPublic={false} }}/>
fileClassToUpload={{ {privateContracts.map((contract, i) => {
singular: 'new private contract', return (
plural: 'new private contracts' <ActionPanel
}}/> key={i}
{privateContracts.map((contract, i) => { title={contract.name}
return ( content={contract.name}
<ActionPanel buttons={
key={i} <div className="pull-right">
title={contract.name} <button
content={contract.name} className="btn btn-default btn-sm margin-left-2px"
buttons={ onClick={this.makeContractPublic(contract)}>
<div className="pull-right"> MAKE PUBLIC
<button </button>
className="btn btn-default btn-sm margin-left-2px" <button className="btn btn-default btn-sm margin-left-2px">
onClick={this.makeContractPublic(contract)}> UPDATE
MAKE PUBLIC </button>
</button> <a
<button className="btn btn-default btn-sm margin-left-2px"> className="btn btn-default btn-sm margin-left-2px"
UPDATE href={contract.blob.url_safe}
</button> target="_blank">
<a PREVIEW
className="btn btn-default btn-sm margin-left-2px" </a>
href={contract.blob.url_safe} <button
target="_blank"> className="btn btn-default btn-sm margin-left-2px"
PREVIEW onClick={this.removeContract(contract)}>
</a> REMOVE
<button </button>
className="btn btn-default btn-sm margin-left-2px" </div>
onClick={this.removeContract(contract)}> }
REMOVE leftColumnWidth="40%"
</button> rightColumnWidth="60%"/>
</div> );
} })}
leftColumnWidth="40%"
rightColumnWidth="60%"/>
);
})}
</CollapsibleParagraph>
</CollapsibleParagraph> </CollapsibleParagraph>
</CollapsibleParagraph> </CollapsibleParagraph>
); );

View File

@ -26,8 +26,6 @@ let SettingsContainer = React.createClass({
<APISettings /> <APISettings />
<BitcoinWalletSettings /> <BitcoinWalletSettings />
<ContractSettings /> <ContractSettings />
<br />
<br />
</div> </div>
); );
} }

View File

@ -59,7 +59,7 @@ let FileDragAndDropPreviewOther = React.createClass({
<div className="file-drag-and-drop-preview-table-wrapper"> <div className="file-drag-and-drop-preview-table-wrapper">
<div className="file-drag-and-drop-preview-other"> <div className="file-drag-and-drop-preview-other">
{actionSymbol} {actionSymbol}
<span>{'.' + this.props.type}</span> <p>{'.' + this.props.type}</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -25,8 +25,7 @@
border: 0; border: 0;
width: 100%; width: 100%;
/* Shrink the size of the headline for a nested element */ .ascribe-collapsible-wrapper {
.ascribe-collapsible-wrapper > .ascribe-collapsible-content {
padding-left: 1em; padding-left: 1em;
font-size: 95%; font-size: 95%;
} }