fix(@desktop/wallet): Wallet settings - various small enhancements identified via mobile wallet settings work

fixes #11675
This commit is contained in:
Khushboo Mehta 2023-10-05 17:16:30 +02:00 committed by Khushboo-dev-cpp
parent 601be63774
commit b5723db3c9
6 changed files with 11 additions and 9 deletions

View File

@ -51,7 +51,7 @@ Rectangle {
title: !!root.keyPair? d.isWatchOnly ? qsTr("Watched addresses") : root.keyPair.name : ""
statusListItemSubTitle.textFormat: Qt.RichText
titleTextIcon: !!root.keyPair && keyPair.migratedToKeycard ? "keycard": ""
subTitle: Utils.getKeypairLocation(root.keyPair)
subTitle: Utils.getKeypairLocation(root.keyPair, false)
statusListItemSubTitle.color: Utils.getKeypairLocationColor(root.keyPair)
color: Theme.palette.transparent
ringSettings {

View File

@ -44,7 +44,7 @@ StatusModal {
}
d.entryValid = d.entryValid && !root.accountsModule.keypairNameExists(nameInput.text)
if (!d.entryValid) {
nameInput.errorMessageCmp.text = qsTr("Key name already in use")
nameInput.errorMessageCmp.text = qsTr("Keypair name already in use")
nameInput.valid = false
}
}
@ -66,7 +66,7 @@ StatusModal {
Layout.preferredHeight: 120
topPadding: 8
bottomPadding: 8
label: qsTr("Key name")
label: qsTr("Keypair name")
charLimit: Constants.keypair.nameLengthMax
validators: Constants.validators.keypairName
input.clearable: true
@ -81,7 +81,7 @@ StatusModal {
StatusBaseText {
Layout.preferredWidth: parent.width
Layout.topMargin: Style.current.padding
text: qsTr("Accounts derived from this key")
text: qsTr("Accounts derived from this keypair")
font.pixelSize: Style.current.primaryTextFontSize
}

View File

@ -203,7 +203,7 @@ ColumnLayout {
WalletAccountDetailsListItem {
Layout.fillWidth: true
title: qsTr("Stored")
subTitle: Utils.getKeypairLocation(root.keyPair)
subTitle: Utils.getKeypairLocation(root.keyPair, true)
statusListItemSubTitle.color: Utils.getKeypairLocationColor(root.keyPair)
}
}

View File

@ -12,7 +12,7 @@ Rectangle {
property string title: qsTr("Import keypair to use this account")
property string info: qsTr("This account was added to one of your synced devices. To use this account you will first need import the associated keypair to this device.")
property string buttonName: qsTr("Import keypair")
property string buttonName: qsTr("Import missing keypair")
signal runImport()

View File

@ -45,7 +45,7 @@ Item {
Layout.fillWidth: true
Layout.leftMargin: d.margin
Layout.rightMargin: d.margin
text: qsTr("To use the derived accounts on this device, you need to import their keypairs.")
text: qsTr("To use the associated accounts on this device, you need to import their keypairs.")
wrapMode: Text.WordWrap
}

View File

@ -832,7 +832,7 @@ QtObject {
Theme.palette.warningColor1
}
function getKeypairLocation(keypair) {
function getKeypairLocation(keypair, fromAccountDetailsView) {
if (!keypair || keypair.pairType === Constants.keypair.type.watchOnly) {
return ""
}
@ -849,7 +849,9 @@ QtObject {
return profileTitle + qsTr("On device")
}
if (keypair.operability === Constants.keypair.operability.nonOperable) {
if (keypair.syncedFrom === Constants.keypair.syncedFrom.backup) {
if (fromAccountDetailsView) {
return qsTr("Requires import")
} else if (keypair.syncedFrom === Constants.keypair.syncedFrom.backup) {
if (keypair.pairType === Constants.keypair.type.seedImport ||
keypair.pairType === Constants.keypair.type.privateKeyImport) {
return qsTr("Restored from backup. Import keypair to use derived accounts.")