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
|
selectedNameFilter.index: 0
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
installInfoDialog.open();
|
|
||||||
QModInstaller.statusChanged.connect(() => {
|
QModInstaller.statusChanged.connect(() => {
|
||||||
switch (QModInstaller.status) {
|
switch (QModInstaller.status) {
|
||||||
case "initialized":
|
case "initialized":
|
||||||
if (QModInstaller.installed) {
|
if (QModInstaller.installed) {
|
||||||
installInfoMessage.text = "This mod is already installed!";
|
installInfoMessage.text = "This mod is already installed!";
|
||||||
installInfoDialog.open();
|
installInfoDialog.open();
|
||||||
|
} else {
|
||||||
|
installDialog.open();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "NoModExceptionError":
|
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 {
|
Kirigami.Dialog {
|
||||||
id: installInfoDialog
|
id: installInfoDialog
|
||||||
title: "Add mod"
|
title: "Add mod"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue