2023-12-27 20:59:22 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-12-26 23:31:55 +00:00
|
|
|
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
|
|
|
|
2024-01-10 19:27:03 +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-10 19:27:03 +00:00
|
|
|
|
2024-01-17 21:57:34 +00:00
|
|
|
Component {
|
|
|
|
id: addAssetForm
|
|
|
|
Forms.AddAsset {
|
|
|
|
onCancel: stack.pop()
|
|
|
|
onSuccess: stack.pop()
|
2023-12-26 23:31:55 +00:00
|
|
|
}
|
|
|
|
}
|
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
|
|
|
|
}
|
2023-12-26 23:31:55 +00:00
|
|
|
}
|