status-desktop/ui/app/AppLayouts/WalletV2/views/SeedAddAccountView.qml
Sale Djenic b3f8af8e06 refactor(@desktop/general): qml code referring to the old code base commented out
Qml code referring to the old code base commented out, but not deleted,
due to easier refactoring the rest of the app.
2022-02-01 11:42:42 +01:00

117 lines
3.0 KiB
QML

import QtQuick 2.13
import utils 1.0
import shared.controls 1.0
import "../panels"
import "../controls"
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Controls.Validators 0.1
Item {
id: root
visible: (opacity > 0.1)
property bool searching: false
property alias activeAccountsList: activeAccountsView
property Timer timer: Timer {
interval: 800
onTriggered: {
searching = false;
}
}
property var store
property var dummyModel: []
Column {
id: searchingColumn
width: parent.width
height: 80
anchors.verticalCenter: parent.verticalCenter
spacing: 15
StatusLoadingIndicator {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.primaryColor1
}
StatusBaseText {
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 15
text: qsTr("Searching for active accounts")
color: Theme.palette.baseColor1
}
}
ListView {
id: activeAccountsView
anchors.fill: parent
anchors.bottomMargin: 10
clip: true
//TODO replace with active accounts model
// Not Refactored Yet
// model: root.store.walletModelInst.accountsView.accounts
delegate: SeedAccountDetailsDelegate {
deleteButtonVisible: (activeAccountsView.count > 1)
onDeleteClicked: {
root.store.deleteAccount(address);
}
}
}
AccountNotFoundPanel {
id: accountNotFound
width: parent.width
anchors.verticalCenter: parent.verticalCenter
}
states: [
State {
when: searching
PropertyChanges {
target: searchingColumn
opacity: 1.0
}
PropertyChanges {
target: activeAccountsView
opacity: 0.0
}
PropertyChanges {
target: accountNotFound
opacity: 0.0
}
},
State {
when: !searching
PropertyChanges {
target: searchingColumn
opacity: 0.0
}
PropertyChanges {
target: activeAccountsView
opacity: 1.0
}
PropertyChanges {
target: accountNotFound
opacity: 0.0
}
},
State {
when: (activeAccountsView.count === 0 && !searching)
PropertyChanges {
target: searchingColumn
opacity: 0.0
}
PropertyChanges {
target: activeAccountsView
opacity: 0.0
}
PropertyChanges {
target: accountNotFound
opacity: 1.0
}
}
]
}