fix: changed images path to relative

This commit is contained in:
Pax1601 2024-12-07 10:23:04 +01:00
parent 4278c6fa9a
commit 7a0504227b
15 changed files with 37 additions and 37 deletions

View File

@ -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"
}

View File

@ -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);

View File

@ -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);

View File

@ -430,15 +430,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,
@ -450,59 +450,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: " ";

View File

@ -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 = `/vite/images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.#coalition}/${blueprint.markerFile ?? blueprint.category}.svg`;
img.src = `/vite./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);

View File

@ -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%;
}

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -44,7 +44,7 @@ export function OlUnitListEntry(props: {
invert
`}>
<img
src={`public/images/units/${props.silhouette}`}
src={`public./images/units/${props.silhouette}`}
className="my-auto max-h-full max-w-full"
/>
</div>

View File

@ -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=""
/>
<div

View File

@ -94,7 +94,7 @@ export function LoginModal(props: { open: boolean }) {
max-md:border-none
`}
>
<img src="/images/splash/1.jpg" className={`
<img src="./images/splash/1.jpg" className={`
contents-center w-full object-cover opacity-[7%]
`}></img>
<div
@ -154,7 +154,7 @@ export function LoginModal(props: { open: boolean }) {
`}
>
<span className="size-[80px] min-w-14">
<img src="..\vite\images\olympus-500x500.png" className={`
<img src="./images/olympus-500x500.png" className={`
flex w-full
`}></img>
</span>
@ -360,7 +360,7 @@ export function LoginModal(props: { open: boolean }) {
>
<Card className="flex">
<img
src="/images/splash/1.jpg"
src="./images/splash/1.jpg"
className={`
h-[40%] max-h-[120px] contents-center w-full rounded-md
object-cover
@ -385,7 +385,7 @@ export function LoginModal(props: { open: boolean }) {
</Card>
<Card className="flex">
<img
src="/images/splash/1.jpg"
src="./images/splash/1.jpg"
className={`
h-[40%] max-h-[120px] contents-center w-full rounded-md
object-cover

View File

@ -349,7 +349,7 @@ export function FormationMenu(props: {
translate-y-[-50%] rotate-90 cursor-move opacity-80
invert
`}
src={`public/images/units/${unit?.getBlueprint()?.filename}`}
src={`public./images/units/${unit?.getBlueprint()?.filename}`}
></img>
</div>
);

View File

@ -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],
});
@ -909,7 +909,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 = `/vite/images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.getCoalition()}/${marker}.svg`;
img.src = `/vite./images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.getCoalition()}/${marker}.svg`;
img.onload = () => SVGInjector(img);
unitIcon.appendChild(img);

View File

@ -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 = `/vite/images/units/map/${getApp().getMap().getOptions().AWACSMode ? "awacs" : "normal"}/${this.getCoalition()}/${this.getMarkerCategory()}.svg`;
img.src = `/vite./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);