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
|
|
|
|
|
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
|
|
|
|
|
2023-08-23 07:09:16 +00:00
|
|
|
GetSyncCodeInstruction {
|
|
|
|
order: "1."
|
2023-10-03 13:31:54 +00:00
|
|
|
text1: qsTr("Ensure both devices are on the same network")
|
|
|
|
}
|
|
|
|
|
|
|
|
GetSyncCodeInstruction {
|
|
|
|
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 desktop device")
|
|
|
|
}
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
2023-08-23 07:09:16 +00:00
|
|
|
GetSyncCodeInstruction {
|
2023-10-03 13:31:54 +00:00
|
|
|
order: "3."
|
2023-08-23 07:09:16 +00:00
|
|
|
text1: qsTr("Open")
|
|
|
|
icon: "settings"
|
|
|
|
text2: {
|
|
|
|
if (root.purpose === SyncingCodeInstructions.Purpose.KeypairSync) {
|
|
|
|
return qsTr("Settings / Wallet")
|
|
|
|
}
|
|
|
|
return qsTr("Settings")
|
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
|
|
|
}
|
|
|
|
|
2023-08-23 07:09:16 +00:00
|
|
|
GetSyncCodeInstruction {
|
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("Click")
|
|
|
|
}
|
|
|
|
return qsTr("Navigate to the")
|
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 QR of key pairs on this device")
|
2023-08-23 07:09:16 +00:00
|
|
|
}
|
|
|
|
return qsTr("Syncing tab")
|
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
|
|
|
}
|
|
|
|
|
2023-08-23 07:09:16 +00:00
|
|
|
GetSyncCodeInstruction {
|
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("Click")
|
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("Setup Syncing")
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-23 07:09:16 +00:00
|
|
|
GetSyncCodeInstruction {
|
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 ""
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-23 07:09:16 +00:00
|
|
|
GetSyncCodeInstruction {
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|