Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New 'Governance' page #145

Merged
merged 26 commits into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9df7acc
[HTML+JS+CSS] New 'Governance' page
BreadJS Jun 8, 2023
cc338b3
[HTML+CSS] Add back 'Create Proposal' button
BreadJS Jun 8, 2023
e5f1416
Merge branch 'master' into master
JSKitty Jun 10, 2023
55ebf8a
Dynamically set Max Budget + Superblock Countdown
JSKitty Jun 10, 2023
6fdbb80
Implement basic Governance currency displays
JSKitty Jun 10, 2023
50329bc
Add status, net votes and refined currency display
JSKitty Jun 11, 2023
1b494e8
Add live funding status
JSKitty Jun 11, 2023
a9971aa
Prettier
JSKitty Jun 11, 2023
e75f47b
Add mobile display currency
JSKitty Jun 11, 2023
f5d5624
Just a clicky pointer
JSKitty Jun 11, 2023
f91f1ab
Fix Governance clock for non-wallet users
JSKitty Jun 11, 2023
3692113
Update scripts/global.js
BreadJS Jun 22, 2023
4c6e2ba
[JS] Add finalise button
BreadJS Jul 4, 2023
e3f2c5c
Merge branch 'master' into master
BreadJS Jul 4, 2023
024a2a7
[JS] Add JSDoc Typing to flipdown
BreadJS Jul 4, 2023
43525b7
[JS] Update flipdown when switch networks
BreadJS Jul 4, 2023
7c42ee5
Gracefully cancel proposal creation + Prettier
JSKitty Jul 5, 2023
020ba95
Prettier
JSKitty Jul 5, 2023
83692b2
[JS] Finalization under status with btn
BreadJS Jul 7, 2023
701faa2
[HTML] Remove old create proposal btn
BreadJS Jul 7, 2023
3e1bda1
[JS] updateGovernanceTab when switch networks
BreadJS Jul 7, 2023
fd2baa4
[JS] Remove `MPW.` and linting
BreadJS Jul 7, 2023
f8fb1cd
[JS] Fix linting issues
BreadJS Jul 7, 2023
7f45d07
Merge branch 'master' of https://github.com/BreadJS/MyPIVXWallet
BreadJS Jul 7, 2023
9e123ce
Remove unnecessary database instances
JSKitty Jul 7, 2023
bf8d44e
Add real-time Finalisation Status + Prettier
JSKitty Jul 7, 2023
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
417 changes: 417 additions & 0 deletions assets/style/style.css

Large diffs are not rendered by default.

63 changes: 50 additions & 13 deletions index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -939,15 +939,51 @@ <h3 class="noselect balance-title">
<h3 class="pivx-bold-title center-text">Governance</h3>
<p class="center-text">From this tab you can check the proposals and, if you have a masternode, be a part of the <b>DAO</b> and vote!</p>
</div>
<table id="proposalsTable" class="table table-hover table-dark bg-transparent" style="width: 100%;">


<div class="row mb-5">
<div class="col-6 col-lg-3 text-center governBudgetCard">
<span style="font-weight:800; color:#cac9d2;">Monthly Budget</span>

<div style="background-color:hsl(273 79% 27% / 1); margin-top:11px; border-radius: 9px; width: fit-content; padding-left: 13px; padding-right: 13px; padding-bottom: 10px; padding-top: 9px;">
<span style="font-size: 23px;"><span id="totalGovernanceBudget">-</span> <span style="color:#8b38ff;">PIV</span></span>
<hr style="background-color:#ffffff33; margin-top:2px; margin-bottom:2px;">
<span style="font-size: 16px;"><span id="totalGovernanceBudgetValue">-</span></span>
</div>
</div>
<div class="col-6 col-lg-3 text-center governBudgetCard for-mobile">
<span style="font-weight:800; color:#cac9d2;">Budget Allocated</span>

