mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added config page and loading bars
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<div id="connections-page">
|
||||
<div class="instructions">
|
||||
<div class="step">
|
||||
Step 3 of 4
|
||||
Step <%= singleInstance? "3": "4" %> of <%= singleInstance? "4": "5" %>
|
||||
</div>
|
||||
<div class="title">
|
||||
Manually set Olympus port and address settings
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div>
|
||||
<div class="instructions">
|
||||
<div class="step">
|
||||
Step 2 of 4
|
||||
Step <%= singleInstance? "2": "3" %> of <%= singleInstance? "4": "5" %>
|
||||
</div>
|
||||
<div class="title">
|
||||
Do you want to set port and address settings?
|
||||
@@ -15,10 +15,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="wizard-inputs">
|
||||
<div class="button radio auto selected" onclick="signal('onConnectionsTypeClicked', 'auto')">
|
||||
<div class="button radio auto <%= activeInstance.connectionsType === 'auto'? 'selected': '' %>" onclick="signal('onConnectionsTypeClicked', 'auto')">
|
||||
Auto apply settings
|
||||
</div>
|
||||
<div class="button radio manual" onclick="signal('onConnectionsTypeClicked', 'manual')">
|
||||
<div class="button radio manual <%= activeInstance.connectionsType !== 'auto'? 'selected': '' %>" onclick="signal('onConnectionsTypeClicked', 'manual')">
|
||||
Manually set
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div>
|
||||
<div class="instructions">
|
||||
<div class="step">
|
||||
Step 1 of 4
|
||||
Step 1 of <%= singleInstance? "4": "5" %>
|
||||
</div>
|
||||
<div class="title">
|
||||
Which DCS instance you want to add Olympus to?
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div id="passwords-page">
|
||||
<div class="instructions">
|
||||
<div class="step">
|
||||
Step 4 of 4
|
||||
Step <%= singleInstance? "4": "5" %> of <%= singleInstance? "4": "5" %>
|
||||
</div>
|
||||
<div class="title">
|
||||
Enter your passwords for Olympus
|
||||
|
||||
263
manager/ejs/settings.ejs
Normal file
263
manager/ejs/settings.ejs
Normal file
@@ -0,0 +1,263 @@
|
||||
<style>
|
||||
#manager-settings .scroll-container {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
max-width: 100% !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#manager-settings .scrollable {
|
||||
display: flex;
|
||||
row-gap: 15px;
|
||||
column-gap: 15px;
|
||||
height: fit-content;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
padding: 15px 40px;
|
||||
}
|
||||
|
||||
#manager-settings .option {
|
||||
background-color: var(--darkgray);
|
||||
width: 48%;
|
||||
color: white;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
padding: 15px;
|
||||
align-items: center;
|
||||
border-radius: 5px;
|
||||
border-left: 5px solid var(--blue);
|
||||
flex-direction: column;
|
||||
row-gap: 25px;
|
||||
}
|
||||
|
||||
#manager-settings .option:not(.installed) {
|
||||
background-color: var(--background-disabled);
|
||||
}
|
||||
|
||||
#manager-settings .option:not(.installed) .info {
|
||||
opacity: 50%;
|
||||
}
|
||||
|
||||
#manager-settings .option:not(.installed) .server-data {
|
||||
opacity: 50%;
|
||||
}
|
||||
|
||||
#manager-settings .button.cancel {
|
||||
position: absolute;
|
||||
left: 110px;
|
||||
top: 130px;
|
||||
}
|
||||
|
||||
#manager-settings .server-data {
|
||||
display: flex;
|
||||
column-gap: 15px;
|
||||
row-gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#manager-settings .server-status {
|
||||
font-weight: 600;
|
||||
font-size: 15;
|
||||
display: flex;
|
||||
column-gap: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#manager-settings .server-status::before {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-radius: 999px;
|
||||
background-color: var(--gray);
|
||||
}
|
||||
|
||||
#manager-settings .server-status.offline {
|
||||
color: var(--gray)
|
||||
}
|
||||
|
||||
#manager-settings .server-status.offline::before {
|
||||
background-color: var(--gray);
|
||||
}
|
||||
|
||||
#manager-settings .server-status.online {
|
||||
color: var(--green)
|
||||
}
|
||||
|
||||
#manager-settings .server-status.online::before {
|
||||
background-color: var(--green);
|
||||
}
|
||||
|
||||
#manager-settings .server-status.backend {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
#manager-settings .server-data-entry {
|
||||
display: flex;
|
||||
column-gap: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#manager-settings .server-data-entry span:nth-child(2) {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#manager-settings .server-data-entry span:nth-child(3) {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info>span:nth-child(1) {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info>span:nth-child(2) {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--lightgray);
|
||||
}
|
||||
|
||||
#manager-settings .instance-info>span:nth-child(2).installed {
|
||||
font-weight: 600;
|
||||
color: var(--green);
|
||||
}
|
||||
|
||||
#manager-settings .instance-info>span:nth-child(2).error {
|
||||
font-weight: 600;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info>span:nth-child(3) {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
color: var(--lightgray);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 8px;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info>span:nth-child(4) {
|
||||
display: flex;
|
||||
column-gap: 10px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#manager-settings .instance-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
column-gap: 10px;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info .info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info .info>div:nth-child(1) {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info .info>div:nth-child(2) {
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#manager-settings .instance-info .divider {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#manager-settings .start, #manager-settings .open-browser {
|
||||
margin-right: auto;
|
||||
color: var(--offwhite);
|
||||
background-color: var(--blue);
|
||||
}
|
||||
|
||||
#manager-settings .start {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
#manager-settings .start>div {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
#manager-settings .edit,
|
||||
#manager-settings .install,
|
||||
#manager-settings .uninstall,
|
||||
#manager-settings .stop {
|
||||
color: var(--offwhite);
|
||||
background-color: transparent;
|
||||
border: 1px solid var(--offwhite);
|
||||
}
|
||||
|
||||
#manager-settings .edit:hover,
|
||||
#manager-settings .install:hover,
|
||||
#manager-settings .uninstall:hover,
|
||||
#manager-settings .stop:hover {
|
||||
color: var(--background);
|
||||
background-color: var(--offwhite);
|
||||
}
|
||||
|
||||
#manager-settings .install {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="manager-settings" style="margin-bottom: 10px;">
|
||||
<div class="content">
|
||||
<div class="instructions" style="display: flex; flex-direction: column; row-gap: 10px; align-items: center; padding: 20px;">
|
||||
<span style="color: var(--offwhite); font-size: 18px; font-weight: 600;">
|
||||
View and manage installs
|
||||
</span>
|
||||
<span style="color: var(--offwhite); font-size: 14px; text-align: center;">
|
||||
The following DCS installations have been identified. <br>You can modify settings and uninstall below.
|
||||
</span>
|
||||
</div>
|
||||
<div class="scroll-container">
|
||||
<div class="scrollable">
|
||||
<% for (let i = 0; i < instances.length; i++) {%>
|
||||
<% if (instances[i].installed) { %>
|
||||
<div class="option <%= instances[i].installed? 'installed': '' %>" data-folder="<%= instances[i].folder %>">
|
||||
<div class="instance-info">
|
||||
<span><%= instances[i].name %></span>
|
||||
<span><img src="./icons/folder-open-solid.svg"> <%= instances[i].folder %></span>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; flex-direction: column; row-gap: 5px;">
|
||||
<div class="info">
|
||||
<div>Client port</div>
|
||||
<div> <%= instances[i].installed? instances[i].clientPort: "N/A" %> </div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div>Backend port</div>
|
||||
<div> <%= instances[i].installed? instances[i].backendPort: "N/A" %> </div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div>Backend address</div>
|
||||
<div> <%= instances[i].installed? instances[i].backendAddress: "N/A" %> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="instance-buttons">
|
||||
<div class="button edit" onclick="signal('onEditClicked', '<%= instances[i].name %>')">Edit settings</div>
|
||||
<div class="button uninstall" onclick="signal('onUninstallClicked', '<%= instances[i].name %>')">Uninstall Olympus</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,7 +4,7 @@
|
||||
<div>
|
||||
<div class="instructions">
|
||||
<div class="step">
|
||||
Step 1 of 4
|
||||
Step <%= singleInstance? "1": "2" %> of <%= singleInstance? "4": "5" %>
|
||||
</div>
|
||||
<div class="title">
|
||||
Do you want to add Olympus for singleplayer or multiplayer?
|
||||
@@ -15,10 +15,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="wizard-inputs">
|
||||
<div class="button radio singleplayer selected" onclick="signal('onInstallTypeClicked', 'singleplayer')">
|
||||
<div class="button radio singleplayer <%= activeInstance.installationType === 'singleplayer'? 'selected': '' %>" onclick="signal('onInstallTypeClicked', 'singleplayer')">
|
||||
Singleplayer
|
||||
</div>
|
||||
<div class="button radio multiplayer" onclick="signal('onInstallTypeClicked', 'multiplayer')">
|
||||
<div class="button radio multiplayer <%= activeInstance.installationType !== 'singleplayer'? 'selected': '' %>" onclick="signal('onInstallTypeClicked', 'multiplayer')">
|
||||
Multiplayer
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
flex-direction: column;
|
||||
row-gap: 30px;
|
||||
padding: 60px 120px;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.buttons-footer {
|
||||
@@ -34,6 +35,11 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content {
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.content > div {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user