Hide proposals from non-Ethereum visitors
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
{{#each proposals as |proposal|}}
|
{{#each proposals as |proposal|}}
|
||||||
<li>
|
<li>
|
||||||
|
<span class="id">#{{proposal.id}}</span>
|
||||||
Issue{{#if proposal.executed}}d{{/if}}
|
Issue{{#if proposal.executed}}d{{/if}}
|
||||||
<span class="amount">{{proposal.amount}}</span><span class="symbol">₭S</span>
|
<span class="amount">{{proposal.amount}}</span><span class="symbol">₭S</span>
|
||||||
to <span class="recipient" title="{{proposal.recipientAddress}}">{{proposal.recipientName}}</span>
|
to <span class="recipient" title="{{proposal.recipientAddress}}">{{proposal.recipientName}}</span>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import Ember from 'ember';
|
|||||||
|
|
||||||
export default Ember.Object.extend({
|
export default Ember.Object.extend({
|
||||||
|
|
||||||
|
id: null,
|
||||||
creator: null,
|
creator: null,
|
||||||
recipient: null,
|
recipient: null,
|
||||||
votesCount: null,
|
votesCount: null,
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ export default Ember.Service.extend({
|
|||||||
let promise = new Ember.RSVP.Promise((resolve, reject) => {
|
let promise = new Ember.RSVP.Promise((resolve, reject) => {
|
||||||
this.getValueFromContract('proposals', i).then(p => {
|
this.getValueFromContract('proposals', i).then(p => {
|
||||||
let proposal = Proposal.create({
|
let proposal = Proposal.create({
|
||||||
|
id : i,
|
||||||
creatorAddress : p[0],
|
creatorAddress : p[0],
|
||||||
recipientAddress : p[1],
|
recipientAddress : p[1],
|
||||||
votesCount : p[2].toNumber(),
|
votesCount : p[2].toNumber(),
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ ul.proposal-list {
|
|||||||
border-top: 1px solid rgba(255,255,255,0.2);
|
border-top: 1px solid rgba(255,255,255,0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.id {
|
||||||
|
color: lightblue;
|
||||||
|
padding-right: 0.2rem;
|
||||||
|
}
|
||||||
.amount {
|
.amount {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -13,27 +13,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{#if proposalsOpen}}
|
{{#if contractInteractionEnabled}}
|
||||||
<section id="proposals-open">
|
{{#if proposalsOpen}}
|
||||||
|
<section id="proposals-open">
|
||||||
|
<header>
|
||||||
|
<h2>Open Proposals</h2>
|
||||||
|
</header>
|
||||||
|
<div class="content">
|
||||||
|
{{proposal-list proposals=proposalsOpen}}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<section id="proposals-closed">
|
||||||
<header>
|
<header>
|
||||||
<h2>Open Proposals</h2>
|
<h2>Closed Proposals</h2>
|
||||||
</header>
|
</header>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{proposal-list proposals=proposalsOpen}}
|
{{proposal-list proposals=proposalsClosed}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<section id="proposals-closed">
|
|
||||||
<header>
|
|
||||||
<h2>Closed Proposals</h2>
|
|
||||||
</header>
|
|
||||||
<div class="content">
|
|
||||||
{{proposal-list proposals=proposalsClosed}}
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{{#if contractInteractionEnabled}}
|
|
||||||
<section id="add-contributor">
|
<section id="add-contributor">
|
||||||
<header>
|
<header>
|
||||||
<h2>Add Contributor</h2>
|
<h2>Add Contributor</h2>
|
||||||
|
|||||||
Reference in New Issue
Block a user