Skip to content

Commit c86019b

Browse files
committed
add button for vote info in wallet
1 parent 229203a commit c86019b

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

atomic_defi_design/Dex/Constants/General.qml

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ QtObject {
8888
return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).is_faucet_coin
8989
}
9090

91+
function isVoteCoin(ticker)
92+
{
93+
return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).is_vote_coin
94+
}
95+
9196
function isCoinWithMemo(ticker)
9297
{
9398
return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).has_memos

atomic_defi_design/Dex/Wallet/Main.qml

+44
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,50 @@ Item
657657
}
658658
}
659659

660+
// Proposals Button
661+
Item
662+
{
663+
Layout.preferredWidth: 165
664+
Layout.preferredHeight: 40
665+
visible: current_ticker_infos.is_vote_coin
666+
667+
DefaultButton
668+
{
669+
enabled: activation_pct == 100
670+
anchors.fill: parent
671+
radius: 18
672+
label.text: qsTr("Vote Info")
673+
label.font.pixelSize: 16
674+
content.anchors.left: content.parent.left
675+
content.anchors.leftMargin: enabled ? 23 : 48
676+
content.anchors.rightMargin: 23
677+
678+
onClicked: Qt.openUrlExternally("https://vote.komodoplatform.com/")
679+
680+
Row
681+
{
682+
anchors.verticalCenter: parent.verticalCenter
683+
anchors.right: parent.right
684+
anchors.rightMargin: 23
685+
686+
Qaterial.Icon
687+
{
688+
icon: Qaterial.Icons.vote
689+
size: 24
690+
anchors.verticalCenter: parent.verticalCenter
691+
color: "#283547"
692+
}
693+
}
694+
}
695+
696+
// Faucet button error icon
697+
DefaultAlertIcon
698+
{
699+
visible: activation_pct != 100
700+
tooltipText: api_wallet_page.ticker + qsTr(" Activation: " + activation_pct + "%")
701+
}
702+
}
703+
660704
Component.onCompleted: api_wallet_page.claimingFaucetRpcDataChanged.connect(onClaimFaucetRpcResultChanged)
661705
Component.onDestruction: api_wallet_page.claimingFaucetRpcDataChanged.disconnect(onClaimFaucetRpcResultChanged)
662706
function onClaimFaucetRpcResultChanged() { claimFaucetResultModal.open() }

0 commit comments

Comments
 (0)