Skip to content
Snippets Groups Projects
Commit b82a5e28 authored by Niklas Schrötler's avatar Niklas Schrötler
Browse files

Removed improvised subpath-handling

parent 00c6112a
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,5 @@
},
"devDependencies": {
"tailwindcss": "^3.3.2"
},
"homepage": "https://niklasschroetler.fspages.org/infoscreen"
}
}
......@@ -37,7 +37,7 @@
"h": 5
},
"config": {
"url": "/infoscreen/content/warning.png",
"url": "/content/warning.png",
"title": "Achtung, Testbetrieb",
"description": "Wie du vielleicht siehst, sieht dieser Bildschirm heute anders aus. Darf ich vorstellen: Der neue Infoscreen. Bitte beachte allerdings, dass wir gerade einen Testbetrieb machen. Bitte melde daher Fehler und auch sonstige Wünsche an Niklas unter @niklasschroetler:chat.upi.li oder niklas.schroetler@tu-dortmund.de"
}
......
export const BASE_URL = "/infoscreen"; // No trailing slash
import {LayoutConfig} from "../types/LayoutConfig";
import {BASE_URL} from "../config";
const NO_LAYOUT_CONFIG: LayoutConfig = {
id: "",
......@@ -14,9 +13,9 @@ export class LayoutService {
static async init(): Promise<void> {
try {
const activeConfigs = await fetch(BASE_URL + "/activeConfigs.json").then(content => content.json());
const activeConfigs = await fetch("/activeConfigs.json").then(content => content.json());
const configFetches = (activeConfigs as string[])
.map(configPath => fetch(BASE_URL + "/" + configPath).then(content => content.json()));
.map(configPath => fetch(configPath).then(content => content.json()));
LayoutService.configs = await Promise.all(configFetches);
} catch (e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment