-
+
+
View and manage installs
-
+
The following DCS installations have been identified.
You can start an Olympus server, modify settings and uninstall below.
@@ -241,10 +232,6 @@
You can start an Olympus server, modify settings and uninstall below.
<%= instances[i].name %>
-
- <%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %>
-
-
<%= instances[i].folder %>
Load: 0
+
-
<% } %>
diff --git a/manager/ejs/menu.ejs b/manager/ejs/menu.ejs
index 1ee05ae8..6ae35c4b 100644
--- a/manager/ejs/menu.ejs
+++ b/manager/ejs/menu.ejs
@@ -80,13 +80,13 @@
ACTIVE
OFFLINE
@@ -254,34 +241,42 @@
-
- Client port
- <%= instances[i].installed? instances[i].clientPort: "N/A" %>
-
-
- Backend port
- <%= instances[i].installed? instances[i].backendPort: "N/A" %>
-
-
<%= instances[i].folder %>
+
Backend address
- <%= instances[i].installed? instances[i].backendAddress: "N/A" %>
+
+
+ <%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %>
+
+
+
+
+ Client port
+ <%= instances[i].installed? instances[i].clientPort: "N/A" %>
+
+
+ Backend port
+ <%= instances[i].installed? instances[i].backendPort: "N/A" %>
+
+
Backend address
+ <%= instances[i].installed? instances[i].backendAddress: "N/A" %>
+
Start Olympus
-
-
Start server
- Start client
+ Start server
+ Start client
Edit settings
- Install Olympus
- Uninstall Olympus
- Open in browser
- Stop Olympus
+ Edit settings
+ Install Olympus
+ Uninstall Olympus
+ Open in browser
+ Stop Olympus
-
+
Add Olympus
-
Add or update Olympus to a new DCS instance
+
diff --git a/manager/ejs/result.ejs b/manager/ejs/result.ejs
index 2a3c60d8..27dccdb7 100644
--- a/manager/ejs/result.ejs
+++ b/manager/ejs/result.ejs
@@ -4,7 +4,6 @@
flex-direction: column;
row-gap: 30px;
padding: 60px 120px;
- color: var(--offwhite);
}
#result-page .result-summary {
@@ -29,11 +28,6 @@
font-size: 13px;
}
- #result-page .result-summary.wait{
- color: var(--offwhite);
- border: 1px solid var(--offwhite);
- }
-
#result-page .result-summary.success{
color: var(--background-color);
background-color: var(--green);
@@ -44,6 +38,13 @@
background-color: var(--red);
}
+ #result-page .instructions-group {
+ display: flex;
+ color: var(--offwhite);
+ flex-direction: column;
+ row-gap: 15px;
+ }
+
#result-page .usage-instructions {
background-color: var(--background-usage);
border-radius: 10px;
@@ -75,47 +76,67 @@
}
Change settings
Adjust port, address and password settings
diff --git a/manager/ejs/passwords.ejs b/manager/ejs/passwords.ejs
index 1054257b..91d0d69f 100644
--- a/manager/ejs/passwords.ejs
+++ b/manager/ejs/passwords.ejs
@@ -19,19 +19,22 @@
Game Master Password
-
+ ">
Blue Commander Password
-
+ ">
Red Commander Password
-
+ ">
+
+ " style="color: var(--offwhite); font-size: 14px; color: var(--lightgray);">
+ Note: to keep the old passwords, click Next without editing any value.
-
An error occurred while adding Olympus to <%= activeInstance["name"] %>
-
-
Please wait while Olympus is being added to <%= activeInstance["name"] %>
-
-
Olympus successfully added to <%= activeInstance["name"] %>
+
Olympus successfully added to <%= activeInstance["name"] %>
See the DCS Olympus Wiki for more information on how to use Olympus and for troubleshooting issues. You may now close the installer.
See the manager log located in TODO for more information.
- How to launch Olympus
-
-
- To launch Olympus, there are shortcuts available in the DCS Olympus folder under Saved Games.
-
-
-
-
-
- Launch the Olympus Server via the shortcut in DCS Olympus / Saved Games.
-
+
+
-
+ How to launch Olympus
-
-
-
-
- Visit http://localhost:3000 in a web browser (Google Chrome recommended).
-
+
+ To launch Olympus, there are shortcuts available in the DCS Olympus folder under Saved Games.
-
-
-
-
- Launch DCS, load a mission and unpause the game. Enjoy!
+ <% if (activeInstance["installationType"] === "singleplayer") { %>
+
-
+
+
-
+
+
+
+ Launch the Olympus Client via the shortcut in DCS Olympus / Saved Games.
+
+
+
+
+ Launch DCS, load a mission and unpause the game. Enjoy!
+
+
- Alternatively, you can run the Olympus Client instead to replace the first two steps above.
+
+ Alternatively, you can run the Olympus Server instead and visit http://localhost:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended) to replace the first step above.
+
+ <% } else { %>
+
+
+
+
+
+
+
+
+ Launch the Olympus Server via the shortcut in DCS Olympus / Saved Games.
+
+
+
+
+
+ Visit http://<%= ip %>:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended).
+
+
+
+
+
+ Launch DCS, load a mission and unpause the game. Enjoy!
+
+
+ Note, to access Olympus from this PC, you need to visit http://localhost:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended) instead.
+
+ <% } %>
diff --git a/manager/ejs/wizard.ejs b/manager/ejs/wizard.ejs
index 23d4a6fe..24949b82 100644
--- a/manager/ejs/wizard.ejs
+++ b/manager/ejs/wizard.ejs
@@ -70,8 +70,8 @@
}
-
-
Cancel install
+
+
Cancel install
diff --git a/manager/icons/olympus_white.png b/manager/icons/olympus_white.png
new file mode 100644
index 00000000..7fd37a2b
Binary files /dev/null and b/manager/icons/olympus_white.png differ
diff --git a/manager/javascripts/dcsinstance.js b/manager/javascripts/dcsinstance.js
index b45b19dd..3a688d23 100644
--- a/manager/javascripts/dcsinstance.js
+++ b/manager/javascripts/dcsinstance.js
@@ -9,8 +9,9 @@ const dircompare = require('dir-compare');
const { spawn } = require('child_process');
const find = require('find-process');
const { uninstallInstance, installHooks, installMod, installJSON, applyConfiguration, installShortCuts } = require('./filesystem')
-const { showErrorPopup, showConfirmPopup } = require('./popup')
+const { showErrorPopup, showConfirmPopup, showWaitPopup } = require('./popup')
const { logger } = require("./filesystem")
+const { hidePopup } = require('./popup')
class DCSInstance {
static instances = null;
@@ -81,6 +82,9 @@ class DCSInstance {
fps = 0;
installationType = 'singleplayer';
connectionsType = 'auto';
+ gameMasterPasswordEdited = false;
+ blueCommanderPasswordEdited = false;
+ redCommanderPasswordEdited = false;
constructor(folder) {
this.folder = folder;
@@ -127,7 +131,7 @@ class DCSInstance {
/* Periodically "ping" Olympus to check if either the client or the backend are active */
window.setInterval(async () => {
await this.getData();
- getManager().instancesPage.update();
+ getManager().updateInstances();
}, 1000);
}
@@ -167,6 +171,7 @@ class DCSInstance {
*/
setGameMasterPassword(newPassword) {
this.gameMasterPassword = newPassword;
+ this.gameMasterPasswordEdited = true;
}
/** Set Blue Commander password
@@ -174,6 +179,7 @@ class DCSInstance {
*/
setBlueCommanderPassword(newPassword) {
this.blueCommanderPassword = newPassword;
+ this.blueCommanderPasswordEdited = true;
}
/** Set Red Commander password
@@ -181,6 +187,19 @@ class DCSInstance {
*/
setRedCommanderPassword(newPassword) {
this.redCommanderPassword = newPassword;
+ this.redCommanderPasswordEdited = true;
+ }
+
+ arePasswordsEdited() {
+ return (getManager().getActiveInstance().gameMasterPasswordEdited || getManager().getActiveInstance().blueCommanderPasswordEdited || getManager().getActiveInstance().redCommanderPasswordEdited );
+ }
+
+ arePasswordsSet() {
+ return !(getManager().getActiveInstance().gameMasterPassword === '' || getManager().getActiveInstance().blueCommanderPassword === '' || getManager().getActiveInstance().redCommanderPassword === '');
+ }
+
+ arePasswordsDifferent() {
+ return !(getManager().getActiveInstance().gameMasterPassword === getManager().getActiveInstance().blueCommanderPassword || getManager().getActiveInstance().gameMasterPassword === getManager().getActiveInstance().redCommanderPassword || getManager().getActiveInstance().blueCommanderPassword === getManager().getActiveInstance().redCommanderPassword);
}
/** Check if the client port is free
@@ -372,12 +391,15 @@ class DCSInstance {
}
).then(
() => {
- getManager().resultPage.getElement().querySelector(".result-summary.wait").classList.add("hide");
+ hidePopup();
+ getManager().resultPage.show();
getManager().resultPage.getElement().querySelector(".result-summary.success").classList.remove("hide");
getManager().resultPage.getElement().querySelector(".result-summary.error").classList.add("hide");
+ getManager().resultPage.getElement().querySelector(".instructions-group").classList.remove("hide");
},
() => {
- getManager().resultPage.getElement().querySelector(".result-summary.wait").classList.add("hide");
+ hidePopup();
+ getManager().resultPage.show();
getManager().resultPage.getElement().querySelector(".result-summary.success").classList.add("hide");
getManager().resultPage.getElement().querySelector(".result-summary.error").classList.remove("hide");
}
@@ -386,7 +408,7 @@ class DCSInstance {
/* Uninstall this instance */
uninstall() {
- showConfirmPopup("
Are you sure you want to remove Olympus?
If you click Accept, the Olympus mod will be removed from your DCS installation.", () =>
+ showConfirmPopup(" Are you sure you want to remove Olympus?
If you click Accept, the Olympus mod will be removed from your DCS installation.", () =>
uninstallInstance(this.folder, this.name).then(
() => {
location.reload();
diff --git a/manager/javascripts/manager.js b/manager/javascripts/manager.js
index 769489c0..9406bcb6 100644
--- a/manager/javascripts/manager.js
+++ b/manager/javascripts/manager.js
@@ -8,6 +8,8 @@ const { logger } = require("./filesystem")
const ManagerPage = require("./managerpage");
const WizardPage = require("./wizardpage");
+const { fetchWithTimeout } = require("./net");
+const { exec } = require("child_process");
class Manager {
options = {
@@ -26,7 +28,6 @@ class Manager {
instancesPage = null;
constructor() {
- console.log("constructor")
document.addEventListener("signal", (ev) => {
const callback = ev.detail.callback;
const params = JSON.stringify(ev.detail.params);
@@ -74,6 +75,16 @@ class Manager {
/* Get the list of DCS instances */
this.options.instances = await DCSInstance.getInstances();
+ /* Get my public IP */
+ this.getPublicIP().then(
+ (ip) => {
+ this.options.ip = ip;
+ },
+ () => {
+ this.options.ip = undefined;
+ }
+ )
+
/* Check if there are corrupted or outdate instances */
if (this.options.instances.some((instance) => {
return instance.installed && instance.error;
@@ -110,7 +121,7 @@ class Manager {
this.connectionsPage = new WizardPage(this, "./ejs/connections.ejs");
this.passwordsPage = new WizardPage(this, "./ejs/passwords.ejs");
this.resultPage = new ManagerPage(this, "./ejs/result.ejs");
- //this.instancesPage = new InstancesPage(this);
+ this.instancesPage = new ManagerPage(this, "./ejs/instances.ejs");
if (this.options.mode === "basic") {
/* In basic mode no dashboard is shown */
@@ -118,6 +129,7 @@ class Manager {
} else {
/* In Expert mode we go directly to the dashboard */
this.instancesPage.show();
+ this.updateInstances();
}
}
}
@@ -157,7 +169,7 @@ class Manager {
}
/* When the install button is clicked go the installation page */
- onInstallClicked() {
+ onInstallMenuClicked() {
this.options.install = true;
if (this.options.singleInstance) {
@@ -168,7 +180,7 @@ class Manager {
this.menuPage.hide();
this.typePage.show();
} else {
- showConfirmPopup(" Olympus is already installed in this instance!
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(" Olympus is already installed in this instance!
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?",
() => {
this.menuPage.hide();
this.typePage.show();
@@ -183,8 +195,8 @@ class Manager {
}
/* When the edit button is clicked go to the instances page */
- onEditClicked() {
- this.hide();
+ onEditMenuClicked() {
+ this.instancesPage.hide();
this.options.install = false;
if (this.options.singleInstance) {
@@ -215,25 +227,20 @@ class Manager {
showErrorPopup("A critical error has occurred. Please restart the Manager.")
}
- /* When the back button of a wizard page is clicked */
- onBackClicked() {
- this.activePage.hide();
- this.activePage.previousPage.show();
- }
-
/* When the next button of a wizard page is clicked */
onNextClicked() {
- this.activePage.hide();
-
/* Choose which page to show depending on the active page */
if (this.activePage == this.typePage) {
+ this.activePage.hide();
this.connectionsTypePage.show();
} else if (this.activePage == this.connectionsTypePage) {
if (this.options.activeInstance) {
if (this.options.activeInstance.connectionsType === 'auto') {
+ this.activePage.hide();
this.passwordsPage.show();
}
else {
+ this.activePage.hide();
this.connectionsPage.show();
this.setPort('client', this.options.activeInstance.clientPort);
this.setPort('backend', this.options.activeInstance.backendPort);
@@ -243,17 +250,79 @@ class Manager {
showErrorPopup("A critical error has occurred. Please restart the Manager.")
}
} else if (this.activePage == this.connectionsPage) {
+ this.activePage.hide();
this.passwordsPage.show();
} else if (this.activePage == this.passwordsPage) {
if (this.options.activeInstance) {
- this.options.activeInstance.install();
- this.resultPage.show();
+ if (this.options.activeInstance.installed && !this.options.activeInstance.arePasswordsEdited()) {
+ this.activePage.hide();
+ this.options.activeInstance.install();
+ showWaitPopup(`Please wait while Olympus is being installed in ${this.options.activeInstance.name}`);
+ }
+ else {
+ if (!this.options.activeInstance.arePasswordsSet()) {
+ showErrorPopup('Please, make sure all passwords are set!');
+ } else if (!this.options.activeInstance.arePasswordsDifferent()) {
+ showErrorPopup('Please, set different passwords for the Game Master, Blue Commander, and Red Commander roles!');
+ } else {
+ this.activePage.hide();
+ this.options.activeInstance.install();
+ showWaitPopup(`Please wait while Olympus is being installed in ${this.options.activeInstance.name}`);
+ }
+ }
} else {
showErrorPopup("A critical error has occurred. Please restart the Manager.")
}
}
}
+ /* When the back button of a wizard page is clicked */
+ onBackClicked() {
+ this.activePage.hide();
+ this.activePage.previousPage.show(true); // Don't change the previous page
+ this.updateInstances();
+ }
+
+ onCancelClicked() {
+ location.reload();
+ }
+
+ onGameMasterPasswordChanged(value) {
+ if (this.options.activeInstance) {
+ this.options.activeInstance.setGameMasterPassword(value);
+ if (!this.options.activeInstance.blueCommanderPasswordEdited)
+ this.passwordsPage.getElement().querySelector(".blue-commander input").value = "";
+ if (!this.options.activeInstance.redCommanderPasswordEdited)
+ this.passwordsPage.getElement().querySelector(".red-commander input").value = "";
+ }
+ else
+ showErrorPopup("A critical error has occurred. Please restart the Manager.")
+ }
+
+ onBlueCommanderPasswordChanged(value) {
+ if (this.options.activeInstance) {
+ this.options.activeInstance.setBlueCommanderPassword(value);
+ if (!this.options.activeInstance.gameMasterPasswordEdited)
+ this.passwordsPage.getElement().querySelector(".game-master input").value = "";
+ if (!this.options.activeInstance.redCommanderPasswordEdited)
+ this.passwordsPage.getElement().querySelector(".red-commander input").value = "";
+ }
+ else
+ showErrorPopup("A critical error has occurred. Please restart the Manager.")
+ }
+
+ onRedCommanderPasswordChanged(value) {
+ if (this.options.activeInstance) {
+ this.options.activeInstance.setRedCommanderPassword(value);
+ if (!this.options.activeInstance.gameMasterPasswordEdited)
+ this.passwordsPage.getElement().querySelector(".game-master input").value = "";
+ if (!this.options.activeInstance.blueCommanderPasswordEdited)
+ this.passwordsPage.getElement().querySelector(".blue-commander input").value = "";
+ }
+ else
+ showErrorPopup("A critical error has occurred. Please restart the Manager.")
+ }
+
/* When the client port input value is changed */
onClientPortChanged(value) {
this.setPort('client', Number(value));
@@ -272,12 +341,91 @@ class Manager {
} else {
this.options.activeInstance.backendAddress = 'localhost';
}
+ this.connectionsPage.getElement().querySelector(".note.warning").classList.toggle("hide", this.options.activeInstance.backendAddress !== '*')
this.connectionsPage.getElement().querySelector(".backend-address .checkbox").classList.toggle("checked", this.options.activeInstance.backendAddress === '*')
} else {
showErrorPopup("A critical error has occurred. Please restart the Manager.")
}
}
+ /* When the "Return to manager" button is pressed */
+ onReturnClicked() {
+ location.reload();
+ }
+
+ /* When the "Close manager" button is pressed */
+ onCloseManagerClicked() {
+ document.querySelector('.close').click();
+ }
+
+ async onStartServerClicked(name) {
+ this.getClickedInstanceDiv(name).then((div) => div.querySelector(".collapse").classList.add("loading"));
+ this.getClickedInstance(name).then((instance) => instance.startServer());
+ }
+
+ async onStartClientClicked(name) {
+ this.getClickedInstanceDiv(name).then((div) => div.querySelector(".collapse").classList.add("loading"));
+ this.getClickedInstance(name).then(instance => instance.startClient());
+ }
+
+ async onOpenBrowserClicked(name) {
+ this.getClickedInstance(name).then((instance) => exec(`start http://localhost:${instance.clientPort}`));
+ }
+
+ async onStopClicked(name) {
+ this.getClickedInstance(name).then((instance) => instance.stop());
+ }
+
+ async onEditClicked(name) {
+ this.getClickedInstance(name).then((instance) => {
+ if (instance.webserverOnline || instance.backendOnline) {
+ showErrorPopup("Error, the selected Olympus instance is currently active, please stop Olympus before editing it!")
+ } else {
+ this.options.activeInstance = instance;
+ this.instancesPage.hide();
+ this.typePage.show();
+ }
+ });
+ }
+
+ async onInstallClicked(name) {
+ this.getClickedInstance(name).then((instance) => {
+ this.options.activeInstance = instance;
+ this.options.install = true;
+ this.options.singleInstance = false;
+ this.instancesPage.hide();
+ this.typePage.show();
+ });
+ }
+
+ async onUninstallClicked(name) {
+ this.getClickedInstance(name).then((instance) => {
+ instance.webserverOnline || instance.backendOnline ? showErrorPopup("Error, the selected Olympus instance is currently active, please stop Olympus before uninstalling it!") : instance.uninstall();
+ });
+ }
+
+ async getClickedInstance(name) {
+ return DCSInstance.getInstances().then((instances) => {
+ return instances.find((instance) => {
+ return instance.name === name
+ })
+ });
+ }
+
+ async getClickedInstanceDiv(name) {
+ var instance = await this.getClickedInstance(name);
+ console.log(instance)
+ var instanceDivs = this.instancesPage.getElement().querySelectorAll(`.option`);
+ for (let i = 0; i < instanceDivs.length; i++) {
+ var instanceDiv = instanceDivs[i];
+ console.log(instanceDiv.dataset.folder)
+ if (instanceDiv.dataset.folder === instance.folder) {
+ console.log(instanceDiv)
+ return instanceDiv;
+ }
+ }
+ }
+
/* Set the selected port to the dcs instance */
async setPort(port, value) {
var success;
@@ -295,6 +443,49 @@ class Manager {
errorEls[i].classList.toggle("hide", success);
}
}
+
+ async getPublicIP() {
+ const res = await fetchWithTimeout("https://ipecho.io/json", { timeout: 2500 });
+ const data = await res.json();
+ return data.ip;
+ }
+
+ updateInstances() {
+ var instanceDivs = this.instancesPage.getElement().querySelectorAll(`.option`);
+ for (let i = 0; i < instanceDivs.length; i++) {
+ var instanceDiv = instanceDivs[i];
+ var instance = this.options.instances.find((instance) => { return instance.folder === instanceDivs[i].dataset.folder; })
+ if (instance) {
+ instanceDiv.querySelector(".button.install").classList.toggle("hide", instance.installed);
+ instanceDiv.querySelector(".button.start").classList.toggle("hide", !instance.installed);
+ instanceDiv.querySelector(".button.uninstall").classList.toggle("hide", !instance.installed);
+ instanceDiv.querySelector(".button.edit").classList.toggle("hide", !instance.installed);
+
+ if (instance.installed) {
+ if (instanceDiv.querySelector(".webserver.online") !== null) {
+ instanceDiv.querySelector(".webserver.online").classList.toggle("hide", !instance.webserverOnline);
+ instanceDiv.querySelector(".webserver.offline").classList.toggle("hide", instance.webserverOnline);
+ instanceDiv.querySelector(".backend.online").classList.toggle("hide", !instance.backendOnline);
+ instanceDiv.querySelector(".backend.offline").classList.toggle("hide", instance.backendOnline);
+
+ if (this.backendOnline) {
+ instanceDiv.querySelector(".fps .data").innerText = instance.fps;
+ instanceDiv.querySelector(".load .data").innerText = instance.load;
+ }
+
+ instanceDiv.querySelector(".button.start").classList.toggle("hide", instance.webserverOnline);
+ instanceDiv.querySelector(".button.uninstall").classList.toggle("hide", instance.webserverOnline);
+ instanceDiv.querySelector(".button.edit").classList.toggle("hide", instance.webserverOnline);
+ instanceDiv.querySelector(".button.open-browser").classList.toggle("hide", !instance.webserverOnline);
+ instanceDiv.querySelector(".button.stop").classList.toggle("hide", !instance.webserverOnline);
+
+ if (this.webserverOnline)
+ instanceDiv.querySelector(".button.start").classList.remove("loading");
+ }
+ }
+ }
+ }
+ }
}
module.exports = Manager;
\ No newline at end of file
diff --git a/manager/javascripts/managerpage.js b/manager/javascripts/managerpage.js
index e7aad9c5..155544a2 100644
--- a/manager/javascripts/managerpage.js
+++ b/manager/javascripts/managerpage.js
@@ -20,7 +20,7 @@ class ManagerPage {
return this.element;
}
- show(previousPage) {
+ show(ignorePreviousPage) {
ejs.renderFile(this.ejsFile, {...this.options, ...this.manager.options}, {}, (err, str) => {
if (!err) {
this.render(str);
@@ -31,7 +31,7 @@ class ManagerPage {
this.element.classList.remove("hide");
- this.previousPage = this.manager.activePage;
+ this.previousPage = ignorePreviousPage ? this.previousPage : this.manager.activePage;
this.manager.activePage = this;
}
diff --git a/manager/javascripts/preload.js b/manager/javascripts/preload.js
index 058d65a5..aab20ca8 100644
--- a/manager/javascripts/preload.js
+++ b/manager/javascripts/preload.js
@@ -9,7 +9,7 @@ const fs = require('fs');
const AdmZip = require("adm-zip");
const { Octokit } = require('octokit');
const { logger } = require("./filesystem");
-const { getManager } = require('./managerFactory');
+const { getManager } = require('./managerfactory');
const VERSION = "{{OLYMPUS_VERSION_NUMBER}}";
logger.log(`Running in ${__dirname}`);
diff --git a/manager/javascripts/wizardpage.js b/manager/javascripts/wizardpage.js
index 8d7c3978..eeef41c0 100644
--- a/manager/javascripts/wizardpage.js
+++ b/manager/javascripts/wizardpage.js
@@ -12,16 +12,6 @@ class WizardPage extends ManagerPage {
render(str) {
super.render(str);
- /* Connect the back, next and cancel buttons */
- if (this.element.querySelector(".back"))
- this.element.querySelector(".back").addEventListener("click", (e) => this.onBackClicked(e));
-
- if (this.element.querySelector(".next"))
- this.element.querySelector(".next").addEventListener("click", (e) => this.onNextClicked(e));
-
- if (this.element.querySelector(".cancel"))
- this.element.querySelector(".cancel").addEventListener("click", (e) => this.onCancelClicked(e));
-
ejs.renderFile(this.contentEjsFile, {...this.options, ...this.manager.options}, {}, (err, str) => {
if (!err) {
this.element.querySelector(".content").innerHTML = str;
@@ -31,23 +21,6 @@ class WizardPage extends ManagerPage {
});
}
-
- onBackClicked() {
- console.log(this.previousPage)
- this.hide();
- this.previousPage.show()
- }
-
- onCancelClicked() {
- this.hide();
- if (this.manager.options.mode === "basic") {
- /* In basic mode no dashboard is shown */
- this.manager.menuPage.show();
- } else {
- /* In Expert mode we go directly to the dashboard */
- this.manager.instancesPage.show();
- }
- }
}
module.exports = WizardPage;
\ No newline at end of file
diff --git a/manager/old/installations.js b/manager/old/installations.js
index d7bea3c3..f64c0019 100644
--- a/manager/old/installations.js
+++ b/manager/old/installations.js
@@ -48,7 +48,7 @@ class installationPage extends ManagerPage {
this.hide();
this.manager.typePage.show(this);
} else {
- showConfirmPopup(" Olympus is already installed in this instance!
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(" Olympus is already installed in this instance!
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?",
() => {
this.hide();
this.manager.typePage.show(this);
diff --git a/manager/package.json b/manager/package.json
index ec4edcd1..45b8f75c 100644
--- a/manager/package.json
+++ b/manager/package.json
@@ -5,7 +5,7 @@
"main": "main.js",
"scripts": {
"start": "electron .",
- "build-release": "call ./scripts/build-release.bat"
+ "build-release": "call ./scripts/build-release.bat"
},
"author": "",
"license": "ISC",
@@ -26,4 +26,4 @@
"devDependencies": {
"nodemon": "^3.0.2"
}
-}
\ No newline at end of file
+}
diff --git a/manager/stylesheets/style.css b/manager/stylesheets/style.css
index d5b72861..3447f4bd 100644
--- a/manager/stylesheets/style.css
+++ b/manager/stylesheets/style.css
@@ -145,7 +145,7 @@ body {
#loader {
color: var(--offwhite);
- font-size: 20px;
+ font-size: 16px;
font-weight: normal;
position: absolute;
display: flex;
@@ -206,6 +206,11 @@ body {
color: var(--offwhite);
}
+.button.radio.selected {
+ background-color: var(--offwhite);
+ color: var(--background);
+}
+
.button.radio::before {
content: "";
display: block;
@@ -217,6 +222,9 @@ body {
.button.radio.selected::before {
background-color: var(--offwhite);
+ border: 4px solid var(--background);
+ width: 4px;
+ height: 4px;
}
.close-popup {