mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-21 11:08:55 +00:00
Changes: 1. Align dialog with Figma design 2. Add new components for round image with badge and connection status tag 3. Add tests 4. Dapps service will now receive wallet `RootStore` as input and reuse existing models with account balance and other necessary info for account selection and chain selection 5. Minor updates in stores 6. Minor updates in WC toast messages to display app domain instead of app url
88 lines
2.3 KiB
QML
88 lines
2.3 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import StatusQ 0.1
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import AppLayouts.Wallet.controls 1.0
|
|
import shared.controls 1.0
|
|
|
|
Rectangle {
|
|
id: root
|
|
|
|
property string selectedAccountAddress: ""
|
|
property bool connectionAttempted: false
|
|
property var accountsModel
|
|
property var chainsModel
|
|
property alias chainSelection: networkFilter.selection
|
|
|
|
readonly property alias selectedAccount: accountsDropdown.currentAccount
|
|
|
|
|
|
implicitWidth: contextLayout.implicitWidth
|
|
implicitHeight: contextLayout.implicitHeight
|
|
|
|
radius: 8
|
|
// TODO: the color matched the design color (grey4); It is also matching the intention or we should add some another color to the theme? (e.g. sectionBorder)?
|
|
border.color: Theme.palette.baseColor2
|
|
border.width: 1
|
|
color: "transparent"
|
|
|
|
ColumnLayout {
|
|
id: contextLayout
|
|
|
|
anchors.fill: parent
|
|
|
|
RowLayout {
|
|
Layout.margins: 16
|
|
|
|
StatusBaseText {
|
|
text: qsTr("Connect with")
|
|
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
AccountSelector {
|
|
id: accountsDropdown
|
|
|
|
Layout.preferredWidth: 204
|
|
Layout.preferredHeight: 38
|
|
control.horizontalPadding: 12
|
|
control.verticalPadding: 4
|
|
control.enabled: !root.connectionAttempted && count > 1
|
|
model: root.accountsModel
|
|
indicator.visible: control.enabled
|
|
selectedAddress: root.selectedAccountAddress
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
Layout.fillWidth: true
|
|
height: 1
|
|
color: root.border.color
|
|
}
|
|
|
|
RowLayout {
|
|
Layout.margins: 15
|
|
|
|
StatusBaseText {
|
|
text: qsTr("On")
|
|
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
NetworkFilter {
|
|
id: networkFilter
|
|
objectName: "networkFilter"
|
|
Layout.preferredWidth: accountsDropdown.Layout.preferredWidth
|
|
|
|
flatNetworks: root.chainsModel
|
|
showTitle: true
|
|
multiSelection: true
|
|
showAllSelectedText: false
|
|
selectionAllowed: !root.connectionAttempted && root.chainsModel.ModelCount.count > 1
|
|
}
|
|
}
|
|
}
|
|
} |