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

Adds button for vote coin wallets linking to details #2425

Merged
merged 4 commits into from Apr 8, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions atomic_defi_design/Dex/Constants/General.qml
Expand Up @@ -88,6 +88,11 @@ QtObject {
return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).is_faucet_coin
}

function isVoteCoin(ticker)
{
return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).is_vote_coin
}

function isCoinWithMemo(ticker)
{
return API.app.portfolio_pg.global_cfg_mdl.get_coin_info(ticker).has_memos
Expand Down
44 changes: 44 additions & 0 deletions atomic_defi_design/Dex/Wallet/Main.qml
Expand Up @@ -657,6 +657,50 @@ Item
}
}

// Proposals Button
Item
{
Layout.preferredWidth: 165
Layout.preferredHeight: 40
visible: current_ticker_infos.is_vote_coin

DefaultButton
{
enabled: activation_pct == 100
anchors.fill: parent
radius: 18
label.text: qsTr("Vote Info")
label.font.pixelSize: 16
content.anchors.left: content.parent.left
content.anchors.leftMargin: enabled ? 23 : 48
content.anchors.rightMargin: 23

onClicked: Qt.openUrlExternally("https://vote.komodoplatform.com/")

Row
{
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 23

Qaterial.Icon
{
icon: Qaterial.Icons.vote
size: 24
anchors.verticalCenter: parent.verticalCenter
color: "#2c87b9"
}
}
}

// Faucet button error icon
DefaultAlertIcon
{
visible: activation_pct != 100
tooltipText: api_wallet_page.ticker + qsTr(" Activation: " + activation_pct + "%")
}
}

Component.onCompleted: api_wallet_page.claimingFaucetRpcDataChanged.connect(onClaimFaucetRpcResultChanged)
Component.onDestruction: api_wallet_page.claimingFaucetRpcDataChanged.disconnect(onClaimFaucetRpcResultChanged)
function onClaimFaucetRpcResultChanged() { claimFaucetResultModal.open() }
Expand Down
170 changes: 89 additions & 81 deletions atomic_defi_design/assets/languages/atomic_defi_de.ts

Large diffs are not rendered by default.