Compare commits

..
5 Commits
5 changed files with 114 additions and 39 deletions

No files matched your search

+16
View File
@@ -2,6 +2,22 @@
A small html/js project to nudge a user to use the desktop client for Jitsi. A small html/js project to nudge a user to use the desktop client for Jitsi.
## Configuration
All settings live in `assets/config.json`, loaded at startup. The launcher stays
up but links break if the file is missing or malformed.
| Parameter | Description |
| --- | --- |
| `jitsiLauncher` | Domain of this Jitsi launcher. Used for the meeting URLs created by the meeting creator (Nextcloud, adhoc link). |
| `jitsiHost` | Jitsi domain. Used for the browser fallback URL, the desktop protocol URL and the UID of generated ICS files. |
| `nextcloudBase` | Nextcloud instance for calendar event creation. The "Create in Nextcloud Calendar" button is only shown if this is set. |
| `allowAdhocMeetings` | Whether adhoc meetings are allowed. The "Create Adhoc Link" button is only shown if this is `true`. |
| `launchTimeout` | Timeout in ms before the browser fallback is shown after trying to start the jitsi-meet-electron client. |
| `backgroundImage` | Path to the page background image. Empty: no background. |
| `logo` | Path to the logo shown in the logo bar. Empty: logo bar stays hidden. |
| `downloads` | Download URLs for the jitsi-meet clients, shown in the fallback view per detected OS: `windows`, `macos`, `linux`, `ios`, `android`. |
## Third-party assets ## Third-party assets
- `assets/lib/ua-parser.min.js` — [ua-parser-js](https://github.com/faisalman/ua-parser-js) v2.0.10, © Faisal Salman, licensed under AGPL-3.0. - `assets/lib/ua-parser.min.js` — [ua-parser-js](https://github.com/faisalman/ua-parser-js) v2.0.10, © Faisal Salman, licensed under AGPL-3.0.
+16
View File
@@ -0,0 +1,16 @@
{
"jitsiLauncher": "meet.bnvb.eu",
"jitsiHost": "meet.bnvb-ingenieure.de",
"nextcloudBase": "https://cloud.bnvb-ingenieure.de",
"allowAdhocMeetings": true,
"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"
}
}
+8
View File
@@ -64,7 +64,9 @@
"creator": { "creator": {
"title": "Create New Meeting", "title": "Create New Meeting",
"meetingNameLabel": "Meeting Name", "meetingNameLabel": "Meeting Name",
"meetingNamePlaceholder": "My Meeting",
"meetingDescriptionLabel": "Description", "meetingDescriptionLabel": "Description",
"meetingDescriptionPlaceholder": "Meeting description (optional)",
"meetingStartLabel": "Start Date & Time", "meetingStartLabel": "Start Date & Time",
"meetingEndLabel": "End Date & Time", "meetingEndLabel": "End Date & Time",
"meetingOrganizerLabel": "Organizer Email", "meetingOrganizerLabel": "Organizer Email",
@@ -152,7 +154,9 @@
"creator": { "creator": {
"title": "Neues Meeting erstellen", "title": "Neues Meeting erstellen",
"meetingNameLabel": "Meeting-Name", "meetingNameLabel": "Meeting-Name",
"meetingNamePlaceholder": "Mein Meeting",
"meetingDescriptionLabel": "Beschreibung", "meetingDescriptionLabel": "Beschreibung",
"meetingDescriptionPlaceholder": "Beschreibung des Meetings (optional)",
"meetingStartLabel": "Start Datum & Uhrzeit", "meetingStartLabel": "Start Datum & Uhrzeit",
"meetingEndLabel": "Ende Datum & Uhrzeit", "meetingEndLabel": "Ende Datum & Uhrzeit",
"meetingOrganizerLabel": "Organisator E-Mail", "meetingOrganizerLabel": "Organisator E-Mail",
@@ -240,7 +244,9 @@
"creator": { "creator": {
"title": "Créer une nouvelle réunion", "title": "Créer une nouvelle réunion",
"meetingNameLabel": "Nom de la réunion", "meetingNameLabel": "Nom de la réunion",
"meetingNamePlaceholder": "Ma réunion",
"meetingDescriptionLabel": "Description", "meetingDescriptionLabel": "Description",
"meetingDescriptionPlaceholder": "Description de la réunion (facultatif)",
"meetingStartLabel": "Date et heure de début", "meetingStartLabel": "Date et heure de début",
"meetingEndLabel": "Date et heure de fin", "meetingEndLabel": "Date et heure de fin",
"meetingOrganizerLabel": "Email de l'organisateur", "meetingOrganizerLabel": "Email de l'organisateur",
@@ -328,7 +334,9 @@
"creator": { "creator": {
"title": "创建新会议", "title": "创建新会议",
"meetingNameLabel": "会议名称", "meetingNameLabel": "会议名称",
"meetingNamePlaceholder": "我的会议",
"meetingDescriptionLabel": "描述", "meetingDescriptionLabel": "描述",
"meetingDescriptionPlaceholder": "会议描述(可选)",
"meetingStartLabel": "开始日期和时间", "meetingStartLabel": "开始日期和时间",
"meetingEndLabel": "结束日期和时间", "meetingEndLabel": "结束日期和时间",
"meetingOrganizerLabel": "组织者邮箱", "meetingOrganizerLabel": "组织者邮箱",
+70 -35
View File
@@ -5,42 +5,12 @@
* ============================================================ * ============================================================
*/ */
const CONFIG = { /*
/* * Konfiguration liegt in assets/config.json und wird beim
* Your Jitsi Launcher domain * Start asynchron geladen (siehe START).
*/ */
jitsiLauncher: "meet.bnvb.eu", let CONFIG = {};
/* const CONFIG_URL = "assets/config.json";
* 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"
}
};
/* ============================================================ /* ============================================================
* Translations * Translations
@@ -121,6 +91,19 @@ function applyTranslations() {
element.textContent = value; element.textContent = value;
} }
}); });
/*
* Platzhalter von Eingabefeldern übersetzen.
*/
document
.querySelectorAll("[data-i18n-placeholder]")
.forEach((element) => {
const value = getTranslation(element.dataset.i18nPlaceholder);
if (value !== null) {
element.placeholder = value;
}
});
} }
/* /*
@@ -326,6 +309,40 @@ function applyLogo() {
logoBar.classList.remove("hidden"); logoBar.classList.remove("hidden");
} }
/* ============================================================
* NEXTCLOUD BUTTON
* ============================================================
*/
/*
* Nur anzeigen, wenn eine Nextcloud-Instanz konfiguriert
* ist (CONFIG.nextcloudBase in assets/config.json).
*/
function applyNextcloudButton() {
if (!CONFIG.nextcloudBase || !createNextcloudButton) {
return;
}
createNextcloudButton.classList.remove("hidden");
}
/* ============================================================
* ADHOC BUTTON
* ============================================================
*/
/*
* Nur anzeigen, wenn explizit aktiviert
* (CONFIG.allowAdhocMeetings in assets/config.json).
*/
function applyAdhocButton() {
if (!CONFIG.allowAdhocMeetings || !createAdhocButton) {
return;
}
createAdhocButton.classList.remove("hidden");
}
/* ============================================================ /* ============================================================
* DOM elements * DOM elements
* ============================================================ * ============================================================
@@ -1440,6 +1457,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() { async function loadTranslations() {
try { try {
const response = await fetch(I18N_URL); const response = await fetch(I18N_URL);
@@ -1461,8 +1491,13 @@ async function loadTranslations() {
*/ */
async function start() { async function start() {
applyTheme(); applyTheme();
await loadConfig();
applyBackgroundImage(); applyBackgroundImage();
applyLogo(); applyLogo();
applyNextcloudButton();
applyAdhocButton();
await loadTranslations(); await loadTranslations();
+4 -4
View File
@@ -262,12 +262,12 @@
<div class="form-group"> <div class="form-group">
<label for="meetingName" data-i18n="creator.meetingNameLabel">Meeting Name</label> <label for="meetingName" data-i18n="creator.meetingNameLabel">Meeting Name</label>
<input type="text" id="meetingName" placeholder="My Meeting" /> <input type="text" id="meetingName" placeholder="My Meeting" data-i18n-placeholder="creator.meetingNamePlaceholder" />
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="meetingDescription" data-i18n="creator.meetingDescriptionLabel">Description</label> <label for="meetingDescription" data-i18n="creator.meetingDescriptionLabel">Description</label>
<textarea id="meetingDescription" placeholder="Meeting description (optional)"></textarea> <textarea id="meetingDescription" placeholder="Meeting description (optional)" data-i18n-placeholder="creator.meetingDescriptionPlaceholder"></textarea>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -289,10 +289,10 @@
<button id="createMeetingButton" class="button primary" type="button" data-i18n="creator.createButton"> <button id="createMeetingButton" class="button primary" type="button" data-i18n="creator.createButton">
Create Meeting Create Meeting
</button> </button>
<button id="createNextcloudButton" class="button primary" type="button" data-i18n="creator.nextcloudButton"> <button id="createNextcloudButton" class="button primary hidden" type="button" data-i18n="creator.nextcloudButton">
Create in Nextcloud Calendar Create in Nextcloud Calendar
</button> </button>
<button id="createAdhocButton" class="button secondary" type="button" data-i18n="creator.adhocButton"> <button id="createAdhocButton" class="button secondary hidden" type="button" data-i18n="creator.adhocButton">
Create Adhoc Link Create Adhoc Link
</button> </button>
<button id="cancelCreateButton" class="button secondary" type="button" data-i18n="creator.cancelButton"> <button id="cancelCreateButton" class="button secondary" type="button" data-i18n="creator.cancelButton">