From 335655406edf2f7919d0a53426f0e8f08bf67e53 Mon Sep 17 00:00:00 2001 From: PeekabooSteam Date: Thu, 30 Nov 2023 09:41:43 +0000 Subject: [PATCH] Alignment fixed, spelling corrected --- client/@types/olympus/index.d.ts | 148 ++++++++++++++---- ...dle.js.tmp-browserify-38414992840504180727 | 0 .../public/stylesheets/other/contextmenus.css | 4 +- client/public/stylesheets/style/style.css | 16 +- client/views/contextmenus/airbasespawn.ejs | 8 +- client/views/contextmenus/coalitionarea.ejs | 10 +- client/views/contextmenus/map.ejs | 34 ++-- 7 files changed, 156 insertions(+), 64 deletions(-) create mode 100644 client/public/javascripts/bundle.js.tmp-browserify-38414992840504180727 diff --git a/client/@types/olympus/index.d.ts b/client/@types/olympus/index.d.ts index b41b21a3..835537c5 100644 --- a/client/@types/olympus/index.d.ts +++ b/client/@types/olympus/index.d.ts @@ -154,6 +154,10 @@ declare module "constants/constants" { bounds: LatLngBounds; zoom: number; }; + Normandy: { + bounds: LatLngBounds; + zoom: number; + }; }; export const mapLayers: { "ArcGIS Satellite": { @@ -204,6 +208,7 @@ declare module "constants/constants" { export const IADSDensities: { [key: string]: number; }; + export const GROUND_UNIT_AIR_DEFENCE_REGEX: RegExp; export const HIDE_GROUP_MEMBERS = "Hide group members when zoomed out"; export const SHOW_UNIT_LABELS = "Show unit labels (L)"; export const SHOW_UNITS_ENGAGEMENT_RINGS = "Show units threat range rings (Q)"; @@ -232,33 +237,34 @@ declare module "constants/constants" { horizontalVelocity = 15, verticalVelocity = 16, heading = 17, - isActiveTanker = 18, - isActiveAWACS = 19, - onOff = 20, - followRoads = 21, - fuel = 22, - desiredSpeed = 23, - desiredSpeedType = 24, - desiredAltitude = 25, - desiredAltitudeType = 26, - leaderID = 27, - formationOffset = 28, - targetID = 29, - targetPosition = 30, - ROE = 31, - reactionToThreat = 32, - emissionsCountermeasures = 33, - TACAN = 34, - radio = 35, - generalSettings = 36, - ammo = 37, - contacts = 38, - activePath = 39, - isLeader = 40, - operateAs = 41, - shotsScatter = 42, - shotsIntensity = 43, - health = 44, + track = 18, + isActiveTanker = 19, + isActiveAWACS = 20, + onOff = 21, + followRoads = 22, + fuel = 23, + desiredSpeed = 24, + desiredSpeedType = 25, + desiredAltitude = 26, + desiredAltitudeType = 27, + leaderID = 28, + formationOffset = 29, + targetID = 30, + targetPosition = 31, + ROE = 32, + reactionToThreat = 33, + emissionsCountermeasures = 34, + TACAN = 35, + radio = 36, + generalSettings = 37, + ammo = 38, + contacts = 39, + activePath = 40, + isLeader = 41, + operateAs = 42, + shotsScatter = 43, + shotsIntensity = 44, + health = 45, endOfData = 255 } export const MGRS_PRECISION_10KM = 2; @@ -529,6 +535,7 @@ declare module "interfaces" { } export interface UnitData { category: string; + categoryDisplayName: string; ID: number; alive: boolean; human: boolean; @@ -546,6 +553,7 @@ declare module "interfaces" { horizontalVelocity: number; verticalVelocity: number; heading: number; + track: number; isActiveTanker: boolean; isActiveAWACS: boolean; onOff: boolean; @@ -818,7 +826,7 @@ declare module "other/utils" { export function enumToCoalition(coalitionID: number): "" | "blue" | "red" | "neutral"; export function coalitionToEnum(coalition: string): 0 | 1 | 2; export function convertDateAndTimeToDate(dateAndTime: DateAndTime): Date; - export function createCheckboxOption(value: string, text: string, checked?: boolean, callback?: CallableFunction): HTMLElement; + export function createCheckboxOption(value: string, text: string, checked?: boolean, callback?: CallableFunction, options?: any): HTMLElement; export function getCheckboxOptions(dropdown: Dropdown): { [key: string]: boolean; }; @@ -1123,6 +1131,7 @@ declare module "unit/unit" { getHorizontalVelocity(): number; getVerticalVelocity(): number; getHeading(): number; + getTrack(): number; getIsActiveAWACS(): boolean; getIsActiveTanker(): boolean; getOnOff(): boolean; @@ -1178,6 +1187,11 @@ declare module "unit/unit" { * @returns string containing the default marker */ abstract getDefaultMarker(): string; + /** Get the category but for display use - for the user. (i.e. has spaces in it) + * + * @returns string + */ + getCategoryLabel(): string; /********************** Unit data *************************/ /** This function is called by the units manager to update all the data coming from the backend. It reads the binary raw data using a DataExtractor * @@ -1708,22 +1722,63 @@ declare module "mission/missionmanager" { export class MissionManager { #private; constructor(); + /** Update location of bullseyes + * + * @param object + */ updateBullseyes(data: BullseyesData): void; + /** Update airbase information + * + * @param object + */ updateAirbases(data: AirbasesData): void; + /** Update mission information + * + * @param object + */ updateMission(data: MissionData): void; + /** Get the bullseyes set in this theatre + * + * @returns object + */ getBullseyes(): { [name: string]: Bullseye; }; + /** Get the airbases in this theatre + * + * @returns object + */ getAirbases(): { [name: string]: Airbase; }; + /** Get the options/settings as set in the command mode + * + * @returns object + */ getCommandModeOptions(): CommandModeOptions; + /** Get the current date and time of the mission (based on local time) + * + * @returns object + */ getDateAndTime(): DateAndTime; + /** + * Get the number of seconds left of setup time + * @returns number + */ getRemainingSetupTime(): number; + /** Get an object with the coalitions in it + * + * @returns object + */ getCoalitions(): { red: string[]; blue: string[]; }; + /** Get the current theatre (map) name + * + * @returns string + */ + getTheatre(): string; getAvailableSpawnPoints(): number; getCommandedCoalition(): "blue" | "red" | "all"; refreshSpawnPoints(): void; @@ -1892,6 +1947,43 @@ declare module "dialog/dialog" { show(): void; } } +declare module "unit/importexport/unitdatafile" { + import { Dialog } from "dialog/dialog"; + export abstract class UnitDataFile { + #private; + protected data: any; + protected dialog: Dialog; + constructor(); + buildCategoryCoalitionTable(): void; + getData(): any; + } +} +declare module "unit/importexport/unitdatafileexport" { + import { Dialog } from "dialog/dialog"; + import { Unit } from "unit/unit"; + import { UnitDataFile } from "unit/importexport/unitdatafile"; + export class UnitDataFileExport extends UnitDataFile { + #private; + protected data: any; + protected dialog: Dialog; + constructor(elementId: string); + /** + * Show the form to start the export journey + */ + showForm(units: Unit[]): void; + } +} +declare module "unit/importexport/unitdatafileimport" { + import { Dialog } from "dialog/dialog"; + import { UnitDataFile } from "unit/importexport/unitdatafile"; + export class UnitDataFileImport extends UnitDataFile { + #private; + protected data: any; + protected dialog: Dialog; + constructor(elementId: string); + selectFile(): void; + } +} declare module "unit/unitsmanager" { import { LatLng, LatLngBounds } from "leaflet"; import { Unit } from "unit/unit"; diff --git a/client/public/javascripts/bundle.js.tmp-browserify-38414992840504180727 b/client/public/javascripts/bundle.js.tmp-browserify-38414992840504180727 new file mode 100644 index 00000000..e69de29b diff --git a/client/public/stylesheets/other/contextmenus.css b/client/public/stylesheets/other/contextmenus.css index 6e2bed6d..a35d3624 100644 --- a/client/public/stylesheets/other/contextmenus.css +++ b/client/public/stylesheets/other/contextmenus.css @@ -241,8 +241,8 @@ } .unit-label-count-container { - display: flex; - flex-direction: row; + display: grid; + grid-template-columns: 187px 1fr 1fr; align-items: center; column-gap: 5px; } diff --git a/client/public/stylesheets/style/style.css b/client/public/stylesheets/style/style.css index 31f08e62..3c011a57 100644 --- a/client/public/stylesheets/style/style.css +++ b/client/public/stylesheets/style/style.css @@ -1554,7 +1554,7 @@ input[type=number]::-webkit-outer-spin-button { width: 100%; } -.ol-contexmenu-button { +.ol-context-menu-button { border: none; border-radius: 0px; height: 48px; @@ -1563,23 +1563,23 @@ input[type=number]::-webkit-outer-spin-button { width: 48px; } -.ol-contexmenu-button:last-of-type { +.ol-context-menu-button:last-of-type { border-bottom-right-radius: var(--border-radius-sm); border-top-right-radius: var(--border-radius-sm); } -[data-coalition="blue"].ol-contexmenu-button:hover, -[data-coalition="blue"].ol-contexmenu-button.is-open { +[data-coalition="blue"].ol-context-menu-button:hover, +[data-coalition="blue"].ol-context-menu-button.is-open { background-color: var(--primary-blue) } -[data-coalition="red"].ol-contexmenu-button:hover, -[data-coalition="red"].ol-contexmenu-button.is-open { +[data-coalition="red"].ol-context-menu-button:hover, +[data-coalition="red"].ol-context-menu-button.is-open { background-color: var(--primary-red) } -[data-coalition="neutral"].ol-contexmenu-button:hover, -[data-coalition="neutral"].ol-contexmenu-button.is-open { +[data-coalition="neutral"].ol-context-menu-button:hover, +[data-coalition="neutral"].ol-context-menu-button.is-open { background-color: var(--primary-neutral) } diff --git a/client/views/contextmenus/airbasespawn.ejs b/client/views/contextmenus/airbasespawn.ejs index 8bc60208..d5863dfc 100644 --- a/client/views/contextmenus/airbasespawn.ejs +++ b/client/views/contextmenus/airbasespawn.ejs @@ -2,14 +2,14 @@
+ data-on-click-params='{ "type": "aircraft" }' class="ol-context-menu-button"> + data-on-click-params='{ "type": "helicopter" }' class="ol-context-menu-button">
-
+
-
+
\ No newline at end of file diff --git a/client/views/contextmenus/coalitionarea.ejs b/client/views/contextmenus/coalitionarea.ejs index 50932352..7341fa99 100644 --- a/client/views/contextmenus/coalitionarea.ejs +++ b/client/views/contextmenus/coalitionarea.ejs @@ -3,15 +3,15 @@
+ data-on-click-params='{ "type": "iads" }' class="ol-context-menu-button"> + data-on-click-params='{ "type": "cap" }' class="ol-context-menu-button">--> + class="ol-context-menu-button"> + class="ol-context-menu-button">
-
+
Unit types
diff --git a/client/views/contextmenus/map.ejs b/client/views/contextmenus/map.ejs index aecd99c6..973d0bf4 100644 --- a/client/views/contextmenus/map.ejs +++ b/client/views/contextmenus/map.ejs @@ -3,51 +3,51 @@
+ data-on-click-params='{ "type": "aircraft" }' class="ol-context-menu-button"> + data-on-click-params='{ "type": "helicopter" }' class="ol-context-menu-button"> + data-on-click-params='{ "type": "air-defence" }' class="ol-context-menu-button"> + data-on-click-params='{ "type": "groundunit" }' class="ol-context-menu-button"> + class="ol-context-menu-button"> + data-on-click-params='{ "type": "more" }' class="ol-context-menu-button">
+ data-on-click-params='{ "type": "navyunit" }' class="ol-context-menu-button"> + data-on-click-params='{ "type": "smoke" }' class="ol-context-menu-button"> + data-on-click-params='{ "type": "explosion" }' class="ol-context-menu-button"> + data-on-click-params='{"type": "polygon"}' class="ol-context-menu-button">
-
+
-
+
-
+
-
+
-