<div style="background-color:hsl(273 79% 23% / 1); margin-top:11px; border-radius: 9px; width: fit-content; padding-left: 13px; padding-right: 13px; padding-bottom: 10px; padding-top: 9px;">
<span style="font-size: 23px;"><span id="allocatedGovernanceBudget">-</span> <span style="color:#8b38ff;">PIV</span></span>
<hr style="background-color:#ffffff33; margin-top:2px; margin-bottom:2px;">
<span style="font-size: 16px;"><span id="allocatedGovernanceBudgetValue">-</span>
</div>
</div>
<div class="col-12 col-lg-6 text-center governPayoutTime">
<span style="font-weight:800; color:#cac9d2;">Next Treasury Payout</span>
<div id="flipdown" class="flipdown"></div>
</div>
<div class="col-12 col-lg-3 text-center governBudgetCard for-desktop">
<span style="font-weight:800; color:#cac9d2;">Budget Allocated</span>

<div style="background-color:hsl(273 79% 23% / 1); margin-top:11px; border-radius: 9px; width: fit-content; padding-left: 13px; padding-right: 13px; padding-bottom: 10px; padding-top: 9px;">
<span style="font-size: 23px;"><span id="allocatedGovernanceBudget2">-</span> <span style="color:#8b38ff;">PIV</span></span>
<hr style="background-color:#ffffff33; margin-top:2px; margin-bottom:2px;">
<span style="font-size: 16px;"><span id="allocatedGovernanceBudgetValue2">-</span>
</div>
</div>
</div>


<div class="pivx-button-small governAdd" onclick="MPW.createProposal()"><i class="fas fa-plus"></i></div>
<table id="proposalsTable" class="table table-hover table-dark bg-transparent governTable" style="width: 100%;">
<thead>
<td class="text-center"><b> Name </b></td>
<td class="text-center"><b> Payment </b></td>
<td class="text-center"><b> Votes </b></td>
<td class="text-center"><b> Vote </b></td>
<td class="text-center">
<div class="pivx-button-small" onclick="MPW.createProposal()"> <i class="fas fa-plus"></i> </div>
</td>
<td class="text-center btlr-7p"><b> STATUS </b></td>
<td class="text-center"><b> NAME </b></td>
<td class="text-center for-desktop"><b> PAYMENT </b></td>
<td class="text-center for-desktop"><b> VOTES </b></td>
<td class="text-center for-desktop btrr-7p"><b> VOTE </b></td>
</thead>
<tbody id="proposalsTableBody" style="text-align: center; vertical-align: middle;"></tbody>
</table>
Expand All @@ -956,12 +992,13 @@ <h3 class="pivx-bold-title center-text">Governance</h3>
<h3 data-i18n="contestedProposalsTitle" style="width: 100%;text-align: center;">Contested Proposals</h3>
<p data-i18n="contestedProposalsDesc" style="width: 100%;text-align: center;">These are proposals that received an overwhelming amount of downvotes, making it likely spam or a highly contestable proposal.</p>
<br>
<table id="proposalsContestedTable" class="table table-hover table-dark bg-transparent" style="width: 100%; opacity: 0.8;">
<table id="proposalsContestedTable" class="table table-hover table-dark bg-transparent governTable" style="width: 100%; opacity: 0.8;">
<thead>
<td class="text-center"><b> Name </b></td>
<td class="text-center"><b> Payment </b></td>
<td class="text-center"><b> Votes </b></td>
<td class="text-center"><b> Vote </b></td>
<td class="text-center btlr-7p"><b> STATUS </b></td>
<td class="text-center"><b> NAME </b></td>
<td class="text-center for-desktop"><b> PAYMENT </b></td>
<td class="text-center for-desktop"><b> VOTES </b></td>
<td class="text-center for-desktop btrr-7p"><b> VOTE </b></td>
</thead>
<tbody id="proposalsContestedTableBody" style="text-align: center; vertical-align: middle;"></tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion scripts/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class Database {
const store = this.#db
.transaction('accounts', 'readwrite')
.objectStore('accounts');
// When the account system is gonig to be added, the key is gonna be the publicKey
// When the account system is going to be added, the key is gonna be the publicKey
await store.put({ ...oldAccount, ...newAccount }, 'account');
}

Expand Down
Loading
Loading