fix(@desktop/wallet): `Wallet -> Settings -> Account order` - watch-only accounts and keycard accounts should have appropriate icon

Fixes: #11513
This commit is contained in:
Sale Djenic 2023-07-18 16:24:35 +02:00 committed by saledjenic
parent 32cac8a8cc
commit c47a432bae
2 changed files with 34 additions and 6 deletions

View File

@ -115,6 +115,11 @@ ItemDelegate {
This property holds the secondary text (title), displayed below primary This property holds the secondary text (title), displayed below primary
*/ */
property string secondaryTitle property string secondaryTitle
/*!
\qmlproperty string StatusDraggableListItem::secondaryTitleIcon
This property holds the secondary title icon, displayed on the right of the secondary title
*/
property string secondaryTitleIcon: ""
/*! /*!
\qmlproperty list<Item> StatusDraggableListItem::actions \qmlproperty list<Item> StatusDraggableListItem::actions
@ -291,13 +296,24 @@ ItemDelegate {
font.weight: root.highlighted ? Font.Medium : Font.Normal font.weight: root.highlighted ? Font.Medium : Font.Normal
} }
StatusBaseText { Row {
Layout.fillWidth: true Layout.fillWidth: true
text: root.secondaryTitle visible: !!root.secondaryTitle
visible: text spacing: 8
color: Theme.palette.baseColor1
elide: Text.ElideRight StatusBaseText {
maximumLineCount: 1 text: root.secondaryTitle
color: Theme.palette.baseColor1
elide: Text.ElideRight
maximumLineCount: 1
}
Loader {
asynchronous: true
active: !!root.secondaryTitleIcon
visible: active
sourceComponent: secondaryTitleIconComponent
}
} }
} }
@ -319,6 +335,16 @@ ItemDelegate {
} }
} }
Component {
id: secondaryTitleIconComponent
StatusIcon {
width: 16
height: 16
icon: root.secondaryTitleIcon
color: Theme.palette.baseColor1
}
}
Component { Component {
id: imageComponent id: imageComponent
StatusRoundedImage { StatusRoundedImage {

View File

@ -86,6 +86,8 @@ StatusListView {
return model.name return model.name
} }
secondaryTitle: model.address secondaryTitle: model.address
secondaryTitleIcon: model.walletType === Constants.watchWalletType? "show" :
model.keycardAccount ? "keycard" : ""
hasEmoji: true hasEmoji: true
icon.width: 40 icon.width: 40
icon.height: 40 icon.height: 40