diff --git a/client/@types/olympus/index.d.ts b/client/@types/olympus/index.d.ts index c37bdcae..6e63fcb1 100644 --- a/client/@types/olympus/index.d.ts +++ b/client/@types/olympus/index.d.ts @@ -105,6 +105,10 @@ declare module "constants/constants" { export const ROEs: string[]; export const reactionsToThreat: string[]; export const emissionsCountermeasures: string[]; + export const ERAS: { + name: string; + chronologicalOrder: number; + }[]; export const ROEDescriptions: string[]; export const reactionsToThreatDescriptions: string[]; export const emissionsCountermeasuresDescriptions: string[]; @@ -836,6 +840,7 @@ declare module "other/utils" { }): UnitBlueprint | null; export function getMarkerCategoryByName(name: string): "aircraft" | "helicopter" | "groundunit-sam" | "navyunit" | "groundunit-other"; export function getUnitDatabaseByCategory(category: string): import("unit/databases/aircraftdatabase").AircraftDatabase | import("unit/databases/helicopterdatabase").HelicopterDatabase | import("unit/databases/groundunitdatabase").GroundUnitDatabase | import("unit/databases/navyunitdatabase").NavyUnitDatabase | null; + export function getCategoryBlueprintIconSVG(category: string, unitName: string): string | false; export function base64ToBytes(base64: string): ArrayBufferLike; export function enumToState(state: number): string; export function enumToROE(ROE: number): string; @@ -1600,6 +1605,7 @@ declare module "map/map" { import { CoalitionAreaContextMenu } from "contextmenus/coalitionareacontextmenu"; import { AirbaseSpawnContextMenu } from "contextmenus/airbasespawnmenu"; export type MapMarkerVisibilityControl = { + "category"?: string; "image": string; "isProtected"?: boolean; "name": string; @@ -1997,6 +2003,25 @@ declare module "unit/importexport/unitdatafileexport" { showForm(units: Unit[]): void; } } +declare module "schemas/schema" { + import Ajv from "ajv"; + import { AnySchemaObject } from "ajv/dist/core"; + abstract class JSONSchemaValidator { + #private; + constructor(schema: AnySchemaObject); + getAjv(): Ajv; + getCompiledValidator(): any; + getErrors(): any; + getSchema(): AnySchemaObject; + validate(data: any): any; + } + export class AirbasesJSONSchemaValidator extends JSONSchemaValidator { + constructor(); + } + export class ImportFileJSONSchemaValidator extends JSONSchemaValidator { + constructor(); + } +} declare module "unit/importexport/unitdatafileimport" { import { Dialog } from "dialog/dialog"; import { UnitDataFile } from "unit/importexport/unitdatafile"; diff --git a/client/public/stylesheets/leaflet/leaflet.css b/client/public/stylesheets/leaflet/leaflet.css index 1981009f..9ade8dc4 100644 --- a/client/public/stylesheets/leaflet/leaflet.css +++ b/client/public/stylesheets/leaflet/leaflet.css @@ -60,6 +60,11 @@ padding: 0; } +.leaflet-container img.leaflet-tile { + /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ + mix-blend-mode: plus-lighter; +} + .leaflet-container.leaflet-touch-zoom { -ms-touch-action: pan-x pan-y; touch-action: pan-x pan-y; @@ -646,7 +651,7 @@ svg.leaflet-image-layer.leaflet-interactive path { } /* Printing */ - + @media print { /* Prevent printers from removing background-images of controls. */ .leaflet-control { diff --git a/manager/ejs/connections.ejs b/manager/ejs/connections.ejs index 80fe1869..d661c03b 100644 --- a/manager/ejs/connections.ejs +++ b/manager/ejs/connections.ejs @@ -1,55 +1,55 @@ -
-
-
User path
-
Ports and address
-
Passwords
-
<%= install? 'Install': 'Update' %>
-
-
-
- - Accept or modify port settings (optional) - - - If you are installing Olympus locally for Single player use, it's recommended you leave these as default and continue. - If you are installing a dedicated server, then follow the instructions available on the DCS Olympus Wiki. - +
+
+
+ Step <%= singleInstance? "3": "4" %> of <%= singleInstance? "4": "5" %>
+
+ 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. +
+
+
Client port - +
- "> + " + onchange="signal('onClientPortChanged', this.value)">
Port already in use @@ -58,10 +58,12 @@
Backend port - +
- "> + " + onchange="signal('onBackendPortChanged', this.value)">
Port already in use @@ -69,25 +71,16 @@
- Backend address - + +
Enable direct backend API connection +
- ">
-
\ No newline at end of file diff --git a/manager/ejs/connectionsType.ejs b/manager/ejs/connectionsType.ejs new file mode 100644 index 00000000..a6a259f6 --- /dev/null +++ b/manager/ejs/connectionsType.ejs @@ -0,0 +1,25 @@ + +
+
+
+ Step <%= singleInstance? "2": "3" %> of <%= singleInstance? "4": "5" %> +
+
+ 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/folder.ejs b/manager/ejs/folder.ejs new file mode 100644 index 00000000..714c2d2a --- /dev/null +++ b/manager/ejs/folder.ejs @@ -0,0 +1,24 @@ + +
+
+
+ Step 1 of <%= singleInstance? "4": "5" %> +
+
+ Which DCS instance you want to add Olympus to? +
+
+ Olympus is added to DCS instances individually, and will only work for that specific instance.
+ You can have Olympus installed across multiple DCS instances. Re-run in the install wizard to add Olympus to another DCS install. +
+
+
+ <% for (var i = 0; i < instances.length; i++) { %> +
+ <%= instances[i].name %> +
+ <% } %> +
+
diff --git a/manager/ejs/installations.ejs b/manager/ejs/installations.ejs deleted file mode 100644 index 550dbc10..00000000 --- a/manager/ejs/installations.ejs +++ /dev/null @@ -1,126 +0,0 @@ - -
-
-
User path
-
Ports and address
-
Passwords
-
Install
-
-
-
- - Select a DCS path to install Olympus to. - - - We have automatically detected the following DCS installations under your Saved Games / DCS folder. - - - Please select which DCS installations you want to add Olympus to. - -
-
-
- <% for (let i = 0; i < instances.length; i++) {%> -
- <%= instances[i].name %> - <%= instances[i].folder %> - - <%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %> - -
- <% } %> -
-
- -
- Cancel installation -
-
-
\ No newline at end of file diff --git a/manager/ejs/instances.ejs b/manager/ejs/instances.ejs index e059c725..0871d658 100644 --- a/manager/ejs/instances.ejs +++ b/manager/ejs/instances.ejs @@ -1,9 +1,4 @@ -
+
-
- Return to menu -
-
- +
+ View and manage installs - - The following Oympus installs have been identified.
You can start an Olympus server, modify settings and uninstall below. + + The following DCS installations have been identified.
You can start an Olympus server, modify settings and uninstall below.
<% for (let i = 0; i < instances.length; i++) {%> -
+
<%= instances[i].name %> - - <%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': ''): '' %> - - <%= instances[i].folder %>
ACTIVE
OFFLINE
@@ -239,33 +241,42 @@
Load: 0
+
-
-
Client port
-
<%= instances[i].clientPort %>
-
-
-
Backend port
-
<%= instances[i].backendPort %>
-
-
-
Backend address
-
<%= instances[i].backendAddress %>
+ + + <%= instances[i].installed? (instances[i].error? 'Corrupted/outdated Olympus installation': 'Olympus installed'): 'Olympus not installed' %> + + <%= instances[i].folder %> +
+
+
Client port
+
<%= instances[i].installed? instances[i].clientPort: "N/A" %>
+
+
+
Backend port
+
<%= instances[i].installed? instances[i].backendPort: "N/A" %>
+
+
+
Backend address
+
<%= instances[i].installed? instances[i].backendAddress: "N/A" %>
+
Start Olympus
-
Start server
-
Start client
+
Start server
+
Start client
-
Edit settings
-
Uninstall Olympus
-
Open in browser
-
Stop Olympus
+
Edit settings
+
Install Olympus
+
Uninstall Olympus
+
Open in browser
+
Stop Olympus
<% } %> diff --git a/manager/ejs/menu.ejs b/manager/ejs/menu.ejs index 412c0b15..3454555e 100644 --- a/manager/ejs/menu.ejs +++ b/manager/ejs/menu.ejs @@ -1,62 +1,55 @@
-
-
DCS OLYMPUS
-
INSTALL WIZARD AND MANAGER
-
Using this manager, you can install Olympus, update settings, and view and manage instances
-
-