diff --git a/frontend/react/public/images/favicons/site.webmanifest b/frontend/react/public/images/favicons/site.webmanifest index b4b407a7..85fe3e4b 100644 --- a/frontend/react/public/images/favicons/site.webmanifest +++ b/frontend/react/public/images/favicons/site.webmanifest @@ -3,12 +3,12 @@ "short_name": "DCS Olympus", "icons": [ { - "src": "./images/favicons/android-chrome-192x192.png", + "src": "/images/favicons/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "./images/favicons/android-chrome-512x512.png", + "src": "/images/favicons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } diff --git a/frontend/react/src/map/markers/explosionmarker.ts b/frontend/react/src/map/markers/explosionmarker.ts index 633e82d6..c564705d 100644 --- a/frontend/react/src/map/markers/explosionmarker.ts +++ b/frontend/react/src/map/markers/explosionmarker.ts @@ -31,7 +31,7 @@ export class ExplosionMarker extends CustomMarker { var el = document.createElement("div"); el.classList.add("ol-explosion-icon"); var img = document.createElement("img"); - img.src = "./images/markers/explosion.svg"; + img.src = "/images/markers/explosion.svg"; img.onload = () => SVGInjector(img); el.appendChild(img); this.getElement()?.appendChild(el); diff --git a/frontend/react/src/map/markers/smokemarker.ts b/frontend/react/src/map/markers/smokemarker.ts index 86c62a59..064f3c99 100644 --- a/frontend/react/src/map/markers/smokemarker.ts +++ b/frontend/react/src/map/markers/smokemarker.ts @@ -28,7 +28,7 @@ export class SmokeMarker extends CustomMarker { el.classList.add("ol-smoke-icon"); el.setAttribute("data-color", this.#color); var img = document.createElement("img"); - img.src = "./images/markers/smoke.svg"; + img.src = "/images/markers/smoke.svg"; img.onload = () => SVGInjector(img); el.appendChild(img); this.getElement()?.appendChild(el); diff --git a/frontend/react/src/map/markers/stylesheets/airbase.css b/frontend/react/src/map/markers/stylesheets/airbase.css index 2bbdfa32..6b1c30c6 100644 --- a/frontend/react/src/map/markers/stylesheets/airbase.css +++ b/frontend/react/src/map/markers/stylesheets/airbase.css @@ -1,6 +1,6 @@ .airbase-icon { align-items: center; - cursor: url("./images/cursors/pointer.svg"), auto; + cursor: url("/images/cursors/pointer.svg"), auto; display: flex; justify-content: center; position: relative; diff --git a/frontend/react/src/map/markers/stylesheets/bullseye.css b/frontend/react/src/map/markers/stylesheets/bullseye.css index ca807c3a..35833a37 100644 --- a/frontend/react/src/map/markers/stylesheets/bullseye.css +++ b/frontend/react/src/map/markers/stylesheets/bullseye.css @@ -1,6 +1,6 @@ .bullseye-icon { align-items: center; - cursor: url("./images/cursors/pointer.svg"), auto; + cursor: url("/images/cursors/pointer.svg"), auto; display: flex; justify-content: center; position: relative; diff --git a/frontend/react/src/map/markers/stylesheets/units.css b/frontend/react/src/map/markers/stylesheets/units.css index 41a659be..0ad82136 100644 --- a/frontend/react/src/map/markers/stylesheets/units.css +++ b/frontend/react/src/map/markers/stylesheets/units.css @@ -1,6 +1,6 @@ /*** Unit marker elements ***/ [data-object|="unit"] { - cursor: url("./images/cursors/pointer.svg"), auto; + cursor: url("/images/cursors/pointer.svg"), auto; display: flex; height: 100%; justify-content: center; @@ -9,29 +9,29 @@ } [data-object|="unit"].attack-cursor { - cursor: url("./images/cursors/attack.svg"), auto !important; + cursor: url("/images/cursors/attack.svg"), auto !important; } [data-object|="unit"].follow-cursor { - cursor: url("./images/cursors/follow.svg"), auto !important; + cursor: url("/images/cursors/follow.svg"), auto !important; } [data-object|="unit"].fire-at-area-cursor, [data-object|="unit"].bomb-cursor, [data-object|="unit"].carpet-bomb-cursor { - cursor: url("./images/cursors/fire-at-area.svg"), auto !important; + cursor: url("/images/cursors/fire-at-area.svg"), auto !important; } [data-object|="unit"].land-cursor { - cursor: url("./images/cursors/land.svg"), auto !important; + cursor: url("/images/cursors/land.svg"), auto !important; } [data-object|="unit"].land-at-point-cursor { - cursor: url("./images/cursors/land-at-point.svg"), auto !important; + cursor: url("/images/cursors/land-at-point.svg"), auto !important; } [data-object|="unit"].simulate-fire-fight-cursor { - cursor: url("./images/cursors/simulate-fire-fight.svg"), auto !important; + cursor: url("/images/cursors/simulate-fire-fight.svg"), auto !important; } [data-awacs-mode] .unit-short-label { @@ -439,15 +439,15 @@ } [data-object|="unit"][data-state="rtb"] .unit-state { - background-image: url("./images/states/rtb.svg"); + background-image: url("/images/states/rtb.svg"); } [data-object|="unit"][data-state="land"] .unit-state { - background-image: url("./images/states/rtb.svg"); + background-image: url("/images/states/rtb.svg"); } [data-object|="unit"][data-state="idle"] .unit-state { - background-image: url("./images/states/idle.svg"); + background-image: url("/images/states/idle.svg"); } [data-object*="groundunit"][data-state="idle"] .unit-state, @@ -459,59 +459,59 @@ [data-object|="unit"][data-state="bomb-point"] .unit-state, [data-object|="unit"][data-state="carpet-bombing"] .unit-state, [data-object|="unit"][data-state="fire-at-area"] .unit-state { - background-image: url("./images/states/attack.svg"); + background-image: url("/images/states/attack.svg"); } [data-object|="unit"][data-state="follow"] .unit-state { - background-image: url("./images/states/follow.svg"); + background-image: url("/images/states/follow.svg"); } [data-object|="unit"][data-state="refuel"] .unit-state { - background-image: url("./images/states/refuel.svg"); + background-image: url("/images/states/refuel.svg"); } [data-object|="unit"][data-state="human"] .unit-state { - background-image: url("./images/states/human.svg"); + background-image: url("/images/states/human.svg"); } [data-object|="unit"][data-state="dcs"] .unit-state { - background-image: url("./images/states/dcs.svg"); + background-image: url("/images/states/dcs.svg"); } [data-object|="unit"][data-state="land-at-point"] .unit-state { - background-image: url("./images/states/land-at-point.svg"); + background-image: url("/images/states/land-at-point.svg"); } [data-object|="unit"][data-state="no-task"] .unit-state { - background-image: url("./images/states/no-task.svg"); + background-image: url("/images/states/no-task.svg"); } [data-object|="unit"][data-state="off"] .unit-state { - background-image: url("./images/states/off.svg"); + background-image: url("/images/states/off.svg"); } [data-object|="unit"][data-state="tanker"] .unit-state { - background-image: url("./images/states/tanker.svg"); + background-image: url("/images/states/tanker.svg"); } [data-object|="unit"][data-state="AWACS"] .unit-state { - background-image: url("./images/states/awacs.svg"); + background-image: url("/images/states/awacs.svg"); } [data-object|="unit"][data-state="miss-on-purpose"] .unit-state { - background-image: url("./images/states/miss-on-purpose.svg"); + background-image: url("/images/states/miss-on-purpose.svg"); } [data-object|="unit"][data-state="scenic-aaa"] .unit-state { - background-image: url("./images/states/scenic-aaa.svg"); + background-image: url("/images/states/scenic-aaa.svg"); } [data-object|="unit"][data-state="simulate-fire-fight"] .unit-state { - background-image: url("./images/states/simulate-fire-fight.svg"); + background-image: url("/images/states/simulate-fire-fight.svg"); } [data-object|="unit"] .unit-health::before { - background-image: url("./images/icons/health.svg"); + background-image: url("/images/icons/health.svg"); background-repeat: no-repeat; background-size: contain; content: " "; diff --git a/frontend/react/src/map/markers/temporaryunitmarker.ts b/frontend/react/src/map/markers/temporaryunitmarker.ts index b08f39de..d3bb1118 100644 --- a/frontend/react/src/map/markers/temporaryunitmarker.ts +++ b/frontend/react/src/map/markers/temporaryunitmarker.ts @@ -56,7 +56,7 @@ export class TemporaryUnitMarker extends CustomMarker { var unitIcon = document.createElement("div"); unitIcon.classList.add("unit-icon"); var img = document.createElement("img"); - img.src = `./images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.#coalition}/${blueprint.markerFile ?? blueprint.category}.svg`; + img.src = `/images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.#coalition}/${blueprint.markerFile ?? blueprint.category}.svg`; img.onload = () => SVGInjector(img); unitIcon.appendChild(img); unitIcon.toggleAttribute("data-rotate-to-heading", false); diff --git a/frontend/react/src/map/stylesheets/map.css b/frontend/react/src/map/stylesheets/map.css index be3be801..12e7e2e4 100644 --- a/frontend/react/src/map/stylesheets/map.css +++ b/frontend/react/src/map/stylesheets/map.css @@ -132,7 +132,7 @@ } .ol-target-icon { - background-image: url("./images/markers/target.svg"); + background-image: url("/images/markers/target.svg"); height: 100%; width: 100%; } @@ -184,53 +184,53 @@ path.leaflet-interactive:focus { } .attack-cursor { - cursor: url("./images/cursors/attack.svg"), auto !important; + cursor: url("/images/cursors/attack.svg"), auto !important; } .follow-cursor { - cursor: url("./images/cursors/follow.svg"), auto !important; + cursor: url("/images/cursors/follow.svg"), auto !important; } .fire-at-area-cursor, .bomb-cursor, .carpet-bomb-cursor { - cursor: url("./images/cursors/fire-at-area.svg"), auto !important; + cursor: url("/images/cursors/fire-at-area.svg"), auto !important; } .land-cursor { - cursor: url("./images/cursors/land.svg"), auto !important; + cursor: url("/images/cursors/land.svg"), auto !important; } .land-at-point-cursor { - cursor: url("./images/cursors/land-at-point.svg"), auto !important; + cursor: url("/images/cursors/land-at-point.svg"), auto !important; } .simulate-fire-fight-cursor { - cursor: url("./images/cursors/simulate-fire-fight.svg"), auto !important; + cursor: url("/images/cursors/simulate-fire-fight.svg"), auto !important; } #map-container.leaflet-grab { - cursor: url("./images/cursors/grab.svg") 16 16, auto; + cursor: url("/images/cursors/grab.svg") 16 16, auto; } .explosion-cursor { - cursor: url("./images/cursors/explosion.svg"), auto !important; + cursor: url("/images/cursors/explosion.svg"), auto !important; } .smoke-white-cursor { - cursor: url("./images/cursors/smoke-white.svg"), auto !important; + cursor: url("/images/cursors/smoke-white.svg"), auto !important; } .smoke-blue-cursor { - cursor: url("./images/cursors/smoke-blue.svg"), auto !important; + cursor: url("/images/cursors/smoke-blue.svg"), auto !important; } .smoke-red-cursor { - cursor: url("./images/cursors/smoke-red.svg"), auto !important; + cursor: url("/images/cursors/smoke-red.svg"), auto !important; } .smoke-green-cursor { - cursor: url("./images/cursors/smoke-green.svg"), auto !important; + cursor: url("/images/cursors/smoke-green.svg"), auto !important; } .smoke-orange-cursor { - cursor: url("./images/cursors/smoke-orange.svg"), auto !important; + cursor: url("/images/cursors/smoke-orange.svg"), auto !important; } diff --git a/frontend/react/src/mission/airbase.ts b/frontend/react/src/mission/airbase.ts index a526d042..4abe20ad 100644 --- a/frontend/react/src/mission/airbase.ts +++ b/frontend/react/src/mission/airbase.ts @@ -67,7 +67,7 @@ export class Airbase extends CustomMarker { el.classList.add("airbase-icon"); el.setAttribute("data-object", "airbase"); - this.#img.src = "./images/markers/airbase.svg"; + this.#img.src = "/images/markers/airbase.svg"; this.#img.onload = () => SVGInjector(this.#img); el.appendChild(this.#img); this.getElement()?.appendChild(el); diff --git a/frontend/react/src/mission/bullseye.ts b/frontend/react/src/mission/bullseye.ts index ebc614c7..a615981d 100644 --- a/frontend/react/src/mission/bullseye.ts +++ b/frontend/react/src/mission/bullseye.ts @@ -23,7 +23,7 @@ export class Bullseye extends CustomMarker { el.classList.add("bullseye-icon"); el.setAttribute("data-object", "bullseye"); var img = document.createElement("img"); - img.src = "./images/markers/bullseye.svg"; + img.src = "/images/markers/bullseye.svg"; img.onload = () => SVGInjector(img); el.appendChild(img); this.getElement()?.appendChild(el); diff --git a/frontend/react/src/mission/carrier.ts b/frontend/react/src/mission/carrier.ts index 6ffcf34d..540e4620 100644 --- a/frontend/react/src/mission/carrier.ts +++ b/frontend/react/src/mission/carrier.ts @@ -15,7 +15,7 @@ export class Carrier extends Airbase { el.classList.add("airbase-icon"); el.setAttribute("data-object", "airbase"); - this.getImg().src = "./images/carriers/nimitz.png"; + this.getImg().src = "/images/carriers/nimitz.png"; this.getImg().style.width = `0px`; // Make the image immediately small to avoid giant carriers el.appendChild(this.getImg()); this.getElement()?.appendChild(el); diff --git a/frontend/react/src/ui/components/olunitlistentry.tsx b/frontend/react/src/ui/components/olunitlistentry.tsx index d56e3440..517fc706 100644 --- a/frontend/react/src/ui/components/olunitlistentry.tsx +++ b/frontend/react/src/ui/components/olunitlistentry.tsx @@ -44,7 +44,7 @@ export function OlUnitListEntry(props: { invert `}> diff --git a/frontend/react/src/ui/components/olunitsummary.tsx b/frontend/react/src/ui/components/olunitsummary.tsx index d46c988c..a56bf2c7 100644 --- a/frontend/react/src/ui/components/olunitsummary.tsx +++ b/frontend/react/src/ui/components/olunitsummary.tsx @@ -20,7 +20,7 @@ export function OlUnitSummary(props: { blueprint: UnitBlueprint; coalition: Coal className={` absolute right-5 top-0 h-full object-cover opacity-10 invert `} - src={"vite./images/units/" + props.blueprint.filename} + src={"vite/images/units/" + props.blueprint.filename} alt="" />

-

- @@ -360,7 +360,7 @@ export function LoginModal(props: { open: boolean }) { >
); diff --git a/frontend/react/src/unit/unit.ts b/frontend/react/src/unit/unit.ts index 60fa5731..8ebc3c51 100644 --- a/frontend/react/src/unit/unit.ts +++ b/frontend/react/src/unit/unit.ts @@ -66,8 +66,8 @@ import { const bearingStrings = ["north", "north-east", "east", "south-east", "south", "south-west", "west", "north-west", "north"]; var pathIcon = new Icon({ - iconUrl: "./images/markers/marker-icon.png", - shadowUrl: "./images/markers/marker-shadow.png", + iconUrl: "/images/markers/marker-icon.png", + shadowUrl: "/images/markers/marker-shadow.png", iconAnchor: [13, 41], }); @@ -912,7 +912,7 @@ export abstract class Unit extends CustomMarker { if (this.belongsToCommandedCoalition() || this.getDetectionMethods().some((value) => [VISUAL, OPTIC].includes(value))) marker = this.getBlueprint()?.markerFile ?? this.getDefaultMarker(); else marker = "aircraft"; - img.src = `./images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.getCoalition()}/${marker}.svg`; + img.src = `/images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.getCoalition()}/${marker}.svg`; img.onload = () => SVGInjector(img); unitIcon.appendChild(img); diff --git a/frontend/react/src/weapon/weapon.ts b/frontend/react/src/weapon/weapon.ts index 073ac7a8..3fb2d663 100644 --- a/frontend/react/src/weapon/weapon.ts +++ b/frontend/react/src/weapon/weapon.ts @@ -178,7 +178,7 @@ export class Weapon extends CustomMarker { var unitIcon = document.createElement("div"); unitIcon.classList.add("unit-icon"); var img = document.createElement("img"); - img.src = `./images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.getCoalition()}/${this.getMarkerCategory()}.svg`; + img.src = `/images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.getCoalition()}/${this.getMarkerCategory()}.svg`; img.onload = () => SVGInjector(img); unitIcon.appendChild(img); unitIcon.toggleAttribute("data-rotate-to-heading", this.getIconOptions().rotateToHeading);