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 @@ ...@@ -46,6 +46,5 @@
}, },
"devDependencies": { "devDependencies": {
"tailwindcss": "^3.3.2" "tailwindcss": "^3.3.2"
}, }
"homepage": "https://niklasschroetler.fspages.org/infoscreen"
} }
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"h": 5 "h": 5
}, },
"config": { "config": {
"url": "/infoscreen/content/warning.png", "url": "/content/warning.png",
"title": "Achtung, Testbetrieb", "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" "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 {LayoutConfig} from "../types/LayoutConfig";
import {BASE_URL} from "../config";
const NO_LAYOUT_CONFIG: LayoutConfig = { const NO_LAYOUT_CONFIG: LayoutConfig = {
id: "", id: "",
...@@ -14,9 +13,9 @@ export class LayoutService { ...@@ -14,9 +13,9 @@ export class LayoutService {
static async init(): Promise<void> { static async init(): Promise<void> {
try { 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[]) 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); LayoutService.configs = await Promise.all(configFetches);
} catch (e) { } catch (e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment