move const CONFIG to json file and add documentation in README.md

This commit is contained in:
stefan.tollkuehn committed 2026-10-22 15:33:52 +02:00
1 parent c172c057eb
commit e9ad3882d2
3 files changed
+52 -36

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
{
"jitsiLauncher": "meet.bnvb.eu",
"jitsiHost": "meet.bnvb-ingenieure.de",
"nextcloudBase": "https://cloud.bnvb-ingenieure.de",
"launchTimeout": 2000,
"backgroundImage": "assets/images/background.png",
"logo": "assets/images/logo.svg",
"downloads": {
"windows": "https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.exe",
"macos": "https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.dmg",
"linux": "https://github.com/jitsi/jitsi-meet-electron/releases",
"ios": "https://apps.apple.com/app/jitsi-meet/id1165103905",
"android": "https://play.google.com/store/apps/details?id=org.jitsi.meet"
}
}
+22 -36
View File
@@ -5,42 +5,12 @@
* ============================================================
*/
const CONFIG = {
/*
* Your Jitsi Launcher domain
*/
jitsiLauncher: "meet.bnvb.eu",
/*
* Your Jitsi domain.
*/
jitsiHost: "meet.bnvb-ingenieure.de",
/*
* Your Nextcloud instance (calendar event creation).
*/
nextcloudBase: "https://cloud.bnvb-ingenieure.de",
/*
* Timeout trying to start the jitsi-meet-electron client
*/
launchTimeout: 2000,
/*
* set wallpaper for webpage
*/
backgroundImage: "assets/images/background.png",
/*
* Set logo
*/
logo: "assets/images/logo.svg",
/*
* Download URLs for jitsi-meet clients
*/
downloads: {
windows: "https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.exe",
macos: "https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.dmg",
linux: "https://github.com/jitsi/jitsi-meet-electron/releases",
ios: "https://apps.apple.com/app/jitsi-meet/id1165103905",
android: "https://play.google.com/store/apps/details?id=org.jitsi.meet"
}
};
/*
* Konfiguration liegt in assets/config.json und wird beim
* Start asynchron geladen (siehe START).
*/
let CONFIG = {};
const CONFIG_URL = "assets/config.json";
/* ============================================================
* Translations
@@ -1440,6 +1410,19 @@ window
* ============================================================
*/
async function loadConfig() {
try {
const response = await fetch(CONFIG_URL);
CONFIG = await response.json();
} catch (error) {
/*
* Ohne Datei bleiben Launcher unbrauchbar – Fehler
* melden und mit leerer Konfiguration fortfahren.
*/
console.error("Error loading config:", error);
}
}
async function loadTranslations() {
try {
const response = await fetch(I18N_URL);
@@ -1461,6 +1444,9 @@ async function loadTranslations() {
*/
async function start() {
applyTheme();
await loadConfig();
applyBackgroundImage();
applyLogo();