status-desktop/ui/app/AppLayouts/WalletV2/views/SeedAddAccountView.qml
Alexandra Betouni 4ee21ada05 feat(desktop) Added image function in Style
Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
   source: Style.svg("check)
   ....

Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths

Closes #3678
2021-09-28 15:28:00 -04:00

115 lines
2.9 KiB
QML

import QtQuick 2.13
import utils 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
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
}
}
]
}