Minor refactoring of css, fixed graphical inconsistencies

This commit is contained in:
Pax1601
2024-01-28 16:37:29 +01:00
parent 4f5023b45c
commit c2f6edfd74
13 changed files with 515 additions and 668 deletions

View File

@@ -22,7 +22,7 @@
#connections-page .error span {
font-weight: 600;
font-size: 12px;
font-size: var(--small);
color: var(--red);
height: fit-content;
}

View File

@@ -1,243 +1,14 @@
<style>
#manager-instances {
height: 100%;
}
#manager-instances .scroll-container {
overflow-y: auto;
max-width: 100% !important;
width: 100%;
height: calc(100% - 120px);
}
#manager-instances .scrollable {
display: flex;
row-gap: 15px;
column-gap: 15px;
height: fit-content;
width: 100%;
flex-wrap: wrap;
padding: 15px 40px;
}
#manager-instances .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;
position: relative;
}
#manager-instances .option:not(.installed) {
background-color: var(--background-disabled);
}
#manager-instances .option:not(.installed) .info {
opacity: 50%;
}
#manager-instances .option:not(.installed) .server-data {
opacity: 50%;
}
#manager-instances .button.cancel {
position: absolute;
left: 110px;
top: 130px;
}
#manager-instances .server-data {
display: flex;
column-gap: 15px;
row-gap: 5px;
flex-wrap: wrap;
}
#manager-instances .server-status {
font-weight: 600;
font-size: 15;
display: flex;
column-gap: 5px;
align-items: center;
}
#manager-instances .server-status::before {
display: block;
content: "";
width: 15px;
height: 15px;
border-radius: 999px;
background-color: var(--gray);
}
#manager-instances .server-status.offline {
color: var(--gray)
}
#manager-instances .server-status.offline::before {
background-color: var(--gray);
}
#manager-instances .server-status.online {
color: var(--green)
}
#manager-instances .server-status.online::before {
background-color: var(--green);
}
#manager-instances .server-status.backend {
margin-left: auto;
}
#manager-instances .server-data-entry {
display: flex;
column-gap: 5px;
align-items: center;
}
#manager-instances .server-data-entry span:nth-child(2) {
font-weight: 600;
}
#manager-instances .server-data-entry span:nth-child(3) {
font-weight: normal;
}
#manager-instances .instance-info {
display: flex;
flex-direction: column;
row-gap: 10px;
width: 100%;
}
#manager-instances .instance-info>span:nth-child(1) {
font-size: 18px;
font-weight: 600;
}
#manager-instances .instance-info>span:nth-child(2) {
font-size: 13px;
font-weight: 600;
color: var(--lightgray);
}
#manager-instances .instance-info>span:nth-child(2).installed {
font-weight: 600;
color: var(--green);
}
#manager-instances .instance-info>span:nth-child(2).error {
font-weight: 600;
color: orange;
}
#manager-instances .instance-info>span:nth-child(3) {
font-size: 13px;
font-weight: normal;
color: var(--lightgray);
display: flex;
align-items: center;
column-gap: 8px;
}
#manager-instances .instance-info>span:nth-child(4) {
display: flex;
column-gap: 10px;
font-size: 13px;
font-weight: normal;
}
#manager-instances .instance-buttons {
display: flex;
flex-direction: row;
width: 100%;
justify-content: space-between;
column-gap: 10px;
}
#manager-instances .instance-info .info {
display: flex;
flex-direction: row;
justify-content: space-between;
}
#manager-instances .instance-info .info>div:nth-child(1) {
font-weight: 600;
font-size: 14px;
}
#manager-instances .instance-info .info>div:nth-child(2) {
font-weight: normal;
font-size: 14px;
}
#manager-instances .instance-info .divider {
margin-top: 5px;
margin-bottom: 5px;
}
#manager-instances .start, #manager-instances .open-browser {
margin-right: auto;
color: var(--offwhite);
background-color: var(--blue);
}
#manager-instances .start {
width: 160px;
}
#manager-instances .start>div {
width: 160px;
}
#manager-instances .edit,
#manager-instances .install,
#manager-instances .uninstall,
#manager-instances .stop {
color: var(--offwhite);
background-color: transparent;
border: 1px solid var(--offwhite);
}
#manager-instances .edit:hover,
#manager-instances .install:hover,
#manager-instances .uninstall:hover,
#manager-instances .stop:hover {
color: var(--background);
background-color: var(--offwhite);
}
#manager-instances .install {
margin-left: auto;
}
#manager-instances .content {
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
}
#manager-instances .content > div {
height: fit-content;
}
</style>
<div id="manager-instances">
<div class="dashboard">
<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;">
<div class="instructions">
<span class="title">
View and manage installs
</span>
<span style="color: var(--offwhite); font-size: 14px; text-align: center;">
<span class="subtitle">
The following DCS installations have been identified. <br>You can start an Olympus server, modify settings and uninstall below.
</span>
</div>
@@ -246,7 +17,10 @@
<% for (let i = 0; i < instances.length; i++) {%>
<div class="option <%= instances[i].installed? 'installed': '' %>" data-folder="<%= instances[i].folder %>">
<div class="instance-info">
<span><%= instances[i].name %></span>
<span class="name"><%= instances[i].name %></span>
<span class="folder"><img src="./icons/folder-open-solid.svg"> <%= instances[i].folder %></span>
<div class="server-data">
<div class="server-status webserver online hide">ACTIVE</div>
<div class="server-status webserver offline">OFFLINE</div>
@@ -259,11 +33,11 @@
<div class="divider"></div>
<span class="<%= instances[i].installed? (instances[i].error? 'error': 'installed'): '' %>">
<span class="status <%= instances[i].installed? (instances[i].error? 'error': 'installed'): '' %>">
<%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %>
</span>
<span><img src="./icons/folder-open-solid.svg"> <%= instances[i].folder %></span>
<div style="display: flex; flex-direction: column; row-gap: 5px;">
<div class="summary">
<div class="info">
<div>Client port</div>
<div> <%= instances[i].installed? instances[i].clientPort: "N/A" %> </div>
@@ -293,7 +67,7 @@
<div class="button open-browser hide" onclick="signal('onOpenBrowserClicked', '<%= instances[i].name %>')">Open in browser</div>
<div class="button stop hide" onclick="signal('onStopClicked', '<%= instances[i].name %>')">Stop Olympus</div>
</div>
<div style="position: absolute; top: 15px; right: 15px; text-decoration: underline; cursor: pointer;" onclick="
<div class="logs-link" onclick="
signal('onTextFileClicked', '<%= instances[i].folder.replaceAll('\\', '/')+'/Logs/dcs.log' %>');
signal('onTextFileClicked', '<%= instances[i].folder.replaceAll('\\', '/')+'/Logs/Olympus_log.txt' %>');
">Open logs</div>

View File

@@ -20,7 +20,7 @@
height: 110px;
color: var(--offwhite);
display: flex;
font-size: 18px;
font-size: var(--large);
font-weight: 600;
padding-left: 15px;
align-items: start;
@@ -36,7 +36,7 @@
}
#manager-menu .option>div {
font-size: 14px;
font-size: var(--normal);
font-weight: normal;
}
@@ -79,7 +79,7 @@
<div style="font-size: 20px; font-weight: bold;">
INSTALL WIZARD AND MANAGER
</div>
<div style="color: var(--lightgray); font-size: 13px; font-weight: normal; margin-top: 20px; width: 300px;">
<div style="color: var(--lightgray); font-size: var(--normal); font-weight: normal; margin-top: 20px; width: 300px;">
Using this manager, you can install Olympus, update settings, and view and manage instances
</div>
</div>

