snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
33
react/features/welcome/functions.ts
Normal file
33
react/features/welcome/functions.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { IStateful } from '../base/app/types';
|
||||
import { WELCOME_PAGE_ENABLED } from '../base/flags/constants';
|
||||
import { getFeatureFlag } from '../base/flags/functions';
|
||||
import { toState } from '../base/redux/functions';
|
||||
|
||||
|
||||
/**
|
||||
* Determines whether the {@code WelcomePage} is enabled.
|
||||
*
|
||||
* @param {IStateful} stateful - The redux state or {@link getState}
|
||||
* function.
|
||||
* @returns {boolean} If the {@code WelcomePage} is enabled by the app, then
|
||||
* {@code true}; otherwise, {@code false}.
|
||||
*/
|
||||
export function isWelcomePageEnabled(stateful: IStateful) {
|
||||
if (navigator.product === 'ReactNative') {
|
||||
return getFeatureFlag(stateful, WELCOME_PAGE_ENABLED, false);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user