mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
hide balance in receive tab
add updateBalance on advanced click remove state variable and hide balance when advanced clicked remove advanced state from left panel add qsTr to make HIDDEN translateable
This commit is contained in:
parent
7e801642c2
commit
c8dd6632a7
1 changed files with 19 additions and 13 deletions
32
main.qml
32
main.qml
|
@ -144,6 +144,8 @@ ApplicationWindow {
|
||||||
else if(middlePanel.state === "Transfer") middlePanel.state = "Settings"
|
else if(middlePanel.state === "Transfer") middlePanel.state = "Settings"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (middlePanel.state !== "Advanced") updateBalance();
|
||||||
|
|
||||||
leftPanel.selectItem(middlePanel.state)
|
leftPanel.selectItem(middlePanel.state)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,6 +309,11 @@ ApplicationWindow {
|
||||||
return path.replace(/.*[\/\\]/, '').replace(/\.keys$/, '')
|
return path.replace(/.*[\/\\]/, '').replace(/\.keys$/, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateBalance() {
|
||||||
|
middlePanel.unlockedBalanceText = leftPanel.unlockedBalanceText = middlePanel.state === "Receive" ? qsTr("HIDDEN") : walletManager.displayAmount(currentWallet.unlockedBalance);
|
||||||
|
middlePanel.balanceText = leftPanel.balanceText = middlePanel.state === "Receive" ? qsTr("HIDDEN") : walletManager.displayAmount(currentWallet.balance);
|
||||||
|
}
|
||||||
|
|
||||||
function onWalletConnectionStatusChanged(status){
|
function onWalletConnectionStatusChanged(status){
|
||||||
console.log("Wallet connection status changed " + status)
|
console.log("Wallet connection status changed " + status)
|
||||||
middlePanel.updateStatus();
|
middlePanel.updateStatus();
|
||||||
|
@ -365,8 +372,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
function onWalletUpdate() {
|
function onWalletUpdate() {
|
||||||
console.log(">>> wallet updated")
|
console.log(">>> wallet updated")
|
||||||
middlePanel.unlockedBalanceText = leftPanel.unlockedBalanceText = walletManager.displayAmount(currentWallet.unlockedBalance);
|
updateBalance();
|
||||||
middlePanel.balanceText = leftPanel.balanceText = walletManager.displayAmount(currentWallet.balance);
|
|
||||||
// Update history if new block found since last update
|
// Update history if new block found since last update
|
||||||
if(foundNewBlock) {
|
if(foundNewBlock) {
|
||||||
foundNewBlock = false;
|
foundNewBlock = false;
|
||||||
|
@ -1144,7 +1150,7 @@ ApplicationWindow {
|
||||||
onRejectedCallback();
|
onRejectedCallback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PasswordDialog {
|
PasswordDialog {
|
||||||
id: settingsPasswordDialog
|
id: settingsPasswordDialog
|
||||||
z: parent.z + 1
|
z: parent.z + 1
|
||||||
|
@ -1249,16 +1255,16 @@ ApplicationWindow {
|
||||||
anchors.top: mobileHeader.bottom
|
anchors.top: mobileHeader.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
onDashboardClicked: {middlePanel.state = "Dashboard"; if(isMobile) hideMenu()}
|
onDashboardClicked: { middlePanel.state = "Dashboard"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onTransferClicked: {middlePanel.state = "Transfer"; if(isMobile) hideMenu()}
|
onTransferClicked: { middlePanel.state = "Transfer"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onReceiveClicked: {middlePanel.state = "Receive"; if(isMobile) hideMenu()}
|
onReceiveClicked: { middlePanel.state = "Receive"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onTxkeyClicked: {middlePanel.state = "TxKey"; if(isMobile) hideMenu()}
|
onTxkeyClicked: { middlePanel.state = "TxKey"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onHistoryClicked: {middlePanel.state = "History"; if(isMobile) hideMenu()}
|
onHistoryClicked: { middlePanel.state = "History"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onAddressBookClicked: {middlePanel.state = "AddressBook"; if(isMobile) hideMenu()}
|
onAddressBookClicked: { middlePanel.state = "AddressBook"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onMiningClicked: {middlePanel.state = "Mining"; if(isMobile) hideMenu()}
|
onMiningClicked: { middlePanel.state = "Mining"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onSignClicked: {middlePanel.state = "Sign"; if(isMobile) hideMenu()}
|
onSignClicked: { middlePanel.state = "Sign"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onSettingsClicked: {middlePanel.state = "Settings"; if(isMobile) hideMenu()}
|
onSettingsClicked: { middlePanel.state = "Settings"; if(isMobile) hideMenu(); updateBalance(); }
|
||||||
onKeysClicked: {settingsPasswordDialog.open(); if(isMobile) hideMenu()}
|
onKeysClicked: { settingsPasswordDialog.open(); if(isMobile) hideMenu(); updateBalance(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
RightPanel {
|
RightPanel {
|
||||||
|
|
Loading…
Reference in a new issue