magpie/qml/Application/Root.qml

46 lines
829 B
QML
Raw Normal View History

// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Controls
2024-01-21 19:22:56 +00:00
import magpie
2024-01-17 21:57:34 +00:00
import magpie.Forms as Forms
2024-01-21 19:22:56 +00:00
import magpie.Components as Components
2024-01-17 21:57:34 +00:00
Item {
StackView {
id: stack
initialItem: main
anchors.fill: parent
}
Component {
id: main
Main {
2024-01-17 21:57:34 +00:00
onAddAsset: stack.push(addAssetForm);
}
}
2024-01-17 21:57:34 +00:00
Component {
id: addAssetForm
Forms.AddAsset {
onCancel: stack.pop()
onSuccess: stack.pop()
}
}
2024-01-21 19:22:56 +00:00
Connections {
target: Magpie
function onDisplayError (err) {
modal.status = err;
modal.open();
}
}
Components.Modal {
id: modal
closable: true
}
}