Jonathan Rainville 252061d8e8
feat(sync): add a fallback mechanism when the pairing does't work (#15820)
Fixes #15750

When the pairing fails, the UI now let's the user use the seed phrase instead.
When they do, a call is send to the original device and both instances will show an AC notif.
When the original device accepts the pairing, the call is made to pair and sync the devices and the AC notifs get deleted
2024-10-02 09:54:35 -04:00

84 lines
2.0 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
Rectangle {
id: root
property string title
property string details
readonly property string detailsVisible: d.detailsVisible
implicitWidth: layout.implicitWidthj
+ layout.anchors.leftMargin
+ layout.anchors.rigthMargin
implicitHeight: layout.implicitHeight
+ layout.anchors.topMargin
+ layout.anchors.bottomMargin
radius: 8
color: Theme.palette.baseColor4
QtObject {
id: d
property bool detailsVisible: false
}
CopyButton {
width: 20
height: 20
visible: d.detailsVisible
color: Theme.palette.baseColor1
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 8
anchors.rightMargin: 8
textToCopy: root.details
}
ColumnLayout {
id: layout
anchors.fill: parent
anchors.margins: 10
spacing: 4
StatusBaseText {
Layout.fillWidth: true
horizontalAlignment: Qt.AlignHCenter
text: root.title
font.pixelSize: 13
font.weight: Font.Medium
}
StatusBaseText {
Layout.fillWidth: true
horizontalAlignment: Qt.AlignHCenter
visible: !d.detailsVisible
text: qsTr("Show error details")
color: Theme.palette.primaryColor1
font.pixelSize: 12
MouseArea {
anchors.fill: parent
onClicked: {
d.detailsVisible = true
}
}
}
StatusBaseText {
Layout.fillWidth: true
horizontalAlignment: Qt.AlignHCenter
visible: d.detailsVisible
text: root.details
color: Theme.palette.baseColor1
font.pixelSize: 12
wrapMode: Text.WordWrap
}
}
}