toolbar and pwa

This commit is contained in:
2026-05-29 23:09:22 +05:30
parent bfc384f8e4
commit 8f006df440
6 changed files with 105 additions and 3 deletions

View File

@@ -1330,7 +1330,7 @@ var config = {
// },
deeplinking: {
disabled: true,
hideLogo: false,
hideLogo: true,
},
// // The terms, privacy and help centre URL's.

View File

@@ -29,7 +29,7 @@ config.doNotStoreRoom = true;
config.disableDeepLinking = true;
config.deeplinking = {
disabled: true,
hideLogo: false
hideLogo: true
};
config.enableEncodedTransformSupport = true;

View File

@@ -13,6 +13,7 @@ ASSETS_SRC="$JITSI_DIR/assets/public/politictalk"
PROSODY_PLUGINS_SRC="$JITSI_DIR/prosody-plugins"
TITLE_SRC="$JITSI_DIR/web/title.html"
PLUGIN_HEAD_SRC="$JITSI_DIR/web/plugin.head.html"
MANIFEST_SRC="$JITSI_DIR/web/manifest.json"
INTERFACE_SRC="$JITSI_DIR/interface_config/politictalk-overrides.js"
NGINX_SRC="$JITSI_DIR/nginx/$DOMAIN.conf"
@@ -22,6 +23,7 @@ WEB_IMAGES_DEST="/usr/share/jitsi-meet/images/politictalk"
PROSODY_PLUGINS_DEST="/usr/share/jitsi-meet/prosody-plugins"
TITLE_DEST="/usr/share/jitsi-meet/title.html"
PLUGIN_HEAD_DEST="/usr/share/jitsi-meet/plugin.head.html"
MANIFEST_DEST="/usr/share/jitsi-meet/manifest.json"
INTERFACE_DEST="/usr/share/jitsi-meet/interface_config.js"
NGINX_DEST="/etc/nginx/sites-available/$DOMAIN.conf"
@@ -60,6 +62,11 @@ if [[ ! -f "$PLUGIN_HEAD_SRC" ]]; then
exit 1
fi
if [[ ! -f "$MANIFEST_SRC" ]]; then
echo "Missing manifest source: $MANIFEST_SRC"
exit 1
fi
if [[ ! -f "$INTERFACE_SRC" ]]; then
echo "Missing interface source: $INTERFACE_SRC"
exit 1
@@ -96,6 +103,11 @@ if [[ -f "$PLUGIN_HEAD_DEST" ]]; then
cp -a "$PLUGIN_HEAD_DEST" "$BACKUP_DIR/usr-share-jitsi-meet/"
fi
if [[ -f "$MANIFEST_DEST" ]]; then
install -d -m 0755 "$BACKUP_DIR/usr-share-jitsi-meet"
cp -a "$MANIFEST_DEST" "$BACKUP_DIR/usr-share-jitsi-meet/"
fi
if [[ -f "$INTERFACE_DEST" ]]; then
install -d -m 0755 "$BACKUP_DIR/usr-share-jitsi-meet"
cp -a "$INTERFACE_DEST" "$BACKUP_DIR/usr-share-jitsi-meet/"
@@ -114,6 +126,7 @@ install -d -m 0755 "$ASSETS_DEST"
install -d -m 0755 "$WEB_IMAGES_DEST"
install -m 0644 "$CONFIG_SRC" "$CONFIG_DEST"
install -m 0644 "$TITLE_SRC" "$TITLE_DEST"
install -m 0644 "$MANIFEST_SRC" "$MANIFEST_DEST"
find "$ASSETS_SRC" -maxdepth 1 -type f -print0 | while IFS= read -r -d '' file; do
install -m 0644 "$file" "$ASSETS_DEST/"
install -m 0644 "$file" "$WEB_IMAGES_DEST/"

22
web/manifest.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "PoliticTalk",
"short_name": "PoliticTalk",
"description": "Join a PoliticTalk session by Parallel Globe.",
"start_url": "/",
"scope": "/",
"display": "browser",
"background_color": "#101820",
"theme_color": "#63477a",
"icons": [
{
"src": "/images/politictalk/pg_globe.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/politictalk/pg_globe.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

View File

@@ -474,7 +474,6 @@
html:not(.politictalk-direct-access-blocked) .toolbox-content-wrapper {
opacity: 1 !important;
pointer-events: auto !important;
transform: translateY(0) !important;
transition: none !important;
visibility: visible !important;
z-index: 1000 !important;
@@ -482,11 +481,16 @@
html:not(.politictalk-direct-access-blocked) #new-toolbox,
html:not(.politictalk-direct-access-blocked) .toolbox {
align-items: center !important;
bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
display: flex !important;
justify-content: center !important;
left: 0 !important;
position: fixed !important;
right: 0 !important;
top: auto !important;
transform: none !important;
width: 100% !important;
}
html:not(.politictalk-direct-access-blocked) .toolbox-content,
@@ -495,6 +499,18 @@
max-width: calc(100vw - 20px) !important;
}
html:not(.politictalk-direct-access-blocked) .toolbox-content-wrapper {
left: 50% !important;
right: auto !important;
transform: translateX(-50%) !important;
}
html:not(.politictalk-direct-access-blocked) .toolbox-content {
margin-left: auto !important;
margin-right: auto !important;
transform: none !important;
}
.politictalk-direct-access {
align-items: flex-start;
padding: 150px 18px 18px;
@@ -513,6 +529,9 @@
<script>
(function() {
var PARALLEL_GLOBE_URL = 'https://parallelglobe.io';
disablePoliticTalkPwaInstallPrompt();
var restoredMeetingToken = restoreMeetingTokenFromSession();
if (restoredMeetingToken) {
@@ -532,6 +551,50 @@
return window.location.pathname.replace(/\/+$/, '');
}
function disablePoliticTalkPwaInstallPrompt() {
window.addEventListener('beforeinstallprompt', function(event) {
event.preventDefault();
});
rewritePoliticTalkManifestLinks();
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', rewritePoliticTalkManifestLinks);
}
if ('serviceWorker' in window.navigator) {
window.navigator.serviceWorker.getRegistrations()
.then(function(registrations) {
registrations.forEach(function(registration) {
registration.unregister();
});
})
.catch(function() {
// The meeting does not depend on the PWA worker.
});
}
}
function rewritePoliticTalkManifestLinks() {
if (!document.head) {
return;
}
var links = document.querySelectorAll('link[rel~="manifest"]');
if (!links.length) {
var link = document.createElement('link');
link.rel = 'manifest';
link.href = '/manifest.json';
document.head.appendChild(link);
return;
}
links.forEach(function(link) {
link.href = '/manifest.json';
});
}
function isIgnoredJitsiPath(path) {
return /^\/(?:static|images|libs|css|sounds|fonts|transcripts)\//.test(path);
}

View File

@@ -3,7 +3,11 @@
<meta property="og:image" content="/images/politictalk/pgLogo.svg" />
<meta property="og:description" content="Join a PoliticTalk session by ParallelGlobe" />
<meta name="description" content="Join a PoliticTalk session by ParallelGlobe" />
<meta name="application-name" content="PoliticTalk" />
<meta name="apple-mobile-web-app-title" content="PoliticTalk" />
<meta name="theme-color" content="#63477a" />
<meta itemprop="name" content="PoliticTalk" />
<meta itemprop="description" content="Join a PoliticTalk session by ParallelGlobe" />
<meta itemprop="image" content="/images/politictalk/pgLogo.svg" />
<link rel="icon" href="/images/politictalk/favicon.ico" />
<link rel="manifest" href="/manifest.json" />