mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
feat: added admin password and admin modal
This commit is contained in:
@@ -475,7 +475,7 @@ class Manager {
|
||||
}
|
||||
|
||||
async onGameMasterPasswordChanged(value) {
|
||||
for (let input of this.activePage.getElement().querySelectorAll("input[type='password']")) {
|
||||
for (let input of this.activePage.getElement().querySelectorAll("input[type='password'].unique")) {
|
||||
input.placeholder = "";
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ class Manager {
|
||||
}
|
||||
|
||||
async onBlueCommanderPasswordChanged(value) {
|
||||
for (let input of this.activePage.getElement().querySelectorAll("input[type='password']")) {
|
||||
for (let input of this.activePage.getElement().querySelectorAll("input[type='password'].unique")) {
|
||||
input.placeholder = "";
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ class Manager {
|
||||
}
|
||||
|
||||
async onRedCommanderPasswordChanged(value) {
|
||||
for (let input of this.activePage.getElement().querySelectorAll("input[type='password']")) {
|
||||
for (let input of this.activePage.getElement().querySelectorAll("input[type='password'].unique")) {
|
||||
input.placeholder = "";
|
||||
}
|
||||
|
||||
@@ -507,6 +507,13 @@ class Manager {
|
||||
showErrorPopup(`<div class='main-message'>A critical error occurred! </div><div class='sub-message'> Check ${this.getLogLocation()} for more info. </div>`);
|
||||
}
|
||||
|
||||
async onAdminPasswordChanged(value) {
|
||||
if (this.getActiveInstance())
|
||||
this.getActiveInstance().setAdminPassword(value);
|
||||
else
|
||||
showErrorPopup(`<div class='main-message'>A critical error occurred! </div><div class='sub-message'> Check ${this.getLogLocation()} for more info. </div>`);
|
||||
}
|
||||
|
||||
/* When the frontend port input value is changed */
|
||||
async onFrontendPortChanged(value) {
|
||||
this.setPort('frontend', Number(value));
|
||||
|
||||
Reference in New Issue
Block a user