Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions src/components/governance/ProposalCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,30 +205,36 @@ function ProposalCard({ proposal, enabled, userInfo, onLoadProposals }) {
<div className="actions">
<button
style={{ border: "none", outline: "none" }}
className="vote"
title="Vote yes"
className="vote vote--yes"
title={t("govlist.vote.yes_tooltip", "Vote YES - Support this proposal")}
aria-label={t("govlist.vote.yes_aria", "Vote yes for this proposal")}
disabled={userInfo ? false : true}
onClick={() => openMnVote(1)}
>
<i className="icon-up-open"></i>
<i className="icon-thumbs-up" aria-hidden="true"></i>
<span className="vote-label">{t("govlist.vote.yes", "YES")}</span>
</button>
<button
style={{ border: "none", outline: "none" }}
className="vote"
title="Abstain"
className="vote vote--abstain"
title={t("govlist.vote.abstain_tooltip", "ABSTAIN - Neutral vote")}
aria-label={t("govlist.vote.abstain_aria", "Abstain from voting on this proposal")}
disabled={userInfo ? false : true}
onClick={() => openMnVote(3)}
>
<i className="icon-minus-outline"></i>
<i className="icon-pause" aria-hidden="true"></i>
<span className="vote-label">{t("govlist.vote.abstain", "ABSTAIN")}</span>
</button>
<button
style={{ border: "none", outline: "none" }}
className="vote"
title="Vote no"
className="vote vote--no"
title={t("govlist.vote.no_tooltip", "Vote NO - Reject this proposal")}
aria-label={t("govlist.vote.no_aria", "Vote no for this proposal")}
disabled={userInfo ? false : true}
onClick={() => openMnVote(2)}
>
<i className="icon-down-open"></i>
<i className="icon-thumbs-down" aria-hidden="true"></i>
<span className="vote-label">{t("govlist.vote.no", "NO")}</span>
</button>
</div>
)}
Expand Down
67 changes: 61 additions & 6 deletions src/scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -252,40 +252,95 @@ ul.pagination
background:#1e255f29;
line-height: 40px;
text-align: center;
width:70px;
height:40px;
width:90px;
height:50px;
float:right;
clear:right;
@include transition(all, .3s);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
border: 2px solid transparent;
cursor: pointer;

&:hover
{
color:$color-blue-main;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

&:nth-child(1)
&:focus
{
outline: 2px solid $color-blue-main;
outline-offset: 2px;
}

&:disabled
{
opacity: 0.5;
cursor: not-allowed;
transform: none;
box-shadow: none;
}

i
{
font-size: 16px;
margin-bottom: 2px;
}

.vote-label
{
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}

&.vote--yes
{
@include border-radii(35px,35px,0,0);
&:hover
{
background:$vote-green;
border-color: darken($vote-green, 10%);
color: white;
}
&:focus
{
border-color: $vote-green;
}
}

&:nth-child(2)
&.vote--abstain
{
&:hover
{
background:$off-white;
}
border-color: darken($off-white, 20%);
color: $color-blue-main;
}
&:focus
{
border-color: $off-white;
}
}

&:nth-child(3)
&.vote--no
{
@include border-radii(0,0,35px,35px);
&:hover
{
background:$vote-red;
border-color: darken($vote-red, 10%);
color: white;
}
&:focus
{
border-color: $vote-red;
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions src/shared/locales/en/partials/govlist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ const govList = {
red_text:'This Proposal needs [API] more YES Votes',
view_proposal_txt:'VIew Proposal'
},
vote: {
yes: 'YES',
no: 'NO',
abstain: 'ABSTAIN',
yes_tooltip: 'Vote YES - Support this proposal',
no_tooltip: 'Vote NO - Reject this proposal',
abstain_tooltip: 'ABSTAIN - Neutral vote',
yes_aria: 'Vote yes for this proposal',
no_aria: 'Vote no for this proposal',
abstain_aria: 'Abstain from voting on this proposal'
},
loading: 'Loading...'
},
}
Expand Down