Skip to content

Commit

Permalink
Add Proposal tab to table view, fix some style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Oct 5, 2017
1 parent 81300b3 commit c054979
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/assets/locales/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
},
"collaterals": "Margin Positions",
"eq_value": "Estimated",
"no_price": "Unknown value",
"no_price": "--",
"percent": "Percent of total supply",
"please_create_account": "Please create an account",
"create_account": "Create account",
Expand Down
20 changes: 9 additions & 11 deletions app/components/Account/AccountOverview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ class AccountOverview extends React.Component {
}
});

if (balances.length !== currentIndex) {
balances.splice(currentIndex + 1, 0, <tr style={{backgroundColor: "transparent"}} key={"hidden_" + currentIndex} ><td style={{height: 20}} colSpan="11"></td></tr>);
}
// if (balances.length !== currentIndex) {
// balances.splice(currentIndex + 1, 0, <tr style={{backgroundColor: "transparent"}} key={"hidden_" + currentIndex} ><td style={{height: 20}} colSpan="11"></td></tr>);
// }
}

function sortAlphabetic(a, b) {
Expand Down Expand Up @@ -607,6 +607,12 @@ class AccountOverview extends React.Component {
dashboard
/>
</Tab>

{account.get("proposals") && account.get("proposals").size ?
<Tab title="explorer.proposals.title" subText={account.get("proposals") ? account.get("proposals").size : 0}>

<Proposals className="dashboard-table" account={account.get("id")}/>
</Tab> : null}
</Tabs>


Expand All @@ -615,14 +621,6 @@ class AccountOverview extends React.Component {
</div>
</div>

{account.get("proposals") && account.get("proposals").size ?
<div className="content-block">
<div className="block-content-header">
<Translate content="explorer.proposals.title" account={account.get("id")} />
</div>
<Proposals account={account.get("id")}/>
</div> : null}

{/* Deposit Modal */}
<SimpleDepositWithdraw
ref="deposit_modal"
Expand Down
2 changes: 1 addition & 1 deletion app/components/Account/Proposals.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Proposals extends Component {
});

return (
<table className={"table compact"}>
<table className={"table compact " + this.props.className}>
<thead>
<tr>
<th><Translate content="account.votes.info" /></th>
Expand Down
11 changes: 6 additions & 5 deletions app/components/Account/RecentTransactions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ class RecentTransactions extends React.Component {
}) : [<tr key="no_recent"><td colSpan={compactView ? "2" : "3"}><Translate content="operation.no_recent" /></td></tr>];
display_history.push(
<tr className="total-value" key="total_value">
<td style={alignLeft}>
{this.props.showFilters ? (
<select data-place="left" data-tip={counterpart.translate("tooltip.filter_ops")} style={{paddingTop: 5}} className="bts-select no-margin" value={this.state.filter} onChange={this._onChangeFilter.bind(this)}>{options}</select>
) : null}
<td>
</td>
<td style={alignRight}>
{historyCount > 0 ?
Expand Down Expand Up @@ -261,7 +258,11 @@ class RecentTransactions extends React.Component {
<table className={"table" + (compactView ? " compact" : "") + (this.props.dashboard ? " dashboard-table" : "")}>
<thead>
<tr>
{compactView ? null : <th style={alignLeft} className="column-hide-tiny"><Translate content="explorer.block.op" /></th>}
{compactView ? null : <th style={alignLeft} className="column-hide-tiny">
{this.props.showFilters ? (
<select data-place="left" data-tip={counterpart.translate("tooltip.filter_ops")} style={{paddingTop: 5, width: "auto"}} className="bts-select no-margin" value={this.state.filter} onChange={this._onChangeFilter.bind(this)}>{options}</select>
) : null}
</th>}
<th style={alignLeft}><Translate content="account.votes.info" /></th>
<th></th>
</tr>
Expand Down

0 comments on commit c054979

Please sign in to comment.