2023-08-23 07:09:16 +00:00
|
|
|
import QtQuick 2.15
|
2023-03-14 02:52:16 +00:00
|
|
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
import shared.controls 1.0
|
2023-08-21 10:58:21 +00:00
|
|
|
import shared.views 1.0
|
|
|
|
|
2023-03-14 02:52:16 +00:00
|
|
|
Column {
|
|
|
|
id: root
|
|
|
|
|
2023-08-23 07:09:16 +00:00
|
|
|
property int purpose: SyncingCodeInstructions.Purpose.AppSync
|
|
|
|
property int type: SyncingCodeInstructions.Type.QRCode
|
2023-08-21 10:58:21 +00:00
|
|
|
|
2023-03-14 02:52:16 +00:00
|
|
|
spacing: 4
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
DecoratedListItem {
|
2023-08-23 07:09:16 +00:00
|
|
|
order: "1."
|
2023-10-03 13:31:54 +00:00
|
|
|
text1: qsTr("Ensure both devices are on the same network")
|
|
|
|
}
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
DecoratedListItem {
|
2023-10-03 13:31:54 +00:00
|
|
|
order: "2."
|
2023-08-23 07:09:16 +00:00
|
|
|
text1: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
return qsTr("Open Status on the device you want to import from")
|
|
|
|
}
|
|
|
|
return qsTr("Open Status App on your mobile device")
|
|
|
|
}
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
DecoratedListItem {
|
2023-10-03 13:31:54 +00:00
|
|
|
order: "3."
|
|
|
|
text1: qsTr("Open your")
|
2023-08-23 07:09:16 +00:00
|
|
|
icon: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
return "settings"
|
|
|
|
}
|
|
|
|
return "profile"
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text2: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
return qsTr("Settings / Wallet")
|
|
|
|
}
|
2023-10-03 13:31:54 +00:00
|
|
|
return qsTr("Profile")
|
2023-08-23 07:09:16 +00:00
|
|
|
}
|
|
|
|
text2Color: Theme.palette.directColor1
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
DecoratedListItem {
|
2023-10-03 13:31:54 +00:00
|
|
|
order: "4."
|
2023-08-23 07:09:16 +00:00
|
|
|
text1: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
return qsTr("Tap")
|
|
|
|
}
|
|
|
|
return qsTr("Go to")
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
icon: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return "rotate"
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text2: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
2024-06-07 13:29:09 +00:00
|
|
|
return qsTr("Show encrypted key pairs code")
|
2023-08-23 07:09:16 +00:00
|
|
|
}
|
|
|
|
return qsTr("Syncing")
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text2Color: Theme.palette.directColor1
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
DecoratedListItem {
|
2023-10-03 13:31:54 +00:00
|
|
|
order: "5."
|
2023-08-23 07:09:16 +00:00
|
|
|
text1: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
|
|
|
return qsTr("Copy the")
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return qsTr("Enable camera")
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return qsTr("Tap")
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text1Color: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
|
|
|
return Theme.palette.baseColor1
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return Theme.palette.directColor1
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return Theme.palette.baseColor1
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text2: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
2024-06-07 13:29:09 +00:00
|
|
|
return qsTr("encrypted key pairs code")
|
2023-08-23 07:09:16 +00:00
|
|
|
}
|
|
|
|
return qsTr("on this device")
|
|
|
|
}
|
|
|
|
return qsTr("Sync new device")
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text2Color: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
|
|
|
return Theme.palette.directColor1
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return Theme.palette.baseColor1
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return Theme.palette.directColor1
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
DecoratedListItem {
|
2023-10-03 13:31:54 +00:00
|
|
|
order: "6."
|
2023-08-23 07:09:16 +00:00
|
|
|
text1: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
|
|
|
return qsTr("Paste the")
|
|
|
|
}
|
|
|
|
return qsTr("Scan or enter the encrypted QR with this device")
|
|
|
|
}
|
|
|
|
return qsTr("Tap")
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text2: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
2024-06-07 13:29:09 +00:00
|
|
|
return qsTr("encrypted key pairs code")
|
2023-08-23 07:09:16 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return qsTr("Enable camera")
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
text2Color: Theme.palette.directColor1
|
|
|
|
text3: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
|
|
|
return qsTr("to this device")
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
return qsTr("on this device")
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-01 11:34:30 +00:00
|
|
|
DecoratedListItem {
|
2023-08-23 07:09:16 +00:00
|
|
|
order: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
2023-10-03 13:31:54 +00:00
|
|
|
return "7."
|
2023-08-23 07:09:16 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
2023-10-03 13:31:54 +00:00
|
|
|
return "7."
|
2023-08-23 07:09:16 +00:00
|
|
|
}
|
|
|
|
text1: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
if (root.type === SyncingCodeInstructions.Type.EncryptedKey) {
|
|
|
|
return qsTr("For security, delete the code as soon as you are done")
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return ""
|
2023-08-21 10:58:21 +00:00
|
|
|
}
|
2023-08-23 07:09:16 +00:00
|
|
|
return qsTr("Scan or enter the code")
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|