From 1568c654927de018f3d3b8a8d02096d2ec6d29cd Mon Sep 17 00:00:00 2001 From: Pax1601 Date: Wed, 17 Jan 2024 17:51:27 +0100 Subject: [PATCH] Implement more wizard page, result page still wip --- manager/ejs/connections.ejs | 171 +++++--------- manager/ejs/connectionsType.ejs | 25 ++ manager/ejs/passwords.ejs | 58 ++--- manager/ejs/result.ejs | 218 ++++++++---------- manager/ejs/type.ejs | 36 +-- manager/ejs/welcome.ejs | 1 + manager/ejs/wizard.ejs | 41 +++- manager/icons/arrow-right-solid.svg | 1 + manager/icons/check-solid-background.svg | 1 + manager/icons/chrome.svg | 1 + manager/icons/gamepad-solid.svg | 1 + manager/icons/server-solid.svg | 2 +- .../triangle-exclamation-solid-background.svg | 1 + manager/javascripts/dcsinstance.js | 52 ++++- manager/javascripts/manager.js | 145 ++++++++++-- manager/javascripts/managerfactory.js | 10 +- manager/javascripts/managerpage.js | 4 +- manager/main.js | 4 +- manager/{ => old}/1.js | 0 manager/{javascripts => old}/connections.js | 0 manager/{javascripts => old}/installations.js | 0 manager/{javascripts => old}/instances.js | 0 manager/{javascripts => old}/passwords.js | 0 manager/{javascripts => old}/result.js | 0 manager/{javascripts => old}/type.js | 0 manager/scripts/copy-package.bat | 11 +- manager/stylesheets/style.css | 53 ++++- 27 files changed, 502 insertions(+), 334 deletions(-) create mode 100644 manager/ejs/connectionsType.ejs create mode 100644 manager/icons/arrow-right-solid.svg create mode 100644 manager/icons/check-solid-background.svg create mode 100644 manager/icons/chrome.svg create mode 100644 manager/icons/gamepad-solid.svg create mode 100644 manager/icons/triangle-exclamation-solid-background.svg rename manager/{ => old}/1.js (100%) rename manager/{javascripts => old}/connections.js (100%) rename manager/{javascripts => old}/installations.js (100%) rename manager/{javascripts => old}/instances.js (100%) rename manager/{javascripts => old}/passwords.js (100%) rename manager/{javascripts => old}/result.js (100%) rename manager/{javascripts => old}/type.js (100%) diff --git a/manager/ejs/connections.ejs b/manager/ejs/connections.ejs index a9775338..672d65b4 100644 --- a/manager/ejs/connections.ejs +++ b/manager/ejs/connections.ejs @@ -1,142 +1,89 @@ -
-
-
<%= install? 'User path': 'Instance selection' %>
-
Type of install
-
Ports and address
-
Passwords
-
<%= install? 'Install': 'Update' %>
+
+
+
+ Step 3 of 4 +
+
+ Manually set Olympus port and address settings +
+
+ Please note: you may be required to allow these ports through your firewall and modem/router via port + forwarding.
+ Otherwise, others may not be able to connect to Olympus. +
-
- <% if (selectAutoOrManual) { %> -
- - Do you want to set port and address settings manually? - - - We can auto setup ports and addresses for you, or you can set the manually.
- If you don't have an understanding of how Olympus works, we recommend the auto option. -
-
- -
-
- Auto apply settings +
+
+ Client port + + +
+ "> + +
+ Port already in use
-
- Manually set options -
-
- - <% } else { %> -
- - Enter the ports and address to use. - - - Select client and backend ports, making sure they are free to use with the provided check.
- Unless you want to support direct API calls to the backend, you can keep the address to localhost even for dedicated servers. -
-
- -
- Client port - - -
- "> - -
- Port already in use -
-
-
-
- Backend port - - -
- "> - -
- Port already in use -
-
-
-
- Backend address - - - "> -
- <% } %> - -
- <%= install? "Cancel installation": "Cancel editing" %> +
+ Backend port + + +
+ " + onchange="signal('onBackendPortChanged', this.value)"> + +
+ Port already in use +
+
+
+
+ +
Enable direct backend API connection + +
+
+
+ Note: if you enable direct backend API connection, you will be required to run DCS as admin or run the netsh + command for others to connect. Leave unchecked if you don't know what this is.
See the Olympus + documentation for more details.
\ No newline at end of file diff --git a/manager/ejs/connectionsType.ejs b/manager/ejs/connectionsType.ejs new file mode 100644 index 00000000..28d77ae4 --- /dev/null +++ b/manager/ejs/connectionsType.ejs @@ -0,0 +1,25 @@ + +
+
+
+ Step 2 of 4 +
+
+ Do you want to set port and address settings? +
+
+ We can automatically set port and address settings for you, or you can set them manually.
+ If you don't have a good understanding of how Olympus works, we recommend the auto apply settings option. +
+
+
+
+ Auto apply settings +
+
+ Manually set +
+
+
diff --git a/manager/ejs/passwords.ejs b/manager/ejs/passwords.ejs index 9cb62113..1054257b 100644 --- a/manager/ejs/passwords.ejs +++ b/manager/ejs/passwords.ejs @@ -1,51 +1,37 @@ -
-
-
<%= install? 'User path': 'Instance selection' %>
-
Type of install
-
Ports and address
-
Passwords
-
<%= install? 'Install': 'Update' %>
-
-
-
- - Enter your passwords to access Olympus - - - When logging into Olympus, these passwords will let you access the different roles. Gamemaster is the default. - -
+ +
+
+
+ Step 4 of 4 +
+
+ Enter your passwords for Olympus +
+
+ When logging into Olympus, these passwords will let you access the different roles.
+ Game Master is the default and is used as a global commander. The other two are used as a part of the RTS mode. +
+
+
- Game Master Password + Game Master Password
- Blue Commander Password + Blue Commander Password
- Red Commander Password + Red Commander Password
- - <% if (!singleInstance) { %> -
- <%= install? "Cancel installation": "Cancel editing" %> -
- <% } %>
-
\ No newline at end of file +
diff --git a/manager/ejs/result.ejs b/manager/ejs/result.ejs index 4165ef98..bd5e12d1 100644 --- a/manager/ejs/result.ejs +++ b/manager/ejs/result.ejs @@ -1,146 +1,128 @@ -
-
-
- Installing hook scripts -
-
- Installing mod folder -
-
- Installing configuration file -
-
- Applying configuration -
-
- Creating shortcuts -
- -
- Olympus successfully installed in the following DCS instance -
- -
- An error has occurred while installing Olympus -
- -
- You may now start DCS and use Olympus either with the shortcuts or the "View and manage instances" entry in the - main menu. -
- -
- Please make sure DCS is not currently being executed. Check <%= logLocation %> for more info. -
- -
- +
+
+
Please wait while Olympus is being 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.
+
+
+
An error occurred while adding Olympus to <%= activeInstance["name"] %>
+
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. +
+
+
+
- - <%= activeInstance.name %> - - - <%= activeInstance.folder %> - + Launch the Olympus Server via the shortcut in DCS Olympus / Saved Games.
- - \ No newline at end of file diff --git a/manager/ejs/type.ejs b/manager/ejs/type.ejs index 53d3f244..ee8169ad 100644 --- a/manager/ejs/type.ejs +++ b/manager/ejs/type.ejs @@ -1,23 +1,25 @@ -
-
- Step 1 of 4 +
+
+
+ Step 1 of 4 +
+
+ Do you want to add Olympus for singleplayer or multiplayer? +
+
+ Select singleplayer if you only want to play locally on your own computer.
+ Select multiplayer if you want Olympus to be useable over the internet from a different computer, or this instance is a dedicated server. +
-
- Do you want to add Olympus for singleplayer or multiplayer? -
-
- Select singleplayer if you only want to play locally on your own computer.
- Select multiplayer if you want Olympus to be useable over the internet from a different computer, or this instance is a dedicated server. -
-
-
-
- Singleplayer -
-
- Multiplayer +
+
+ Singleplayer +
+
+ Multiplayer +
diff --git a/manager/ejs/welcome.ejs b/manager/ejs/welcome.ejs index 31cbf037..814fe9d9 100644 --- a/manager/ejs/welcome.ejs +++ b/manager/ejs/welcome.ejs @@ -4,6 +4,7 @@ flex-direction: column; row-gap: 20px; width: 100%; + height: 100%; justify-content: center; align-items: center; } diff --git a/manager/ejs/wizard.ejs b/manager/ejs/wizard.ejs index fdbbd2f1..38d9220d 100644 --- a/manager/ejs/wizard.ejs +++ b/manager/ejs/wizard.ejs @@ -13,11 +13,20 @@ } .instructions { + display: flex; + flex-direction: column; + row-gap: 15px; color: var(--offwhite); } .instructions .step { + font-size: 14px; + color: var(--lightgray); + } + .instructions .description { + font-size: 14px; + color: var(--lightgray); } .instructions .title { @@ -25,7 +34,7 @@ font-weight: bold; } - .content { + .content > div { height: 100%; width: 100%; display: flex; @@ -34,6 +43,32 @@ align-items: start; justify-content: center; } + + .wizard-inputs { + display: flex; + flex-direction: column; + row-gap: 10px; + } + + .wizard-page .button.radio { + width: 300px; + } + + .note { + width: 100%; + background-color: var(--background-note); + color: var(--offwhite); + border-left: 5px solid var(--offwhite); + font-size: 14px; + padding: 15px; + font-weight: 600; + } + + .warning { + background-color: var(--background-warning); + border-left: 5px solid var(--orange); + } +
@@ -43,10 +78,10 @@