Qml/Main: add install dialog
This commit is contained in:
parent
53f0341d98
commit
e7d487c180
1 changed files with 17 additions and 1 deletions
|
|
@ -39,13 +39,14 @@ Kirigami.ApplicationWindow {
|
|||
selectedNameFilter.index: 0
|
||||
|
||||
onAccepted: {
|
||||
installInfoDialog.open();
|
||||
QModInstaller.statusChanged.connect(() => {
|
||||
switch (QModInstaller.status) {
|
||||
case "initialized":
|
||||
if (QModInstaller.installed) {
|
||||
installInfoMessage.text = "This mod is already installed!";
|
||||
installInfoDialog.open();
|
||||
} else {
|
||||
installDialog.open();
|
||||
}
|
||||
break;
|
||||
case "NoModExceptionError":
|
||||
|
|
@ -62,6 +63,21 @@ Kirigami.ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
Kirigami.Dialog {
|
||||
id: installDialog
|
||||
title: "Installing…"
|
||||
// standardButtons: Kirigami.Dialog.Ok
|
||||
closePolicy: Controls.Popup.NoAutoClose
|
||||
showCloseButton: false
|
||||
padding: Kirigami.Units.largeSpacing
|
||||
Kirigami.LoadingPlaceholder {
|
||||
// Layout.alignment: Qt.AlignCenter
|
||||
anchors.centerIn: parent
|
||||
determinate: false
|
||||
text: "Unpacking…"
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.Dialog {
|
||||
id: installInfoDialog
|
||||
title: "Add mod"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue