fix(@desktop/browser): settings -> Browser, connected dapps items do not follow figma
Fixes #5906
This commit is contained in:
parent
0d6752a1f1
commit
ca410a0e26
|
@ -6,6 +6,7 @@ type
|
||||||
Name = UserRole + 1
|
Name = UserRole + 1
|
||||||
Address
|
Address
|
||||||
Color
|
Color
|
||||||
|
Emoji
|
||||||
|
|
||||||
QtObject:
|
QtObject:
|
||||||
type
|
type
|
||||||
|
@ -47,6 +48,7 @@ QtObject:
|
||||||
ModelRole.Name.int:"name",
|
ModelRole.Name.int:"name",
|
||||||
ModelRole.Address.int:"address",
|
ModelRole.Address.int:"address",
|
||||||
ModelRole.Color.int:"color",
|
ModelRole.Color.int:"color",
|
||||||
|
ModelRole.Emoji.int:"emoji"
|
||||||
}.toTable
|
}.toTable
|
||||||
|
|
||||||
method data(self: AccountsModel, index: QModelIndex, role: int): QVariant =
|
method data(self: AccountsModel, index: QModelIndex, role: int): QVariant =
|
||||||
|
@ -66,6 +68,8 @@ QtObject:
|
||||||
result = newQVariant(item.address)
|
result = newQVariant(item.address)
|
||||||
of ModelRole.Color:
|
of ModelRole.Color:
|
||||||
result = newQVariant(item.color)
|
result = newQVariant(item.color)
|
||||||
|
of ModelRole.Emoji:
|
||||||
|
result = newQVariant(item.emoji)
|
||||||
|
|
||||||
proc addItem*(self: AccountsModel, item: WalletAccountDto) =
|
proc addItem*(self: AccountsModel, item: WalletAccountDto) =
|
||||||
let parentModelIndex = newQModelIndex()
|
let parentModelIndex = newQModelIndex()
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 07e711e30c4d1dd3f6677210a7b1335d7ae172d9
|
Subproject commit be0f49a8d80a8489e9f26f765167c3239c0c92c1
|
|
@ -1,4 +1,5 @@
|
||||||
import QtQuick 2.14
|
import QtQuick 2.14
|
||||||
|
import QtWebEngine 1.10
|
||||||
import shared.status 1.0
|
import shared.status 1.0
|
||||||
import StatusQ.Controls 0.1
|
import StatusQ.Controls 0.1
|
||||||
import StatusQ.Core 0.1
|
import StatusQ.Core 0.1
|
||||||
|
@ -19,10 +20,16 @@ Column {
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: listItem.height + spacer.height
|
height: listItem.height + spacer.height
|
||||||
|
WebEngineView {
|
||||||
|
id: webView
|
||||||
|
url: model.name.startsWith("http")? model.name : "http://%1".arg(model.name)
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
StatusListItem {
|
StatusListItem {
|
||||||
id: listItem
|
id: listItem
|
||||||
title: model.name
|
title: webView.title !== ""? webView.title : model.name
|
||||||
icon.isLetterIdenticon: true
|
subTitle: model.name
|
||||||
|
image.source: webView.icon != ""? webView.icon : Style.svg("compassActive")
|
||||||
width: parent.width
|
width: parent.width
|
||||||
highlighted: true
|
highlighted: true
|
||||||
sensor.enabled: false
|
sensor.enabled: false
|
||||||
|
@ -41,8 +48,13 @@ Column {
|
||||||
property int outerIndex: listItem.index
|
property int outerIndex: listItem.index
|
||||||
|
|
||||||
title: model.name
|
title: model.name
|
||||||
icon.isLetterIdenticon: true
|
|
||||||
|
icon.emoji: !!model.emoji ? model.emoji: ""
|
||||||
icon.color: model.color
|
icon.color: model.color
|
||||||
|
icon.name: !model.emoji ? "filled-account": ""
|
||||||
|
icon.letterSize: 14
|
||||||
|
icon.isLetterIdenticon: !!model.emoji
|
||||||
|
icon.background.color: Theme.palette.indirectColor1
|
||||||
onClicked: {
|
onClicked: {
|
||||||
const dappName = walletStore.dappList.rowData(outerIndex, 'name')
|
const dappName = walletStore.dappList.rowData(outerIndex, 'name')
|
||||||
walletStore.disconnectAddress(dappName, model.address)
|
walletStore.disconnectAddress(dappName, model.address)
|
||||||
|
|
Loading…
Reference in New Issue