View File

@@ -33,7 +33,7 @@
</span>
<input type="password" minlength="8" onchange="signal('onRedCommanderPasswordChanged', this.value)" value="<%= activeInstance["installed"]? 'This is a long string so that users know this is not actually their password. Hi Tony!': '' %>">
</div>
<div class="<%= activeInstance["installed"]? '': 'hide' %>" style="color: var(--offwhite); font-size: 14px; color: var(--lightgray);">
<div class="<%= activeInstance["installed"]? '': 'hide' %>" style="color: var(--offwhite); font-size: var(--normal); color: var(--lightgray);">
Note: to keep the old passwords, click <b>Next</b> without editing any value.
</div>
</div>

View File

@@ -15,7 +15,7 @@
#result-page .result-summary .title {
font-weight: bold;
font-size: 15px;
font-size: var(--big);
display: flex;
align-items: center;
}
@@ -25,7 +25,7 @@
}
#result-page .result-summary .description {
font-size: 13px;
font-size: var(--normal);
}
#result-page .result-summary.success{
@@ -62,7 +62,7 @@
row-gap: 5px;
justify-items: center;
align-items: start;
font-size: 13px;
font-size: var(--normal);
}
#result-page .usage-instructions>div>img {
@@ -91,10 +91,10 @@
<div class="description">See the manager log located in <i><%= logLocation %></i> for more information.</div>
</div>
<div class="instructions-group hide">
<div style="font-size: 18px; font-weight: bold; color: var(--offwhite);">
<div style="font-size: var(--very-large); font-weight: bold; color: var(--offwhite);">
How to launch Olympus
</div>
<div style="font-size: 13px; color: var(--offwhite);">
<div style="font-size: var(--normal); color: var(--offwhite);">
To launch Olympus, there are shortcuts available on the desktop and in the <i><b><%= activeInstance["name"] %></b></i> folder under <i><b>Saved Games</b></i>.
</div>
<% if (activeInstance["installationType"] === "singleplayer") { %>
@@ -113,7 +113,7 @@
</div>
</div>
</div>
<div style="font-size: 13px;">
<div style="font-size: var(--normal);">
Alternatively, you can run the <b>Olympus Server</b> instead and visit <div class="link" onclick="signal('onLinkClicked', 'http://localhost:<%= activeInstance["clientPort"] %>')" >http://localhost:<%= activeInstance["clientPort"] %></div> in a web browser (Google Chrome recommended) to replace the first step above.
</div>
<% } else { %>
@@ -139,7 +139,7 @@
</div>
</div>
</div>
<div style="font-size: 13px;">
<div style="font-size: var(--normal);">
<b>To access Olympus from this PC</b>, you need to visit <div class="link" onclick="signal('onLinkClicked', 'http://localhost:<%= activeInstance["clientPort"] %>')">http://localhost:<%= activeInstance["clientPort"] %></div> in a web browser (Google Chrome recommended) instead.
</div>
<% } %>

