2026-02-17 11:29:04 +04:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
2026-02-19 08:51:01 +04:00
|
|
|
import QtQuick.Controls
|
2026-02-17 11:29:04 +04:00
|
|
|
import Logos.Controls
|
|
|
|
|
import Logos.Theme
|
|
|
|
|
|
2026-02-19 14:15:16 +04:00
|
|
|
LogosStorageLayout {
|
2026-02-17 11:29:04 +04:00
|
|
|
id: root
|
|
|
|
|
|
2026-02-19 08:51:01 +04:00
|
|
|
property var backend: mockBackend
|
2026-02-17 11:29:04 +04:00
|
|
|
property string status: ""
|
2026-02-19 08:51:01 +04:00
|
|
|
property string title: "Starting your node...."
|
2026-02-17 11:29:04 +04:00
|
|
|
property bool starting: true
|
|
|
|
|
property bool success: false
|
|
|
|
|
|
|
|
|
|
signal back
|
|
|
|
|
signal next
|
|
|
|
|
|
2026-02-19 08:51:01 +04:00
|
|
|
function onNodeStarted() {
|
|
|
|
|
root.starting = false
|
|
|
|
|
root.status = "Logos Storage started successfully."
|
|
|
|
|
root.title = "Success"
|
|
|
|
|
root.success = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
|
id: mockBackend
|
|
|
|
|
|
|
|
|
|
readonly property bool isMock: true
|
|
|
|
|
property string configJson: "{}"
|
|
|
|
|
|
|
|
|
|
signal startCompleted
|
|
|
|
|
signal startFailed
|
|
|
|
|
signal nodeStarted
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Timer {
|
|
|
|
|
interval: 2000
|
|
|
|
|
running: root.backend && root.backend.isMock === true
|
|
|
|
|
onTriggered: {
|
|
|
|
|
console.log("timer triggered")
|
|
|
|
|
root.onNodeStarted()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 11:29:04 +04:00
|
|
|
Connections {
|
|
|
|
|
target: root.backend
|
|
|
|
|
|
|
|
|
|
function onStartCompleted() {
|
2026-02-19 08:51:01 +04:00
|
|
|
console.log("onStartCompleted")
|
|
|
|
|
root.onNodeStarted()
|
2026-02-17 11:29:04 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onStartFailed(error) {
|
|
|
|
|
root.starting = false
|
2026-02-19 08:51:01 +04:00
|
|
|
root.title = "Error"
|
2026-02-17 11:29:04 +04:00
|
|
|
root.status = "Failed to start: " + error
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
2026-02-19 14:15:16 +04:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
anchors.centerIn: parent
|
2026-02-17 11:29:04 +04:00
|
|
|
spacing: Theme.spacing.medium
|
|
|
|
|
|
|
|
|
|
LogosText {
|
|
|
|
|
id: titleText
|
|
|
|
|
font.pixelSize: Theme.typography.titleText
|
2026-02-19 08:51:01 +04:00
|
|
|
text: root.title
|
2026-02-17 11:29:04 +04:00
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LogosText {
|
|
|
|
|
id: statusText
|
|
|
|
|
font.pixelSize: Theme.typography.primaryText
|
|
|
|
|
text: root.status
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LogosStorageButton {
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.bottomMargin: 10
|
|
|
|
|
anchors.leftMargin: 10
|
|
|
|
|
text: "Back"
|
|
|
|
|
onClicked: root.back()
|
|
|
|
|
enabled: root.starting == false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LogosStorageButton {
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
anchors.bottomMargin: 10
|
|
|
|
|
anchors.rightMargin: 10
|
|
|
|
|
text: "Next"
|
|
|
|
|
onClicked: root.next()
|
|
|
|
|
enabled: root.success == true
|
|
|
|
|
}
|
|
|
|
|
}
|