Compare commits

...

3 Commits

Author SHA1 Message Date
Horatiu Muresan 56839742b4 feat(route) Redirect to a custom welcome page 2022-12-13 22:14:36 +02:00
Horatiu Muresan 7a247f2b59 fix(prejoin) Fix missing lib error 2022-12-13 22:14:27 +02:00
Gabriel Borlea c20f212365 chore(deps) lib-jitsi-meet@latest
https://github.com/jitsi/lib-jitsi-meet/compare/v1549.0.0+877c4546...v1553.0.0+57646337
2022-12-13 18:23:59 +02:00
9 changed files with 52 additions and 11 deletions

View File

@ -580,9 +580,19 @@ var config = {
// Require users to always specify a display name.
// requireDisplayName: true,
// DEPRECATED! Use 'welcomePage.disabled' instead.
// Whether to use a welcome page or not. In case it's false a random room
// will be joined when no room is specified.
enableWelcomePage: true,
// enableWelcomePage: true,
// Configs for welcome page.
// welcomePage: {
// // Whether to disable welcome page. In case it's disabled a random room
// // will be joined when no room is specified.
// disabled: false,
// // If set,landing page will redirect to this URL.
// customUrl: ''
// },
// Disable app shortcuts that are registered upon joining a conference
// disableShortcuts: false,

10
package-lock.json generated
View File

@ -74,7 +74,7 @@
"js-md5": "0.6.1",
"js-sha512": "0.8.0",
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1549.0.0+877c4546/lib-jitsi-meet.tgz",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1553.0.0+57646337/lib-jitsi-meet.tgz",
"lodash": "4.17.21",
"moment": "2.29.4",
"moment-duration-format": "2.2.2",
@ -13497,8 +13497,8 @@
},
"node_modules/lib-jitsi-meet": {
"version": "0.0.0",
"resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1549.0.0+877c4546/lib-jitsi-meet.tgz",
"integrity": "sha512-cxzr8vnJ6RyqWYzJ4LO09PqblJ6nIrJFFmzW8kPQgC1Nhq7sDAD896827q/shd+FE6bSoK0xVjDP+gW+JInS9A==",
"resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1553.0.0+57646337/lib-jitsi-meet.tgz",
"integrity": "sha512-Adbyn1E5xJAU76sDntpwOUMX/quy8hLFwRVXfnT8tS6RX1N1B6DAu0N0qHkZplgqSRiufCqkaWAjzEWjPKzn+g==",
"license": "Apache-2.0",
"dependencies": {
"@jitsi/js-utils": "2.0.0",
@ -30510,8 +30510,8 @@
}
},
"lib-jitsi-meet": {
"version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1549.0.0+877c4546/lib-jitsi-meet.tgz",
"integrity": "sha512-cxzr8vnJ6RyqWYzJ4LO09PqblJ6nIrJFFmzW8kPQgC1Nhq7sDAD896827q/shd+FE6bSoK0xVjDP+gW+JInS9A==",
"version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1553.0.0+57646337/lib-jitsi-meet.tgz",
"integrity": "sha512-Adbyn1E5xJAU76sDntpwOUMX/quy8hLFwRVXfnT8tS6RX1N1B6DAu0N0qHkZplgqSRiufCqkaWAjzEWjPKzn+g==",
"requires": {
"@jitsi/js-utils": "2.0.0",
"@jitsi/logger": "2.0.0",

View File

@ -79,7 +79,7 @@
"js-md5": "0.6.1",
"js-sha512": "0.8.0",
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1549.0.0+877c4546/lib-jitsi-meet.tgz",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1553.0.0+57646337/lib-jitsi-meet.tgz",
"lodash": "4.17.21",
"moment": "2.29.4",
"moment-duration-format": "2.2.2",

View File

@ -21,6 +21,7 @@ import { isVpaasMeeting } from '../jaas/functions';
import { clearNotifications, showNotification } from '../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
import { setFatalError } from '../overlay/actions';
import { isWelcomePageEnabled } from '../welcome/functions';
import {
redirectToStaticPage,
@ -203,7 +204,7 @@ export function maybeRedirectToWelcomePage(options: { feedbackSubmitted?: boolea
// if Welcome page is enabled redirect to welcome page after 3 sec, if
// there is a thank you message to be shown, 0.5s otherwise.
if (getState()['features/base/config'].enableWelcomePage) {
if (isWelcomePageEnabled(getState())) {
setTimeout(
() => {
dispatch(redirectWithStoredParams('/'));

View File

@ -8,7 +8,7 @@ import { Conference } from '../conference';
import { getDeepLinkingPage } from '../deep-linking';
import { UnsupportedDesktopBrowser } from '../unsupported-browser';
import { BlankPage, WelcomePage } from '../welcome';
import { isWelcomePageEnabled } from '../welcome/functions';
import { getCustomLandingPageURL, isWelcomePageEnabled } from '../welcome/functions';
/**
* Determines which route is to be rendered in order to depict a specific Redux
@ -75,7 +75,13 @@ function _getWebWelcomePageRoute(state) {
if (isWelcomePageEnabled(state)) {
if (isSupportedBrowser()) {
route.component = WelcomePage;
const customLandingPage = getCustomLandingPageURL(state);
if (customLandingPage) {
route.href = customLandingPage;
} else {
route.component = WelcomePage;
}
} else {
route.component = UnsupportedDesktopBrowser;
}

View File

@ -506,6 +506,10 @@ export interface IConfig {
webrtcIceUdpDisable?: boolean;
websocket?: string;
websocketKeepAliveUrl?: string;
welcomePage?: {
customUrl?: string;
disabled?: boolean;
};
whiteboard?: {
collabServerBaseUrl?: string;
enabled?: boolean;

View File

@ -338,6 +338,13 @@ function _translateLegacyConfig(oldValue: IConfig) {
});
}
newValue.welcomePage = oldValue.welcomePage || {};
if (oldValue.hasOwnProperty('enableWelcomePage')
&& !newValue.welcomePage.hasOwnProperty('disabled')
) {
newValue.welcomePage.disabled = !oldValue.enableWelcomePage;
}
newValue.prejoinConfig = oldValue.prejoinConfig || {};
if (oldValue.hasOwnProperty('prejoinPageEnabled')
&& !newValue.prejoinConfig.hasOwnProperty('enabled')

View File

@ -17,5 +17,17 @@ export function isWelcomePageEnabled(stateful: IStateful) {
return getFeatureFlag(stateful, WELCOME_PAGE_ENABLED, false);
}
return toState(stateful)['features/base/config'].enableWelcomePage;
const config = toState(stateful)['features/base/config'];
return !config.welcomePage?.disabled;
}
/**
* Returns the configured custom URL (if any) to redirect to instead of the normal landing page.
*
* @param {IStateful} stateful - The redux state or {@link getState}.
* @returns {string} - The custom URL.
*/
export function getCustomLandingPageURL(stateful: IStateful) {
return toState(stateful)['features/base/config'].welcomePage?.customUrl;
}

View File

@ -6,6 +6,7 @@
<!--#include virtual="/base.html" -->
<link rel="stylesheet" href="css/all.css">
<script>
window.EXCALIDRAW_ASSET_PATH = 'libs/';
document.addEventListener('DOMContentLoaded', () => {
if (!JitsiMeetJS.app) {
return;