2023-03-14 02:52:16 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
|
|
|
|
import shared.popups 1.0
|
2023-08-16 09:57:32 +00:00
|
|
|
import shared.views 1.0
|
2023-03-14 02:52:16 +00:00
|
|
|
|
|
|
|
import "../stores"
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property StartupStore startupStore
|
|
|
|
|
|
|
|
implicitWidth: layout.implicitWidth
|
|
|
|
implicitHeight: layout.implicitHeight
|
|
|
|
|
2023-08-21 10:58:21 +00:00
|
|
|
Timer {
|
|
|
|
id: nextStateDelay
|
|
|
|
|
|
|
|
property string connectionString
|
|
|
|
|
|
|
|
interval: 1000
|
|
|
|
repeat: false
|
|
|
|
onTriggered: {
|
|
|
|
root.startupStore.setConnectionString(nextStateDelay.connectionString)
|
|
|
|
root.startupStore.doPrimaryAction()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-16 09:57:32 +00:00
|
|
|
SyncingEnterCode {
|
2023-03-14 02:52:16 +00:00
|
|
|
id: layout
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
width: 400
|
|
|
|
spacing: 24
|
|
|
|
|
2023-08-16 09:57:32 +00:00
|
|
|
validateConnectionString: function(connectionString) {
|
|
|
|
const result = root.startupStore.validateLocalPairingConnectionString(connectionString)
|
|
|
|
return result === ""
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
2023-08-16 09:57:32 +00:00
|
|
|
onProceed: {
|
2023-08-21 10:58:21 +00:00
|
|
|
nextStateDelay.connectionString = connectionString
|
|
|
|
nextStateDelay.start()
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
2023-08-16 09:57:32 +00:00
|
|
|
onDisplayInstructions: {
|
|
|
|
instructionsPopup.open()
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GetSyncCodeInstructionsPopup {
|
|
|
|
id: instructionsPopup
|
|
|
|
}
|
|
|
|
}
|