diff --git a/src/assets/App.css b/src/assets/App.css index c0bfd1a..cb1cbd1 100644 --- a/src/assets/App.css +++ b/src/assets/App.css @@ -637,11 +637,24 @@ button { width: 100% !important; } } .ballots-about-i_name { width: 25%; } + .ballots-about-i_action { + width: 15%; } + .ballots-about-i_type { + width: 15%; } .ballots-about-i_proposal { width: 30%; } .ballots-about-i_mining-key { width: 30%; word-break: break-all; } + .ballots-about-i_proposed-min-threshold { + width: 60%; + word-break: break-all; } + .ballots-about-i_contract-type { + width: 30%; + word-break: break-all; } + .ballots-about-i_proposed-address { + width: 30%; + word-break: break-all; } .ballots-about-i_time { width: 15%; text-align: right; } diff --git a/src/assets/src/assets/App.css b/src/assets/src/assets/App.css index c0bfd1a..cb1cbd1 100644 --- a/src/assets/src/assets/App.css +++ b/src/assets/src/assets/App.css @@ -637,11 +637,24 @@ button { width: 100% !important; } } .ballots-about-i_name { width: 25%; } + .ballots-about-i_action { + width: 15%; } + .ballots-about-i_type { + width: 15%; } .ballots-about-i_proposal { width: 30%; } .ballots-about-i_mining-key { width: 30%; word-break: break-all; } + .ballots-about-i_proposed-min-threshold { + width: 60%; + word-break: break-all; } + .ballots-about-i_contract-type { + width: 30%; + word-break: break-all; } + .ballots-about-i_proposed-address { + width: 30%; + word-break: break-all; } .ballots-about-i_time { width: 15%; text-align: right; } diff --git a/src/assets/stylesheets/ballots/about.scss b/src/assets/stylesheets/ballots/about.scss index 23771ac..9c70b90 100644 --- a/src/assets/stylesheets/ballots/about.scss +++ b/src/assets/stylesheets/ballots/about.scss @@ -35,6 +35,14 @@ width: 25%; } + &_action { + width: 15%; + } + + &_type { + width: 15%; + } + &_proposal { width: 30%; } @@ -44,6 +52,21 @@ word-break: break-all; } + &_proposed-min-threshold { + width: 60%; + word-break: break-all; + } + + &_contract-type { + width: 30%; + word-break: break-all; + } + + &_proposed-address { + width: 30%; + word-break: break-all; + } + &_time { width: 15%; text-align: right; diff --git a/src/components/BallotKeysCard.jsx b/src/components/BallotKeysCard.jsx new file mode 100644 index 0000000..89f19f2 --- /dev/null +++ b/src/components/BallotKeysCard.jsx @@ -0,0 +1,93 @@ +import React from 'react'; +import { inject, observer } from "mobx-react"; + +@inject("commonStore", "contractsStore", "ballotsStore") +@observer +export class BallotKeysCard extends React.Component { + constructor(props) { + super(props); + } + + render () { + return ( +
+
+
+
+

Name

+
+
+

Suleyman Duyar

+

31/10/2017 7:22 AM

+
+
+
+
+

Action

+
+
+

Remove

+
+
+
+
+

Key type

+
+
+

Mining

+
+
+
+
+

Affected key

+
+
+

0xA1Cf735Ab55e9840Be820261D9b404959fcB5e41

+
+
+
+
+

Time

+
+
+

17:49

+

To close

+
+
+
+
+
+ Vote +
+

Yes

+

Votes: 40

+

40%

+
+
+
+
+
+
+
+

No

+

Votes: 10

+

20%

+
+
+
+
+ Vote +
+
+
+ Minimum 3 from 12 validators required to pass the proposal +
+
+
+ Finalize ballot +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore

+
+
+ ); + } +} diff --git a/src/components/BallotMinThresholdCard.jsx b/src/components/BallotMinThresholdCard.jsx new file mode 100644 index 0000000..faa2aef --- /dev/null +++ b/src/components/BallotMinThresholdCard.jsx @@ -0,0 +1,77 @@ +import React from 'react'; +import { inject, observer } from "mobx-react"; + +@inject("commonStore", "contractsStore", "ballotsStore") +@observer +export class BallotMinThresholdCard extends React.Component { + constructor(props) { + super(props); + } + + render () { + return ( +
+
+
+
+

Name

+
+
+

Suleyman Duyar

+

31/10/2017 7:22 AM

+
+
+
+
+

Proposed min gthreshold

+
+
+

0xA1Cf735Ab55e9840Be820261D9b404959fcB5e41

+
+
+
+
+

Time

+
+
+

17:49

+

To close

+
+
+
+
+
+ Vote +
+

Yes

+

Votes: 40

+

40%

+
+
+
+
+
+
+
+

No

+

Votes: 10

+

20%

+
+
+
+
+ Vote +
+
+
+ Minimum 3 from 12 validators required to pass the proposal +
+
+
+ Finalize ballot +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore

+
+
+ ); + } +} diff --git a/src/components/BallotCard.jsx b/src/components/BallotProxyCard.jsx similarity index 88% rename from src/components/BallotCard.jsx rename to src/components/BallotProxyCard.jsx index 60a72bb..8b41fe1 100644 --- a/src/components/BallotCard.jsx +++ b/src/components/BallotProxyCard.jsx @@ -3,7 +3,7 @@ import { inject, observer } from "mobx-react"; @inject("commonStore", "contractsStore", "ballotsStore") @observer -export class BallotCard extends React.Component { +export class BallotProxyCard extends React.Component { constructor(props) { super(props); } @@ -21,18 +21,17 @@ export class BallotCard extends React.Component {

31/10/2017 7:22 AM

-
+
-

Proposal

+

Contract type

-

Remove notary Shawn Grey, Vermont ID: 55512345 ...

- See All +

VotingToChangeKeys

-
+
-

Mining key

+

Proposed contract address

0xA1Cf735Ab55e9840Be820261D9b404959fcB5e41

diff --git a/src/components/Ballots.jsx b/src/components/Ballots.jsx index 1533c6a..a48a8c3 100644 --- a/src/components/Ballots.jsx +++ b/src/components/Ballots.jsx @@ -1,6 +1,5 @@ import React from 'react'; import { inject, observer, observable } from "mobx-react"; -import { BallotCard } from "./BallotCard"; import "babel-polyfill"; @inject("commonStore", "contractsStore", "ballotStore", "ballotsStore") diff --git a/src/stores/ContractsStore.js b/src/stores/ContractsStore.js index e517bd4..a28755a 100644 --- a/src/stores/ContractsStore.js +++ b/src/stores/ContractsStore.js @@ -7,7 +7,9 @@ import VotingToChangeProxy from '../contracts/VotingToChangeProxy.contract' import ballotStore from './BallotStore' import ballotsStore from './BallotsStore' import getWeb3 from '../getWeb3'; -import { BallotCard } from "../components/BallotCard"; +import { BallotKeysCard } from "../components/BallotKeysCard"; +import { BallotMinThresholdCard } from "../components/BallotMinThresholdCard"; +import { BallotProxyCard } from "../components/BallotProxyCard"; import "babel-polyfill"; @@ -88,7 +90,7 @@ class ContractsStore { console.log("allKeysBallotsIDs:", allKeysBallotsIDs) this.activeKeysBallotsIDs = allKeysBallotsIDs; for (let i = 0; i < allKeysBallotsIDs.length; i++) { - ballotsStore.ballotCards.push(); + ballotsStore.ballotCards.push(); } } @@ -100,7 +102,7 @@ class ContractsStore { console.log("allMinThresholdBallotsIDs:", allMinThresholdBallotsIDs) this.activeMinThresholdBallotsIDs = allMinThresholdBallotsIDs; for (let i = 0; i < allMinThresholdBallotsIDs.length; i++) { - ballotsStore.ballotCards.push(); + ballotsStore.ballotCards.push(); } } @@ -112,7 +114,7 @@ class ContractsStore { console.log("allProxyBallotsIDs:", allProxyBallotsIDs) this.activeProxyBallotsIDs = allProxyBallotsIDs; for (let i = 0; i < allProxyBallotsIDs.length; i++) { - ballotsStore.ballotCards.push(); + ballotsStore.ballotCards.push(); } } }