mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 23:05:17 +00:00
d9d6d90dc9
- legacy Style and ThemePalette removed - moved and deduplicated font definitions into `Theme` (unrelated to a color palette) - `Style.current.foo` -> `Theme.foo` - `Style.current.fooColor` -> `Theme.palette.fooColor` - upgrade the imports to 5.15 - removed some mode dead components Fixes #16514
92 lines
3.1 KiB
QML
92 lines
3.1 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
|
import StatusQ.Controls 0.1
|
|
|
|
import utils 1.0
|
|
import shared.controls 1.0
|
|
|
|
import "../stores"
|
|
|
|
GridLayout {
|
|
id: root
|
|
|
|
property AddAccountStore store
|
|
|
|
columns: 2
|
|
columnSpacing: Theme.padding
|
|
rowSpacing: Theme.halfPadding
|
|
|
|
QtObject {
|
|
id: d
|
|
|
|
readonly property int oneHalfWidth: (root.width - root.columnSpacing) * 0.5
|
|
}
|
|
|
|
component ReadonlyInputWithCopyButton: StatusInput {
|
|
id: comp
|
|
required property string textToCopy
|
|
|
|
input.edit.enabled: false
|
|
input.edit.color: Theme.palette.baseColor1
|
|
input.background.color: "transparent"
|
|
input.background.border.color: Theme.palette.baseColor2
|
|
input.rightComponent: CopyButton {
|
|
textToCopy: comp.textToCopy
|
|
}
|
|
}
|
|
|
|
StatusBaseText {
|
|
Layout.fillWidth: true
|
|
font.pixelSize: Constants.addAccountPopup.labelFontSize1
|
|
text: qsTr("Derivation Path")
|
|
}
|
|
|
|
StatusBaseText {
|
|
Layout.preferredWidth: d.oneHalfWidth
|
|
font.pixelSize: Constants.addAccountPopup.labelFontSize1
|
|
text: qsTr("Account")
|
|
}
|
|
|
|
ReadonlyInputWithCopyButton {
|
|
Layout.preferredWidth: d.oneHalfWidth
|
|
text: root.store.addAccountModule.derivationPath
|
|
textToCopy: root.store.addAccountModule.derivationPath
|
|
}
|
|
|
|
ReadonlyInputWithCopyButton {
|
|
Layout.preferredWidth: d.oneHalfWidth
|
|
text: StatusQUtils.Utils.elideText(root.store.selectedDerivedAddress.address, 6, 8)
|
|
textToCopy: root.store.selectedDerivedAddress.address
|
|
}
|
|
|
|
StatusBaseText {
|
|
Layout.preferredWidth: d.oneHalfWidth
|
|
font.pixelSize: Constants.addAccountPopup.labelFontSize2
|
|
color: Theme.palette.baseColor1
|
|
text: {
|
|
if (root.store.addAccountModule.derivationPath.startsWith(Constants.addAccountPopup.predefinedPaths.ethereum)) {
|
|
root.store.selectedRootPath = Constants.addAccountPopup.predefinedPaths.ethereum
|
|
}
|
|
else if (root.store.addAccountModule.derivationPath.startsWith(Constants.addAccountPopup.predefinedPaths.ethereumRopsten)) {
|
|
root.store.selectedRootPath = Constants.addAccountPopup.predefinedPaths.ethereumRopsten
|
|
}
|
|
else if (root.store.addAccountModule.derivationPath.startsWith(Constants.addAccountPopup.predefinedPaths.ethereumLedger)) {
|
|
root.store.selectedRootPath = Constants.addAccountPopup.predefinedPaths.ethereumLedger
|
|
}
|
|
else if (root.store.addAccountModule.derivationPath.startsWith(Constants.addAccountPopup.predefinedPaths.ethereumLedgerLive)) {
|
|
root.store.selectedRootPath = Constants.addAccountPopup.predefinedPaths.ethereumLedgerLive
|
|
}
|
|
else {
|
|
root.store.selectedRootPath = Constants.addAccountPopup.predefinedPaths.custom
|
|
}
|
|
|
|
return root.store.translation(root.store.selectedRootPath, true)
|
|
}
|
|
}
|
|
}
|