mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added success/failure banner and fixed instance status
This commit is contained in:
@@ -474,9 +474,10 @@ class DCSInstance {
|
||||
logger.log(`Editing completed successfully`);
|
||||
hidePopup();
|
||||
|
||||
getManager().options.mode === "basic"? getManager().menuPage.show(): getManager().instancesPage.show();
|
||||
getManager().options.mode === "basic"? getManager().settingsPage.show(): getManager().instancesPage.show();
|
||||
} catch (err) {
|
||||
logger.log(`An error occurred during editing: ${err}`);
|
||||
getManager().getActiveInstance().error = true;
|
||||
hidePopup();
|
||||
showErrorPopup(`A critical error occurred, check ${getManager().options.logLocation} for more info.`)
|
||||
}
|
||||
|
||||
@@ -359,12 +359,19 @@ class Manager {
|
||||
/* When the back button of a wizard page is clicked */
|
||||
onBackClicked() {
|
||||
this.activePage.hide();
|
||||
|
||||
/* If we have backed to the menu, instances or settings page, reset the active instance */
|
||||
if ([this.instancesPage, this.settingsPage].includes(this.activePage.previousPage)) {
|
||||
delete this.options.activeInstance;
|
||||
}
|
||||
|
||||
this.activePage.previousPage.show(true); // Don't change the previous page
|
||||
this.updateInstances();
|
||||
}
|
||||
|
||||
onCancelClicked() {
|
||||
this.activePage.hide();
|
||||
delete this.options.activeInstance;
|
||||
if (this.options.mode === "basic")
|
||||
this.menuPage.show(true);
|
||||
else
|
||||
@@ -606,7 +613,7 @@ class Manager {
|
||||
document.getElementById("loader").style.opacity = "0%";
|
||||
window.setTimeout(() => {
|
||||
document.getElementById("loader").classList.add("hide");
|
||||
}, 200);
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,20 +40,17 @@ class ManagerPage {
|
||||
this.element.style.opacity = "0%";
|
||||
window.setTimeout(() => {
|
||||
this.element.classList.add("hide");
|
||||
}, 200);
|
||||
}, 250);
|
||||
}
|
||||
|
||||
render(str) {
|
||||
this.element.innerHTML = str;
|
||||
this.element.style.opacity = "0%";
|
||||
|
||||
window.setTimeout(() => {
|
||||
this.element.classList.remove("hide");
|
||||
}, 200)
|
||||
|
||||
this.element.classList.remove("hide");
|
||||
window.setTimeout(() => {
|
||||
this.element.style.opacity = "100%";
|
||||
}, 300)
|
||||
}, 0)
|
||||
|
||||
/* Connect all the collapsable buttons */
|
||||
let buttons = document.querySelectorAll(".button.collapse");
|
||||
|
||||
@@ -97,7 +97,7 @@ function hidePopup() {
|
||||
window.setTimeout(() => {
|
||||
document.getElementById("grayout").classList.add("hide");
|
||||
document.getElementById("popup").classList.add("hide");
|
||||
}, 200);
|
||||
}, 250);
|
||||
}
|
||||
|
||||
function setPopupLoadingProgress(message, percent) {
|
||||
|
||||
Reference in New Issue
Block a user