feat(@desktop/wallet): Remove network prefixes from main wallet accounts list
This commit is contained in:
parent
16a403e3e5
commit
95369bca11
|
@ -3,7 +3,6 @@ import QtQuick 2.14
|
||||||
import StatusQ.Components 0.1
|
import StatusQ.Components 0.1
|
||||||
import StatusQ.Core.Theme 0.1
|
import StatusQ.Core.Theme 0.1
|
||||||
import StatusQ.Core 0.1
|
import StatusQ.Core 0.1
|
||||||
import StatusQ.Core.Utils 0.1 as SQUtils
|
|
||||||
|
|
||||||
import AppLayouts.Wallet 1.0
|
import AppLayouts.Wallet 1.0
|
||||||
|
|
||||||
|
@ -20,8 +19,7 @@ StatusListItem {
|
||||||
|
|
||||||
objectName: account.name
|
objectName: account.name
|
||||||
title: account.name
|
title: account.name
|
||||||
subTitle: SQUtils.Utils.elideText(account.address, 6, 4)
|
subTitle: WalletUtils.addressToDisplay(account.address, true, sensor.containsMouse)
|
||||||
statusListItemSubTitle.customColor: sensor.containsMouse ? Theme.palette.directColor1 : Theme.palette.baseColor1
|
|
||||||
asset.color: !!account.colorId ? Utils.getColorForId(account.colorId): ""
|
asset.color: !!account.colorId ? Utils.getColorForId(account.colorId): ""
|
||||||
asset.emoji: account.emoji
|
asset.emoji: account.emoji
|
||||||
asset.name: !account.emoji ? "filled-account": ""
|
asset.name: !account.emoji ? "filled-account": ""
|
||||||
|
|
|
@ -267,8 +267,6 @@ ColumnLayout {
|
||||||
accountName: !!root.account ? root.account.name : ""
|
accountName: !!root.account ? root.account.name : ""
|
||||||
accountAddress: !!root.account ? root.account.address : ""
|
accountAddress: !!root.account ? root.account.address : ""
|
||||||
accountDerivationPath: !!root.account ? root.account.path : ""
|
accountDerivationPath: !!root.account ? root.account.path : ""
|
||||||
// TODO: remove in when RemoveAccountConfirmationPopup.qml removes preferred networks
|
|
||||||
preferredSharingNetworkShortNames: ""
|
|
||||||
emoji: !!root.account ? root.account.emoji : ""
|
emoji: !!root.account ? root.account.emoji : ""
|
||||||
color: !!root.account ? Utils.getColorForId(root.account.colorId) : ""
|
color: !!root.account ? Utils.getColorForId(root.account.colorId) : ""
|
||||||
|
|
||||||
|
|
|
@ -69,13 +69,7 @@ Rectangle {
|
||||||
address: {
|
address: {
|
||||||
if (!account)
|
if (!account)
|
||||||
return ""
|
return ""
|
||||||
let address = account.address
|
return account.address
|
||||||
const preferredChains = account.preferredSharingChainIds
|
|
||||||
if (!!preferredChains) {
|
|
||||||
const shortNames = WalletUtils.getNetworkShortNames(preferredChains, root.networkConnectionStore.filteredflatNetworks)
|
|
||||||
address = `${shortNames}${address}`
|
|
||||||
}
|
|
||||||
return address
|
|
||||||
}
|
}
|
||||||
name: account ? account.name : ""
|
name: account ? account.name : ""
|
||||||
walletType: account ? account.walletType : ""
|
walletType: account ? account.walletType : ""
|
||||||
|
@ -108,7 +102,6 @@ Rectangle {
|
||||||
removeAccountConfirmation.accountName = account.name
|
removeAccountConfirmation.accountName = account.name
|
||||||
removeAccountConfirmation.accountAddress = account.address
|
removeAccountConfirmation.accountAddress = account.address
|
||||||
removeAccountConfirmation.accountDerivationPath = account.path
|
removeAccountConfirmation.accountDerivationPath = account.path
|
||||||
removeAccountConfirmation.preferredSharingChainIds = account.preferredSharingChainIds
|
|
||||||
removeAccountConfirmation.emoji = account.emoji
|
removeAccountConfirmation.emoji = account.emoji
|
||||||
removeAccountConfirmation.colorId = account.colorId
|
removeAccountConfirmation.colorId = account.colorId
|
||||||
removeAccountConfirmation.active = true
|
removeAccountConfirmation.active = true
|
||||||
|
@ -131,7 +124,6 @@ Rectangle {
|
||||||
property string accountName
|
property string accountName
|
||||||
property string accountAddress
|
property string accountAddress
|
||||||
property string accountDerivationPath
|
property string accountDerivationPath
|
||||||
property string preferredSharingChainIds
|
|
||||||
property string emoji
|
property string emoji
|
||||||
property string colorId
|
property string colorId
|
||||||
|
|
||||||
|
@ -140,7 +132,6 @@ Rectangle {
|
||||||
accountName: removeAccountConfirmation.accountName
|
accountName: removeAccountConfirmation.accountName
|
||||||
accountAddress: removeAccountConfirmation.accountAddress
|
accountAddress: removeAccountConfirmation.accountAddress
|
||||||
accountDerivationPath: removeAccountConfirmation.accountDerivationPath
|
accountDerivationPath: removeAccountConfirmation.accountDerivationPath
|
||||||
preferredSharingNetworkShortNames: RootStore.getNetworkShortNames(removeAccountConfirmation.preferredSharingChainIds)
|
|
||||||
emoji: removeAccountConfirmation.emoji
|
emoji: removeAccountConfirmation.emoji
|
||||||
color: Utils.getColorForId(removeAccountConfirmation.colorId)
|
color: Utils.getColorForId(removeAccountConfirmation.colorId)
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ StatusDialog {
|
||||||
required property string accountName
|
required property string accountName
|
||||||
required property string accountAddress
|
required property string accountAddress
|
||||||
required property string accountDerivationPath
|
required property string accountDerivationPath
|
||||||
required property string preferredSharingNetworkShortNames
|
|
||||||
required property string emoji
|
required property string emoji
|
||||||
required property string color
|
required property string color
|
||||||
|
|
||||||
|
@ -47,7 +46,7 @@ StatusDialog {
|
||||||
|
|
||||||
header: StatusDialogHeader {
|
header: StatusDialogHeader {
|
||||||
headline.title: qsTr("Remove %1").arg(root.accountName)
|
headline.title: qsTr("Remove %1").arg(root.accountName)
|
||||||
headline.subtitle: WalletUtils.colorizedChainPrefix(root.preferredSharingNetworkShortNames) + StatusQUtils.Utils.elideText(root.accountAddress, 6, 4)
|
headline.subtitle: StatusQUtils.Utils.elideText(root.accountAddress, 6, 4)
|
||||||
actions.closeButton.onClicked: root.close()
|
actions.closeButton.onClicked: root.close()
|
||||||
leftComponent: StatusSmartIdenticon {
|
leftComponent: StatusSmartIdenticon {
|
||||||
asset.emoji: root.emoji
|
asset.emoji: root.emoji
|
||||||
|
|
Loading…
Reference in New Issue