Skip to content
Snippets Groups Projects
Commit 3f818a77 authored by tatiana.novikova's avatar tatiana.novikova
Browse files

[*] Change wallets model for don't append 'all wallets' to dashboard

parent 7087c482
No related branches found
No related tags found
1 merge request!11Cellframe clone
......@@ -26,14 +26,17 @@ DapDashboardTabForm
dapDashboardTopPanel.dapComboboxWallet.onCurrentIndexChanged:
{
dapDashboardScreen.dapListViewWallet.model = dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).networks
dapDashboardScreen.dapNameWalletTitle.text = dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).name
console.log("DapGetWalletHistoryCommand")
console.log(" network: " + dapServiceController.CurrentNetwork)
console.log(" chain: " + dapServiceController.CurrentChain)
console.log(" wallet address: " + dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork))
dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork));
state = "WALLETSHOW"
if(dapDashboardTopPanel.dapComboboxWallet.currentIndex != -1)
{
dapDashboardScreen.dapListViewWallet.model = dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).networks
dapDashboardScreen.dapNameWalletTitle.text = dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).name
console.log("DapGetWalletHistoryCommand")
console.log(" network: " + dapServiceController.CurrentNetwork)
console.log(" chain: " + dapServiceController.CurrentChain)
console.log(" wallet address: " + dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork))
dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork));
state = "WALLETSHOW"
}
}
// Signal-slot connection realizing panel switching depending on predefined rules
......
......@@ -3,5 +3,16 @@ import Demlabs 1.0
DapDashboardTopPanelForm
{
Component.onCompleted:
{
if(dapModelWallets.count > 0)
{
if(dapModelWallets.get(0).name === "all wallets")
{
dapComboboxWallet.currentIndex = -1;
dapModelWallets.remove(0, 1);
dapComboboxWallet.currentIndex = 0;
}
}
}
}
......@@ -37,6 +37,7 @@ DapAbstractTopPanel
model: dapModelWallets
comboBoxTextRole: ["name"]
mainLineText: "all wallets"
isDefaultNeedToAppend: false
indicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png"
indicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png"
sidePaddingNormal: 0 * pt
......@@ -67,6 +68,8 @@ DapAbstractTopPanel
fontComboBox: [dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14]
colorMainTextComboBox: [["#FFFFFF", "#070023"]]
colorTextComboBox: [["#070023", "#FFFFFF"]]
}
}
//TODO: Disabled until the currency converter is implemented.
......
......@@ -26,7 +26,7 @@ DapHistoryTabForm
Component.onCompleted:
{
for(var i=0; i < dapModelWallets.count; ++i)
for(var i=0; i < dapWallets.count; ++i)
{
modelHistory.clear()
dapServiceController.requestToService("DapGetWalletHistoryCommand",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment