Make favicon paths configurable
The favicons were hardcoded in launch.html, so rebranding the page required editing the template. The paths now come from the favicons block in assets/config.json. Missing keys keep the defaults from launch.html.
This commit is contained in:
1 parent
9184f60461
commit
0e4ba86c38
4 files changed
+42
-3
No files matched your search
@@ -6,6 +6,11 @@
|
||||
"launchTimeout": 2000,
|
||||
"backgroundImage": "path/to/backgroundimage",
|
||||
"logo": "path/to/logo",
|
||||
"favicons": {
|
||||
"ico": "path/to/favicon.ico",
|
||||
"svg": "path/to/favicon.svg",
|
||||
"appleTouch": "path/to/apple-touch-icon.png"
|
||||
},
|
||||
"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",
|
||||
|
||||
@@ -309,6 +309,33 @@ function applyLogo() {
|
||||
logoBar.classList.remove("hidden");
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* FAVICONS
|
||||
* ============================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
* Overwrite the default icons from launch.html
|
||||
* (CONFIG.favicons in assets/config.json).
|
||||
*/
|
||||
function applyFavicons() {
|
||||
if (!CONFIG.favicons) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CONFIG.favicons.ico) {
|
||||
faviconIco.href = CONFIG.favicons.ico;
|
||||
}
|
||||
|
||||
if (CONFIG.favicons.svg) {
|
||||
faviconSvg.href = CONFIG.favicons.svg;
|
||||
}
|
||||
|
||||
if (CONFIG.favicons.appleTouch) {
|
||||
appleTouchIcon.href = CONFIG.favicons.appleTouch;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* NEXTCLOUD BUTTON
|
||||
* ============================================================
|
||||
@@ -412,6 +439,11 @@ const invalidRoomName = document.getElementById("invalidRoomName");
|
||||
const logoBar = document.getElementById("logoBar");
|
||||
const logoImage = document.getElementById("logoImage");
|
||||
|
||||
/* Favicon DOM elements */
|
||||
const faviconIco = document.getElementById("faviconIco");
|
||||
const faviconSvg = document.getElementById("faviconSvg");
|
||||
const appleTouchIcon = document.getElementById("appleTouchIcon");
|
||||
|
||||
/* Theme DOM elements */
|
||||
const themeButton = document.getElementById("themeButton");
|
||||
const themeIconSun = document.getElementById("themeIconSun");
|
||||
@@ -1574,6 +1606,7 @@ async function start() {
|
||||
|
||||
applyBackgroundImage();
|
||||
applyLogo();
|
||||
applyFavicons();
|
||||
applyNextcloudButton();
|
||||
applyAdhocButton();
|
||||
|
||||
|
||||
Reference in new issue
Block a user