Add informational popup when voting for the first time

This commit is contained in:
Christoph Atteneder 2019-03-25 09:51:13 +01:00
parent e4ecb869ad
commit 942d8366b2
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
2 changed files with 14 additions and 0 deletions

View file

@ -1691,6 +1691,9 @@ dao.proposal.myVote.revealTxId=Vote reveal transaction ID
dao.proposal.myVote.stake.prompt=Max. available stake for voting: {0}
dao.proposal.votes.header=Set stake for voting and publish your votes
dao.proposal.myVote.button=Publish votes
dao.proposal.myVote.setStake.description=After voting on all proposals you have to set your stake for voting by locking up \
BSQ. The more BSQ you lock up, the more weight your vote will have. \n\n\
BSQ locked up for voting will be unlocked again during the vote reveal phase.
dao.proposal.create.selectProposalType=Select proposal type
dao.proposal.create.phase.inactive=Please wait until the next proposal phase
dao.proposal.create.proposalType=Proposal type

View file

@ -424,18 +424,29 @@ public class ProposalsView extends ActivatableView<GridPane, Void> implements Bs
daoFacade.setVote(getBallotListItem().getBallot(), new Vote(true));
updateStateAfterVote();
tableView.getSelectionModel().clearSelection();
showHowToSetStakeForVotingPopup();
}
private void showHowToSetStakeForVotingPopup() {
String id = "explainHowToSetStakeForVoting";
if (preferences.showAgain(id))
new Popup<>().information(Res.get("dao.proposal.myVote.setStake.description"))
.dontShowAgainId(id).show();
}
private void onReject() {
daoFacade.setVote(getBallotListItem().getBallot(), new Vote(false));
updateStateAfterVote();
tableView.getSelectionModel().clearSelection();
showHowToSetStakeForVotingPopup();
}
private void onIgnore() {
daoFacade.setVote(getBallotListItem().getBallot(), null);
updateStateAfterVote();
tableView.getSelectionModel().clearSelection();
showHowToSetStakeForVotingPopup();
}
private void onVote() {