mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added folder selection page and port availability checks
This commit is contained in:
@@ -48,7 +48,8 @@
|
||||
title="This port is used to allow access to Olympus. Be sure to allow this port through your firewall if you want people to connect remotely">
|
||||
</span>
|
||||
<div>
|
||||
<input type="number" min="1024" max="65535" value="<%= activeInstance["clientPort"] %>">
|
||||
<input type="number" min="1024" max="65535" value="<%= activeInstance["clientPort"] %>"
|
||||
onchange="signal('onClientPortChanged', this.value)">
|
||||
<img class="success hide">
|
||||
<div class="error hide">
|
||||
<img> <span>Port already in use</span>
|
||||
|
||||
24
manager/ejs/folder.ejs
Normal file
24
manager/ejs/folder.ejs
Normal file
@@ -0,0 +1,24 @@
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div>
|
||||
<div class="instructions">
|
||||
<div class="step">
|
||||
Step 1 of 4
|
||||
</div>
|
||||
<div class="title">
|
||||
Which DCS instance you want to add Olympus to?
|
||||
</div>
|
||||
<div class="description">
|
||||
Olympus is added to DCS instances individually, and will only work for that specific instance. <br>
|
||||
You can have Olympus installed across multiple DCS instances. Re-run in the install wizard to add Olympus to another DCS install.
|
||||
</div>
|
||||
</div>
|
||||
<div class="wizard-inputs">
|
||||
<% for (var i = 0; i < instances.length; i++) { %>
|
||||
<div class="button radio" onclick="signal('onFolderClicked', '<%= instances[i].name %>')" data-folder="<%= instances[i].folder %>">
|
||||
<%= instances[i].name %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,143 +0,0 @@
|
||||
<style>
|
||||
#manager-installations .scroll-container {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#manager-installations .scrollable {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 8px;
|
||||
height: fit-content;
|
||||
align-items: center;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#manager-installations .option {
|
||||
cursor: pointer;
|
||||
background-color: var(--darkgray);
|
||||
width: 600px;
|
||||
height: 100px;
|
||||
color: white;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#manager-installations .option * {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#manager-installations .option {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 5px;
|
||||
align-items: start;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#manager-installations .option>span:nth-child(1) {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#manager-installations .option>span:nth-child(2) {
|
||||
display: flex;
|
||||
column-gap: 10px;
|
||||
justify-content: center;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#manager-installations .option>span:nth-child(3) {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--lightgray);
|
||||
}
|
||||
|
||||
#manager-installations .option>span:nth-child(3).installed {
|
||||
font-weight: 600;
|
||||
color: var(--green);
|
||||
}
|
||||
|
||||
#manager-installations .option>span:nth-child(3).error {
|
||||
font-weight: 600;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
#manager-installations .option.installed {
|
||||
pointer-events: none;
|
||||
background-color: var(--background-disabled);
|
||||
}
|
||||
|
||||
#manager-installations .option:not(.installed)::after {
|
||||
display: block;
|
||||
content: " ";
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url("./icons/chevron-right-solid.svg");
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
</style>
|
||||
<div id="manager-installations">
|
||||
<div class="step-summary">
|
||||
<div class="white <%= singleInstance? 'hide': '' %>"><%= install? 'User path': 'Instance selection' %></div>
|
||||
<div class="blue">Type of install</div>
|
||||
<div class="empty">Ports and address</div>
|
||||
<div class="empty">Passwords</div>
|
||||
<div class="empty"> <%= install? 'Install': 'Update' %></div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="instructions">
|
||||
<span>
|
||||
<% if (install) { %>
|
||||
Select a DCS path to install Olympus to.
|
||||
<% } else { %>
|
||||
Select an Olympus instance to edit.
|
||||
<% } %>
|
||||
</span>
|
||||
<span>
|
||||
<% if (install) { %>
|
||||
We have automatically detected the following DCS installations under your Saved Games / DCS folder.
|
||||
<% } else { %>
|
||||
These are the DCS instances in which Olympus has already been installed.
|
||||
<% } %>
|
||||
</span>
|
||||
<span>
|
||||
<% if (install) { %>
|
||||
Please select which DCS installations you want to add Olympus to.
|
||||
<% } else { %>
|
||||
Please select which Olympus installations you want to edit.
|
||||
<% } %>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div class="scroll-container">
|
||||
<div class="scrollable">
|
||||
<% for (let i = 0; i < instances.length; i++) {%>
|
||||
<div class="option" data-folder="<%= instances[i].folder %>">
|
||||
<span><%= instances[i].name %></span>
|
||||
<span><img src="./icons/folder-open-solid.svg"> <%= instances[i].folder %></span>
|
||||
<span class="<%= 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>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button cancel">
|
||||
<% if (install) { %>
|
||||
Cancel installation
|
||||
<% } else { %>
|
||||
Cancel editing
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,10 +74,16 @@
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
#result-page .link {
|
||||
display: inline;
|
||||
color: #5CA7FF;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<div id="result-page">
|
||||
<div class="result-summary success hide">
|
||||
<div class="title"><img src="./icons/check-solid-background.svg">Olympus successfully added to <i style="margin-left: 3px"><%= activeInstance["name"] %></i></div>
|
||||
<div class="title"><img src="./icons/check-solid-background.svg">Olympus successfully added to <i style="margin-left: 3px"><%= activeInstance["name"] %></i>!</div>
|
||||
<div class="description">See the <b>DCS Olympus Wiki</b> for more information on how to use Olympus and for troubleshooting issues. You may now close the installer.</div>
|
||||
</div>
|
||||
<div class="result-summary error hide">
|
||||
@@ -89,52 +95,52 @@
|
||||
How to launch Olympus
|
||||
</div>
|
||||
<div style="font-size: 13px; color: var(--offwhite);">
|
||||
To launch Olympus, there are shortcuts available in the DCS Olympus folder under Saved Games.
|
||||
To launch Olympus, there are shortcuts available in the <i><b><%= activeInstance["name"] %></b></i> folder under <i><b>Saved Games</b></i>.
|
||||
</div>
|
||||
<% if (activeInstance["installationType"] === "singleplayer") { %>
|
||||
<div class="usage-instructions" style="width: 600px;">
|
||||
<div>
|
||||
<img src="./icons/olympus_white.png">
|
||||
<div>
|
||||
Launch the Olympus Client via the shortcut in DCS Olympus / Saved Games.
|
||||
Launch the <b>Olympus Client</b> via the shortcut on your desktop or in <i><b><%= activeInstance["name"] %></b></i>.
|
||||
</div>
|
||||
</div>
|
||||
<img src="./icons/arrow-right-solid.svg">
|
||||
<div>
|
||||
<img src="./icons/gamepad-solid.svg">
|
||||
<div>
|
||||
Launch DCS, load a mission and unpause the game. Enjoy!
|
||||
<b>Launch DCS</b>, load a mission and unpause the game. Enjoy!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 13px;">
|
||||
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.
|
||||
Alternatively, you can run the <b>Olympus Server</b> instead and visit <div class="link">http://localhost:<%= activeInstance["clientPort"] %></div> in a web browser (Google Chrome recommended) to replace the first step above.
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div class="usage-instructions">
|
||||
<div>
|
||||
<img src="./icons/server-solid.svg">
|
||||
<div>
|
||||
Launch the Olympus Server via the shortcut in DCS Olympus / Saved Games.
|
||||
Launch the <b>Olympus Server</b> via the shortcut on your desktop or in <b><%= activeInstance["name"] %></b>.
|
||||
</div>
|
||||
</div>
|
||||
<img src="./icons/arrow-right-solid.svg">
|
||||
<div>
|
||||
<img src="./icons/chrome.svg">
|
||||
<div>
|
||||
Visit http://<%= ip %>:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended).
|
||||
To access Olympus remotely visit <div class="link">http://<%= ip %>:<%= activeInstance["clientPort"] %></div> <b>in a web browser</b> (Google Chrome recommended).
|
||||
</div>
|
||||
</div>
|
||||
<img src="./icons/arrow-right-solid.svg">
|
||||
<div>
|
||||
<img src="./icons/gamepad-solid.svg">
|
||||
<div>
|
||||
Launch DCS, load a mission and unpause the game. Enjoy!
|
||||
<b>Launch DCS</b>, load a mission and unpause the game. Enjoy!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size: 13px;">
|
||||
Note, to access Olympus from this PC, you need to visit http://localhost:<%= activeInstance["clientPort"] %> in a web browser (Google Chrome recommended) instead.
|
||||
<b>To access Olympus from this PC</b>, you need to visit <div class="link">http://localhost:<%= activeInstance["clientPort"] %></div> in a web browser (Google Chrome recommended) instead.
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user