Stefan a8fb355a8d feat(wallet) activate Wallet connect modal from deep-links
- Open wallet connect modal when the application is opened from a
  deep link
- Add test entry that opens wallet connect modal with mocked
  StatusDesktop app that can be used for testing
- Add tests

Closes #12641
2023-12-12 20:12:53 +01:00

46 lines
1.1 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import StatusQ.Controls 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Utils 0.1 as SQUtils
ListView {
id: root
signal disconnect(string topic)
spacing: 32
delegate: Item {
implicitWidth: delegateLayout.implicitWidth
implicitHeight: delegateLayout.implicitHeight
RowLayout {
id: delegateLayout
width: root.width
StatusIcon {
icon: model.peerMetadata.icons.length > 0 ? model.peerMetadata.icons[0] : ""
visible: !!icon
}
StatusBaseText {
text: `${model.peerMetadata.name}\n${model.peerMetadata.url}\nTopic: ${SQUtils.Utils.elideText(model.topic, 6, 6)}\nExpire: ${new Date(model.expiry * 1000).toLocaleString()}`
color: model.active ? "green" : "orange"
}
StatusButton {
text: "Disconnect"
visible: model.active
onClicked: {
root.disconnect(model.topic)
}
}
}
}
}