2023-03-14 02:52:16 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
import shared.views 1.0
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import "../stores"
|
|
|
|
import "../../Profile/stores"
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property StartupStore startupStore
|
|
|
|
|
|
|
|
implicitWidth: layout.implicitWidth
|
|
|
|
implicitHeight: layout.implicitHeight
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
readonly property bool finished: startupStore.localPairingState === Constants.LocalPairingState.Finished
|
2024-10-02 13:54:35 +00:00
|
|
|
readonly property bool pairingFailed: startupStore.localPairingState === Constants.LocalPairingState.Error
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: layout
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
2024-10-02 13:54:35 +00:00
|
|
|
spacing: 24
|
2023-03-14 02:52:16 +00:00
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 22
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
text: qsTr("Sign in by syncing")
|
|
|
|
}
|
|
|
|
|
2023-08-15 07:45:12 +00:00
|
|
|
SyncingDeviceView {
|
2023-03-14 02:52:16 +00:00
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
|
|
|
localPairingState: startupStore.localPairingState
|
|
|
|
localPairingError: startupStore.localPairingError
|
|
|
|
|
|
|
|
userDisplayName: startupStore.localPairingName
|
|
|
|
userImage: startupStore.localPairingImage
|
|
|
|
userColorId: startupStore.localPairingColorId
|
|
|
|
userColorHash: startupStore.localPairingColorHash
|
|
|
|
|
2023-04-29 10:33:08 +00:00
|
|
|
installationId: startupStore.localPairingInstallationId
|
|
|
|
installationName: startupStore.localPairingInstallationName
|
|
|
|
installationDeviceType: startupStore.localPairingInstallationDeviceType
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
|
2024-10-02 13:54:35 +00:00
|
|
|
StatusButton {
|
|
|
|
visible: d.pairingFailed
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
text: qsTr("Use recovery phrase")
|
|
|
|
onClicked: root.startupStore.doSecondaryAction()
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusFlatButton {
|
|
|
|
visible: d.pairingFailed
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
text: qsTr("Try again")
|
|
|
|
onClicked: root.startupStore.doTertiaryAction()
|
|
|
|
}
|
|
|
|
|
2023-03-14 02:52:16 +00:00
|
|
|
StatusButton {
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
text: qsTr("Sign in")
|
|
|
|
opacity: d.finished ? 1 : 0
|
|
|
|
enabled: d.finished
|
2023-06-01 08:15:51 +00:00
|
|
|
|
2023-03-14 02:52:16 +00:00
|
|
|
Behavior on opacity {
|
|
|
|
NumberAnimation { duration: 250 }
|
|
|
|
}
|
2023-06-01 08:15:51 +00:00
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
root.startupStore.doPrimaryAction()
|
|
|
|
}
|
2023-03-14 02:52:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|