mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Minor refactoring of css, fixed graphical inconsistencies
This commit is contained in:
@@ -466,11 +466,11 @@ class DCSInstance {
|
||||
showWaitLoadingPopup(`<span>Please wait while Olympus is being edited in <i>${this.name}</i></span>`);
|
||||
try {
|
||||
setPopupLoadingProgress("Applying configuration...", 0);
|
||||
await sleep(100);
|
||||
await sleep(500);
|
||||
await applyConfiguration(getManager().getActiveInstance().folder, getManager().getActiveInstance());
|
||||
|
||||
setPopupLoadingProgress("Editing completed!", 100);
|
||||
await sleep(500);
|
||||
await sleep(1500);
|
||||
logger.log(`Editing completed successfully`);
|
||||
hidePopup();
|
||||
|
||||
@@ -530,9 +530,10 @@ class DCSInstance {
|
||||
*
|
||||
*/
|
||||
async uninstall() {
|
||||
showConfirmPopup("<div style='font-size: 18px; max-width: 100%; margin-bottom: 15px;'> Are you sure you want to remove Olympus? </div> If you click Accept, the Olympus mod will be removed from your DCS installation.", async () => {
|
||||
showConfirmPopup(`<div style='max-width: 100%; font-size: var(--big);'> Are you sure you want to remove Olympus from ${this.name}? </div> <div style="font-weight: normal;">This will only remove Olympus for this particular DCS instance.</div>`, async () => {
|
||||
try {
|
||||
logger.log(`Uninstalling Olympus from ${this.folder}`)
|
||||
await sleep(300);
|
||||
showWaitLoadingPopup(`<span>Please wait while Olympus is being removed from <i>${this.name}</i></span>`);
|
||||
setPopupLoadingProgress("Deleting mod folder...", 0);
|
||||
await sleep(100);
|
||||
|
||||
@@ -99,12 +99,14 @@ class Manager {
|
||||
return instance.installed && instance.error;
|
||||
})) {
|
||||
/* Ask the user for confirmation */
|
||||
showConfirmPopup("<div style='font-size: 18px; max-width: 100%;'>One or more of your Olympus instances are not up to date! </div> If you have just updated Olympus this is normal. Press Accept and the Manager will update your instances for you. <br> Press Close to update your instances manually using the Installation Wizard", async () => {
|
||||
showConfirmPopup("<div style='font-size: var(--very-large); max-width: 100%;'>One or more of your Olympus instances are not up to date! </div> If you have just updated Olympus this is normal. Press Accept and the Manager will update your instances for you. <br> Press Close to update your instances manually using the Installation Wizard", async () => {
|
||||
try {
|
||||
await sleep(300);
|
||||
await DCSInstance.fixInstances();
|
||||
location.reload();
|
||||
} catch (err) {
|
||||
logger.error(err);
|
||||
await sleep(300);
|
||||
showErrorPopup(`An error occurred while trying to fix your installations. Please reinstall Olympus manually. <br><br> You can find more info in ${this.options.logLocation}`);
|
||||
}
|
||||
})
|
||||
@@ -220,7 +222,7 @@ class Manager {
|
||||
this.activePage.hide()
|
||||
this.typePage.show();
|
||||
} else {
|
||||
showConfirmPopup("<div style='font-size: 18px; max-width: 100%; margin-bottom: 8px;'> Olympus is already installed in this instance! </div> If you click Accept, it will be installed again and all changes, e.g. custom databases or mods support, will be lost. Are you sure you want to continue?",
|
||||
showConfirmPopup("<div style='font-size: var(--large); max-width: 100%;'> Olympus is already installed in this instance! </div> <div style='font-weight: normal'>If you click Accept, it will be installed again and all changes, e.g. custom databases or mods support, will be lost. Are you sure you want to continue?</div>",
|
||||
() => {
|
||||
this.activePage.hide()
|
||||
this.typePage.show();
|
||||
@@ -286,7 +288,7 @@ class Manager {
|
||||
/* Choose which page to show depending on the active page */
|
||||
if (this.activePage == this.folderPage) {
|
||||
if (this.options.activeInstance.installed) {
|
||||
showConfirmPopup("<div style='font-size: 18px; max-width: 100%; margin-bottom: 8px;'> Olympus is already installed in this instance! </div> If you click Accept, it will be installed again and all changes, e.g. custom databases or mods support, will be lost. Are you sure you want to continue?",
|
||||
showConfirmPopup("<div style='font-size: var(--large); max-width: 100%;'> Olympus is already installed in this instance! </div> <div style='font-weight: normal'>If you click Accept, it will be installed again and all changes, e.g. custom databases or mods support, will be lost. Are you sure you want to continue?</div>",
|
||||
() => {
|
||||
this.activePage.hide()
|
||||
this.typePage.show();
|
||||
|
||||
@@ -71,7 +71,7 @@ async function updateOlympusBeta() {
|
||||
const date1 = new Date(artifact.updated_at);
|
||||
const date2 = fs.statSync(".").mtime;
|
||||
if (date1 > date2) {
|
||||
showConfirmPopup(`<span style="font-size: 18px; max-width: 100%; margin-bottom: 15px;">Looks like you are running a beta version of Olympus!</span><span>Latest beta artifact timestamp of: <i style="color: orange">${date1.toLocaleString()}</i> <br> Your installation timestamp: <i style="color: orange">${date2.toLocaleString()}</i> <br><br> Do you want to update to the newest beta version?</span>`, () => {
|
||||
showConfirmPopup(`<span style="font-size: var(--very-large); max-width: 100%; margin-bottom: 15px;">Looks like you are running a beta version of Olympus!</span><span>Latest beta artifact timestamp of: <i style="color: orange">${date1.toLocaleString()}</i> <br> Your installation timestamp: <i style="color: orange">${date2.toLocaleString()}</i> <br><br> Do you want to update to the newest beta version?</span>`, () => {
|
||||
/* Run the browser and download the artifact */ //TODO: try and directly download the file from code rather than using the browser
|
||||
exec(`start https://github.com/Pax1601/DCSOlympus/actions/runs/${artifact.workflow_run.id}/artifacts/${artifact.id}`)
|
||||
showConfirmPopup('A browser window was opened to download the beta artifact. Please wait for the download to complete, then press "Accept" and select the downloaded beta artifact.',
|
||||
|
||||
Reference in New Issue
Block a user