toolbar and pwa
This commit is contained in:
@@ -1330,7 +1330,7 @@ var config = {
|
|||||||
// },
|
// },
|
||||||
deeplinking: {
|
deeplinking: {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
hideLogo: false,
|
hideLogo: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// // The terms, privacy and help centre URL's.
|
// // The terms, privacy and help centre URL's.
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ config.doNotStoreRoom = true;
|
|||||||
config.disableDeepLinking = true;
|
config.disableDeepLinking = true;
|
||||||
config.deeplinking = {
|
config.deeplinking = {
|
||||||
disabled: true,
|
disabled: true,
|
||||||
hideLogo: false
|
hideLogo: true
|
||||||
};
|
};
|
||||||
|
|
||||||
config.enableEncodedTransformSupport = true;
|
config.enableEncodedTransformSupport = true;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ ASSETS_SRC="$JITSI_DIR/assets/public/politictalk"
|
|||||||
PROSODY_PLUGINS_SRC="$JITSI_DIR/prosody-plugins"
|
PROSODY_PLUGINS_SRC="$JITSI_DIR/prosody-plugins"
|
||||||
TITLE_SRC="$JITSI_DIR/web/title.html"
|
TITLE_SRC="$JITSI_DIR/web/title.html"
|
||||||
PLUGIN_HEAD_SRC="$JITSI_DIR/web/plugin.head.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"
|
INTERFACE_SRC="$JITSI_DIR/interface_config/politictalk-overrides.js"
|
||||||
NGINX_SRC="$JITSI_DIR/nginx/$DOMAIN.conf"
|
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"
|
PROSODY_PLUGINS_DEST="/usr/share/jitsi-meet/prosody-plugins"
|
||||||
TITLE_DEST="/usr/share/jitsi-meet/title.html"
|
TITLE_DEST="/usr/share/jitsi-meet/title.html"
|
||||||
PLUGIN_HEAD_DEST="/usr/share/jitsi-meet/plugin.head.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"
|
INTERFACE_DEST="/usr/share/jitsi-meet/interface_config.js"
|
||||||
NGINX_DEST="/etc/nginx/sites-available/$DOMAIN.conf"
|
NGINX_DEST="/etc/nginx/sites-available/$DOMAIN.conf"
|
||||||
|
|
||||||
@@ -60,6 +62,11 @@ if [[ ! -f "$PLUGIN_HEAD_SRC" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "$MANIFEST_SRC" ]]; then
|
||||||
|
echo "Missing manifest source: $MANIFEST_SRC"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -f "$INTERFACE_SRC" ]]; then
|
if [[ ! -f "$INTERFACE_SRC" ]]; then
|
||||||
echo "Missing interface source: $INTERFACE_SRC"
|
echo "Missing interface source: $INTERFACE_SRC"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -96,6 +103,11 @@ if [[ -f "$PLUGIN_HEAD_DEST" ]]; then
|
|||||||
cp -a "$PLUGIN_HEAD_DEST" "$BACKUP_DIR/usr-share-jitsi-meet/"
|
cp -a "$PLUGIN_HEAD_DEST" "$BACKUP_DIR/usr-share-jitsi-meet/"
|
||||||
fi
|
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
|
if [[ -f "$INTERFACE_DEST" ]]; then
|
||||||
install -d -m 0755 "$BACKUP_DIR/usr-share-jitsi-meet"
|
install -d -m 0755 "$BACKUP_DIR/usr-share-jitsi-meet"
|
||||||
cp -a "$INTERFACE_DEST" "$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 -d -m 0755 "$WEB_IMAGES_DEST"
|
||||||
install -m 0644 "$CONFIG_SRC" "$CONFIG_DEST"
|
install -m 0644 "$CONFIG_SRC" "$CONFIG_DEST"
|
||||||
install -m 0644 "$TITLE_SRC" "$TITLE_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
|
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" "$ASSETS_DEST/"
|
||||||
install -m 0644 "$file" "$WEB_IMAGES_DEST/"
|
install -m 0644 "$file" "$WEB_IMAGES_DEST/"
|
||||||
|
|||||||
22
web/manifest.json
Normal file
22
web/manifest.json
Normal 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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -474,7 +474,6 @@
|
|||||||
html:not(.politictalk-direct-access-blocked) .toolbox-content-wrapper {
|
html:not(.politictalk-direct-access-blocked) .toolbox-content-wrapper {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
pointer-events: auto !important;
|
pointer-events: auto !important;
|
||||||
transform: translateY(0) !important;
|
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
visibility: visible !important;
|
visibility: visible !important;
|
||||||
z-index: 1000 !important;
|
z-index: 1000 !important;
|
||||||
@@ -482,11 +481,16 @@
|
|||||||
|
|
||||||
html:not(.politictalk-direct-access-blocked) #new-toolbox,
|
html:not(.politictalk-direct-access-blocked) #new-toolbox,
|
||||||
html:not(.politictalk-direct-access-blocked) .toolbox {
|
html:not(.politictalk-direct-access-blocked) .toolbox {
|
||||||
|
align-items: center !important;
|
||||||
bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
|
bottom: calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
|
||||||
|
display: flex !important;
|
||||||
|
justify-content: center !important;
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
position: fixed !important;
|
position: fixed !important;
|
||||||
right: 0 !important;
|
right: 0 !important;
|
||||||
top: auto !important;
|
top: auto !important;
|
||||||
|
transform: none !important;
|
||||||
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.politictalk-direct-access-blocked) .toolbox-content,
|
html:not(.politictalk-direct-access-blocked) .toolbox-content,
|
||||||
@@ -495,6 +499,18 @@
|
|||||||
max-width: calc(100vw - 20px) !important;
|
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 {
|
.politictalk-direct-access {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
padding: 150px 18px 18px;
|
padding: 150px 18px 18px;
|
||||||
@@ -513,6 +529,9 @@
|
|||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
var PARALLEL_GLOBE_URL = 'https://parallelglobe.io';
|
var PARALLEL_GLOBE_URL = 'https://parallelglobe.io';
|
||||||
|
|
||||||
|
disablePoliticTalkPwaInstallPrompt();
|
||||||
|
|
||||||
var restoredMeetingToken = restoreMeetingTokenFromSession();
|
var restoredMeetingToken = restoreMeetingTokenFromSession();
|
||||||
|
|
||||||
if (restoredMeetingToken) {
|
if (restoredMeetingToken) {
|
||||||
@@ -532,6 +551,50 @@
|
|||||||
return window.location.pathname.replace(/\/+$/, '');
|
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) {
|
function isIgnoredJitsiPath(path) {
|
||||||
return /^\/(?:static|images|libs|css|sounds|fonts|transcripts)\//.test(path);
|
return /^\/(?:static|images|libs|css|sounds|fonts|transcripts)\//.test(path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,11 @@
|
|||||||
<meta property="og:image" content="/images/politictalk/pgLogo.svg" />
|
<meta property="og:image" content="/images/politictalk/pgLogo.svg" />
|
||||||
<meta property="og:description" content="Join a PoliticTalk session by ParallelGlobe" />
|
<meta property="og:description" content="Join a PoliticTalk session by ParallelGlobe" />
|
||||||
<meta name="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="name" content="PoliticTalk" />
|
||||||
<meta itemprop="description" content="Join a PoliticTalk session by ParallelGlobe" />
|
<meta itemprop="description" content="Join a PoliticTalk session by ParallelGlobe" />
|
||||||
<meta itemprop="image" content="/images/politictalk/pgLogo.svg" />
|
<meta itemprop="image" content="/images/politictalk/pgLogo.svg" />
|
||||||
<link rel="icon" href="/images/politictalk/favicon.ico" />
|
<link rel="icon" href="/images/politictalk/favicon.ico" />
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
|
|||||||
Reference in New Issue
Block a user