View File

@@ -1,233 +1,18 @@
<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;
position: relative;
}
#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="padding: 40px;">
<div class="cancel" style="font-size: 14px; font-weight: 600; color: var(--offwhite); display: flex; align-items: center; column-gap: 10px; cursor: pointer; text-decoration: underline; " onclick="signal('onBackClicked')">
<div class="dashboard">
<div class="cancel" style="font-size: var(--normal); font-weight: 600; color: var(--offwhite); display: flex; align-items: center; column-gap: 10px; cursor: pointer; text-decoration: underline; " onclick="signal('onBackClicked')">
<img src="./icons/chevron-left-solid.svg" style=" height: 14px;">Back to menu
</div>
<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
<div class="instructions">
<span class="title">
Change settings
</span>
<span style="color: var(--offwhite); font-size: 14px; text-align: center;">
The following Olympus installations have been identified. <br>You can modify settings and uninstall below.
<span class="subtitle">
Here you can see the DCS instances on your computer that have Olympus installed. <br>
You can edit settings and uninstall Olympus from this screen.
</span>
</div>
<div class="scroll-container">
@@ -236,10 +21,13 @@
<% 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>
<span class="name"><%= instances[i].name %></span>
<span class="folder"><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;">
<span class="status <%= instances[i].installed? (instances[i].error? 'error': 'installed'): '' %>">
<%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %>
</span>
<div class="summary">
<div class="info">
<div>Client port</div>
<div> <%= instances[i].installed? instances[i].clientPort: "N/A" %> </div>
@@ -253,7 +41,7 @@
<div> <%= instances[i].installed? instances[i].backendAddress: "N/A" %> </div>
</div>
</div>
<div style="position: absolute; top: 15px; right: 15px; text-decoration: underline; cursor: pointer;" onclick="
<div class="logs-link" onclick="
signal('onTextFileClicked', '<%= instances[i].folder.replaceAll('\\', '/')+'/Logs/dcs.log' %>');
signal('onTextFileClicked', '<%= instances[i].folder.replaceAll('\\', '/')+'/Logs/Olympus_log.txt' %>');
">Open logs</div>

View File

@@ -22,7 +22,7 @@
height: 70px;
color: var(--offwhite);
display: flex;
font-size: 18px;
font-size: var(--very-large);
font-weight: 600;
padding-left: 15px;
align-items: center;

View File

@@ -7,40 +7,34 @@
max-height: 100%;
}
.buttons-footer {
display: flex;
column-gap: 10px;
justify-content: start;
}
.instructions {
.wizard-page .instructions {
display: flex;
flex-direction: column;
row-gap: 15px;
color: var(--offwhite);
}
.instructions .step {
font-size: 14px;
.wizard-page .instructions .step {
font-size: var(--normal);
color: var(--lightgray);
}
.instructions .description {
font-size: 14px;
.wizard-page .instructions .description {
font-size: var(--normal);
color: var(--lightgray);
}
.instructions .title {
.wizard-page .instructions .title {
font-size: 24px;
font-weight: bold;
}
.content {
.wizard-page .content {
overflow-x: hidden;
overflow-y: scroll;
}
.content > div {
.wizard-page .content > div {
height: 100%;
width: 100%;
display: flex;
@@ -50,7 +44,7 @@
justify-content: center;
}
.wizard-inputs {
.wizard-page .wizard-inputs {
display: flex;
flex-direction: column;
row-gap: 10px;
@@ -60,23 +54,23 @@
width: 300px;
}
.note {
.wizard-page .note {
width: 100%;
background-color: var(--background-note);
color: var(--offwhite);
border-left: 5px solid var(--offwhite);
font-size: 14px;
font-size: var(--normal);
padding: 15px;
font-weight: 600;
}
.warning {
.wizard-page .warning {
background-color: var(--background-warning);
border-left: 5px solid var(--orange);
}
</style>
<div class="wizard-page">
<div class="cancel" style="font-size: 14px; font-weight: 600; color: var(--offwhite); display: flex; align-items: center; column-gap: 10px; cursor: pointer; text-decoration: underline;" onclick="signal('onCancelClicked')">
<div class="cancel" style="font-size: var(--normal); font-weight: 600; color: var(--offwhite); display: flex; align-items: center; column-gap: 10px; cursor: pointer; text-decoration: underline;" onclick="signal('onCancelClicked')">
<img src="./icons/chevron-left-solid.svg" style=" height: 14px;">Cancel install
</div>
<div class="content">