fix(ts) make tsc (almost) not cry on native
Co-authored-by: Calinteodor <calin.chitu@8x8.com> Co-authored-by: Robert Pintilii <robert.pin9@gmail.com>
This commit is contained in:
parent
2de0520835
commit
2596c463fe
|
@ -147,12 +147,8 @@ import {
|
|||
} from './react/features/notifications';
|
||||
import { mediaPermissionPromptVisibilityChanged } from './react/features/overlay';
|
||||
import { suspendDetected } from './react/features/power-monitor';
|
||||
import {
|
||||
initPrejoin,
|
||||
isPrejoinPageVisible,
|
||||
makePrecallTest,
|
||||
setJoiningInProgress
|
||||
} from './react/features/prejoin';
|
||||
import { initPrejoin, makePrecallTest, setJoiningInProgress } from './react/features/prejoin/actions';
|
||||
import { isPrejoinPageVisible } from './react/features/prejoin/functions';
|
||||
import { disableReceiver, stopReceiver } from './react/features/remote-control';
|
||||
import { isScreenAudioShared, setScreenAudioShareState } from './react/features/screen-share/';
|
||||
import { toggleScreenshotCaptureSummary } from './react/features/screenshot-capture';
|
||||
|
|
|
@ -2,11 +2,18 @@ import { IConfig } from "./react/features/base/config/configType";
|
|||
|
||||
export {};
|
||||
|
||||
interface ILocation extends URL {
|
||||
assign(url: string);
|
||||
replace(url: string);
|
||||
reload();
|
||||
};
|
||||
|
||||
interface IWindow {
|
||||
JITSI_MEET_LITE_SDK: boolean;
|
||||
JitsiMeetJS: any;
|
||||
config: IConfig;
|
||||
interfaceConfig: any;
|
||||
location: URL;
|
||||
location: ILocation;
|
||||
}
|
||||
|
||||
interface INavigator {
|
||||
|
|
|
@ -95,8 +95,8 @@ import { getParticipantsPaneOpen, isForceMuted } from '../../react/features/part
|
|||
import { startLocalVideoRecording, stopLocalVideoRecording } from '../../react/features/recording';
|
||||
import { RECORDING_TYPES } from '../../react/features/recording/constants';
|
||||
import { getActiveSession, supportsLocalRecording } from '../../react/features/recording/functions';
|
||||
import { isScreenAudioSupported } from '../../react/features/screen-share';
|
||||
import { startAudioScreenShareFlow, startScreenShareFlow } from '../../react/features/screen-share/actions';
|
||||
import { isScreenAudioSupported } from '../../react/features/screen-share/functions';
|
||||
import { toggleScreenshotCaptureSummary } from '../../react/features/screenshot-capture';
|
||||
import { isScreenshotCaptureEnabled } from '../../react/features/screenshot-capture/functions';
|
||||
import { playSharedVideo, stopSharedVideo } from '../../react/features/shared-video/actions.any';
|
||||
|
|
|
@ -156,6 +156,23 @@ export function appNavigate(uri?: string) {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the welcome page is enabled and redirects to it.
|
||||
* If requested show a thank you dialog before that.
|
||||
* If we have a close page enabled, redirect to it without
|
||||
* showing any other dialog.
|
||||
*
|
||||
* @param {Object} _options - Used to decide which particular close page to show
|
||||
* or if close page is disabled, whether we should show the thankyou dialog.
|
||||
* @param {boolean} options.showThankYou - Whether we should
|
||||
* show thank you dialog.
|
||||
* @param {boolean} options.feedbackSubmitted - Whether feedback was submitted.
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function maybeRedirectToWelcomePage(_options: { feedbackSubmitted?: boolean; showThankYou?: boolean; } = {}) {
|
||||
// Dummy.
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the page.
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
||||
import React from 'react';
|
||||
|
||||
import GlobalStyles from '../../base/ui/components/GlobalStyles';
|
||||
import GlobalStyles from '../../base/ui/components/GlobalStyles.web';
|
||||
import JitsiThemeProvider from '../../base/ui/components/JitsiThemeProvider.web';
|
||||
import DialogContainer from '../../base/ui/components/web/DialogContainer';
|
||||
import { ChromeExtensionBanner } from '../../chrome-extension-banner';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// @flow
|
||||
|
||||
import '../analytics/middleware';
|
||||
import '../av-moderation/middleware';
|
||||
import '../base/conference/middleware';
|
||||
|
@ -12,7 +10,6 @@ import '../base/logging/middleware';
|
|||
import '../base/media/middleware';
|
||||
import '../base/net-info/middleware';
|
||||
import '../base/participants/middleware';
|
||||
import '../base/redux/middleware';
|
||||
import '../base/responsive-ui/middleware';
|
||||
import '../base/settings/middleware';
|
||||
import '../base/sounds/middleware';
|
||||
|
@ -46,7 +43,6 @@ import '../room-lock/middleware';
|
|||
import '../rtcstats/middleware';
|
||||
import '../speaker-stats/middleware';
|
||||
import '../subtitles/middleware';
|
||||
import '../toolbox/middleware';
|
||||
import '../transcribing/middleware';
|
||||
import '../video-layout/middleware';
|
||||
import '../video-quality/middleware';
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// @flow
|
||||
|
||||
import '../authentication/middleware';
|
||||
import '../dynamic-branding/middleware';
|
||||
import '../gifs/middleware';
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// @flow
|
||||
|
||||
import '../authentication/middleware';
|
||||
import '../base/i18n/middleware';
|
||||
import '../base/devices/middleware';
|
||||
import '../base/media/middleware';
|
||||
import '../base/redux/middleware';
|
||||
import '../dynamic-branding/middleware';
|
||||
import '../e2ee/middleware';
|
||||
import '../external-api/middleware';
|
||||
|
@ -19,6 +18,7 @@ import '../screen-share/middleware';
|
|||
import '../shared-video/middleware';
|
||||
import '../settings/middleware';
|
||||
import '../talk-while-muted/middleware';
|
||||
import '../toolbox/middleware';
|
||||
import '../face-landmarks/middleware';
|
||||
import '../gifs/middleware';
|
||||
import '../whiteboard/middleware';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import {
|
||||
setPrejoinPageVisibility,
|
||||
setSkipPrejoinOnReload
|
||||
} from '../../prejoin';
|
||||
} from '../../prejoin/actions.web';
|
||||
import { JitsiConferenceErrors } from '../lib-jitsi-meet';
|
||||
import { MiddlewareRegistry } from '../redux';
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
}
|
||||
break;
|
||||
case NOTIFY_CAMERA_ERROR: {
|
||||
if (typeof APP !== 'object' || !action.error) {
|
||||
if (!action.error) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
break;
|
||||
}
|
||||
case NOTIFY_MIC_ERROR: {
|
||||
if (typeof APP !== 'object' || !action.error) {
|
||||
if (!action.error) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -21,8 +21,8 @@ import StopRecordingDialog from '../../recording/components/Recording/web/StopRe
|
|||
// @ts-ignore
|
||||
import RemoteControlAuthorizationDialog from '../../remote-control/components/RemoteControlAuthorizationDialog';
|
||||
import SalesforceLinkDialog from '../../salesforce/components/web/SalesforceLinkDialog';
|
||||
import ShareAudioDialog from '../../screen-share/components/ShareAudioDialog';
|
||||
import ShareScreenWarningDialog from '../../screen-share/components/ShareScreenWarningDialog';
|
||||
import ShareAudioDialog from '../../screen-share/components/web/ShareAudioDialog';
|
||||
import ShareScreenWarningDialog from '../../screen-share/components/web/ShareScreenWarningDialog';
|
||||
import SecurityDialog from '../../security/components/security-dialog/web/SecurityDialog';
|
||||
import LogoutDialog from '../../settings/components/web/LogoutDialog';
|
||||
import SharedVideoDialog from '../../shared-video/components/web/SharedVideoDialog';
|
||||
|
|
|
@ -4,7 +4,7 @@ import React, { ReactNode } from 'react';
|
|||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { IReduxState } from '../../../../app/types';
|
||||
import DeviceStatus from '../../../../prejoin/components/preview/DeviceStatus';
|
||||
import DeviceStatus from '../../../../prejoin/components/web/preview/DeviceStatus';
|
||||
// @ts-ignore
|
||||
import { Toolbox } from '../../../../toolbox/components/web';
|
||||
import { getConferenceName } from '../../../conference/functions';
|
||||
|
|
|
@ -58,24 +58,3 @@ function getDeviceIdByType(state: IReduxState, isType: string) {
|
|||
export function getDisplayName(state: IReduxState): string {
|
||||
return state['features/base/settings'].displayName || '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handles changes to the `disableCallIntegration` setting.
|
||||
* Noop on web.
|
||||
*
|
||||
* @param {boolean} disabled - Whether call integration is disabled or not.
|
||||
* @returns {void}
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function, require-jsdoc
|
||||
export function handleCallIntegrationChange(disabled: boolean) { }
|
||||
|
||||
/**
|
||||
* Handles changes to the `disableCrashReporting` setting.
|
||||
* Noop on web.
|
||||
*
|
||||
* @param {boolean} disabled - Whether crash reporting is disabled or not.
|
||||
* @returns {void}
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function, require-jsdoc
|
||||
export function handleCrashReportingChange(disabled: boolean) { }
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
/* eslint-disable lines-around-comment */
|
||||
import _ from 'lodash';
|
||||
import { AnyAction } from 'redux';
|
||||
|
||||
import { IStore } from '../../app/types';
|
||||
import { SET_LOCATION_URL } from '../connection/actionTypes';
|
||||
import { participantUpdated } from '../participants/actions';
|
||||
import { getLocalParticipant } from '../participants/functions';
|
||||
import MiddlewareRegistry from '../redux/MiddlewareRegistry';
|
||||
import { parseURLParams } from '../util/parseURLParams';
|
||||
|
||||
import { SETTINGS_UPDATED } from './actionTypes';
|
||||
import { updateSettings } from './actions';
|
||||
|
||||
/**
|
||||
* The middleware of the feature base/settings. Distributes changes to the state
|
||||
* of base/settings to the states of other features computed from the state of
|
||||
* base/settings.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @returns {Function}
|
||||
*/
|
||||
MiddlewareRegistry.register(store => next => action => {
|
||||
const result = next(action);
|
||||
|
||||
switch (action.type) {
|
||||
case SETTINGS_UPDATED:
|
||||
_updateLocalParticipant(store, action);
|
||||
break;
|
||||
case SET_LOCATION_URL:
|
||||
_updateLocalParticipantFromUrl(store);
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
/**
|
||||
* Maps the settings field names to participant names where they don't match.
|
||||
* Currently there is only one such field, but may be extended in the future.
|
||||
*
|
||||
* @private
|
||||
* @param {string} settingsField - The name of the settings field to map.
|
||||
* @returns {string}
|
||||
*/
|
||||
function _mapSettingsFieldToParticipant(settingsField: string) {
|
||||
switch (settingsField) {
|
||||
case 'displayName':
|
||||
return 'name';
|
||||
}
|
||||
|
||||
return settingsField;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the local participant according to settings changes.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @param {Object} action - The dispatched action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _updateLocalParticipant({ dispatch, getState }: IStore, action: AnyAction) {
|
||||
const { settings } = action;
|
||||
const localParticipant = getLocalParticipant(getState());
|
||||
const newLocalParticipant = {
|
||||
...localParticipant
|
||||
};
|
||||
|
||||
for (const key in settings) {
|
||||
if (settings.hasOwnProperty(key)) {
|
||||
newLocalParticipant[_mapSettingsFieldToParticipant(key) as keyof typeof newLocalParticipant]
|
||||
= settings[key];
|
||||
}
|
||||
}
|
||||
|
||||
dispatch(participantUpdated({
|
||||
...newLocalParticipant,
|
||||
id: newLocalParticipant.id ?? ''
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the userInfo set in the URL.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _updateLocalParticipantFromUrl({ dispatch, getState }: IStore) {
|
||||
const urlParams
|
||||
= parseURLParams(getState()['features/base/connection'].locationURL ?? '');
|
||||
const urlEmail = urlParams['userInfo.email'];
|
||||
const urlDisplayName = urlParams['userInfo.displayName'];
|
||||
|
||||
if (!urlEmail && !urlDisplayName) {
|
||||
return;
|
||||
}
|
||||
|
||||
const localParticipant = getLocalParticipant(getState());
|
||||
|
||||
if (localParticipant) {
|
||||
const displayName = _.escape(urlDisplayName);
|
||||
const email = _.escape(urlEmail);
|
||||
|
||||
dispatch(participantUpdated({
|
||||
...localParticipant,
|
||||
email,
|
||||
name: displayName
|
||||
}));
|
||||
|
||||
dispatch(updateSettings({
|
||||
displayName,
|
||||
email
|
||||
}));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
import { IStore } from '../../app/types';
|
||||
import { APP_WILL_MOUNT } from '../app/actionTypes';
|
||||
import { setAudioOnly } from '../audio-only/actions';
|
||||
import MiddlewareRegistry from '../redux/MiddlewareRegistry';
|
||||
|
||||
import { SETTINGS_UPDATED } from './actionTypes';
|
||||
import { handleCallIntegrationChange, handleCrashReportingChange } from './functions.native';
|
||||
import { ISettingsState } from './reducer';
|
||||
|
||||
import './middleware.any';
|
||||
|
||||
/**
|
||||
* The middleware of the feature base/settings. Distributes changes to the state
|
||||
* of base/settings to the states of other features computed from the state of
|
||||
* base/settings.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @returns {Function}
|
||||
*/
|
||||
MiddlewareRegistry.register(store => next => action => {
|
||||
const result = next(action);
|
||||
|
||||
switch (action.type) {
|
||||
case APP_WILL_MOUNT:
|
||||
_initializeCallIntegration(store);
|
||||
break;
|
||||
case SETTINGS_UPDATED:
|
||||
_maybeHandleCallIntegrationChange(action);
|
||||
_maybeCrashReportingChange(action);
|
||||
_maybeSetAudioOnly(store, action);
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
/**
|
||||
* Initializes the audio device handler based on the `disableCallIntegration` setting.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _initializeCallIntegration({ getState }: IStore) {
|
||||
const { disableCallIntegration } = getState()['features/base/settings'];
|
||||
|
||||
if (typeof disableCallIntegration === 'boolean') {
|
||||
handleCallIntegrationChange(disableCallIntegration);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a change in the `disableCallIntegration` setting.
|
||||
*
|
||||
* @param {Object} action - The redux action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeHandleCallIntegrationChange({ settings: { disableCallIntegration } }: {
|
||||
settings: Partial<ISettingsState>;
|
||||
}) {
|
||||
if (typeof disableCallIntegration === 'boolean') {
|
||||
handleCallIntegrationChange(disableCallIntegration);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a change in the `disableCrashReporting` setting.
|
||||
*
|
||||
* @param {Object} action - The redux action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeCrashReportingChange({ settings: { disableCrashReporting } }: {
|
||||
settings: Partial<ISettingsState>;
|
||||
}) {
|
||||
if (typeof disableCrashReporting === 'boolean') {
|
||||
handleCrashReportingChange(disableCrashReporting);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates {@code startAudioOnly} flag if it's updated in the settings.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @param {Object} action - The redux action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeSetAudioOnly(
|
||||
{ dispatch }: IStore,
|
||||
{ settings: { startAudioOnly } }: { settings: Partial<ISettingsState>; }) {
|
||||
if (typeof startAudioOnly === 'boolean') {
|
||||
dispatch(setAudioOnly(startAudioOnly));
|
||||
}
|
||||
}
|
|
@ -1,235 +0,0 @@
|
|||
/* eslint-disable lines-around-comment */
|
||||
import _ from 'lodash';
|
||||
import { AnyAction } from 'redux';
|
||||
|
||||
import { IStore } from '../../app/types';
|
||||
import { PREJOIN_INITIALIZED } from '../../prejoin/actionTypes';
|
||||
import { setPrejoinPageVisibility } from '../../prejoin/actions';
|
||||
import { APP_WILL_MOUNT } from '../app/actionTypes';
|
||||
import { setAudioOnly } from '../audio-only/actions';
|
||||
import { SET_LOCATION_URL } from '../connection/actionTypes'; // minimize imports to avoid circular imports
|
||||
import { getJwtName } from '../jwt/functions';
|
||||
import { participantUpdated } from '../participants/actions';
|
||||
import { getLocalParticipant } from '../participants/functions';
|
||||
import MiddlewareRegistry from '../redux/MiddlewareRegistry';
|
||||
import { parseURLParams } from '../util/parseURLParams';
|
||||
|
||||
import { SETTINGS_UPDATED } from './actionTypes';
|
||||
import { updateSettings } from './actions';
|
||||
import { handleCallIntegrationChange, handleCrashReportingChange } from './functions';
|
||||
import { ISettingsState } from './reducer';
|
||||
|
||||
|
||||
/**
|
||||
* The middleware of the feature base/settings. Distributes changes to the state
|
||||
* of base/settings to the states of other features computed from the state of
|
||||
* base/settings.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @returns {Function}
|
||||
*/
|
||||
MiddlewareRegistry.register(store => next => action => {
|
||||
const result = next(action);
|
||||
|
||||
switch (action.type) {
|
||||
case APP_WILL_MOUNT:
|
||||
_initializeCallIntegration(store);
|
||||
_initializeShowPrejoin(store);
|
||||
break;
|
||||
case PREJOIN_INITIALIZED: {
|
||||
_maybeUpdateDisplayName(store);
|
||||
break;
|
||||
}
|
||||
case SETTINGS_UPDATED:
|
||||
_maybeHandleCallIntegrationChange(action);
|
||||
_maybeSetAudioOnly(store, action);
|
||||
_updateLocalParticipant(store, action);
|
||||
_maybeCrashReportingChange(action);
|
||||
break;
|
||||
case SET_LOCATION_URL:
|
||||
_updateLocalParticipantFromUrl(store);
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
/**
|
||||
* Overwrites the showPrejoin flag based on cached used selection for showing prejoin screen.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _initializeShowPrejoin({ dispatch, getState }: IStore) {
|
||||
const { userSelectedSkipPrejoin } = getState()['features/base/settings'];
|
||||
|
||||
if (userSelectedSkipPrejoin) {
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the audio device handler based on the `disableCallIntegration` setting.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _initializeCallIntegration({ getState }: IStore) {
|
||||
const { disableCallIntegration } = getState()['features/base/settings'];
|
||||
|
||||
if (typeof disableCallIntegration === 'boolean') {
|
||||
handleCallIntegrationChange(disableCallIntegration);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps the settings field names to participant names where they don't match.
|
||||
* Currently there is only one such field, but may be extended in the future.
|
||||
*
|
||||
* @private
|
||||
* @param {string} settingsField - The name of the settings field to map.
|
||||
* @returns {string}
|
||||
*/
|
||||
function _mapSettingsFieldToParticipant(settingsField: string) {
|
||||
switch (settingsField) {
|
||||
case 'displayName':
|
||||
return 'name';
|
||||
}
|
||||
|
||||
return settingsField;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a change in the `disableCallIntegration` setting.
|
||||
*
|
||||
* @param {Object} action - The redux action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeHandleCallIntegrationChange({ settings: { disableCallIntegration } }: {
|
||||
settings: Partial<ISettingsState>;
|
||||
}) {
|
||||
if (typeof disableCallIntegration === 'boolean') {
|
||||
handleCallIntegrationChange(disableCallIntegration);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles a change in the `disableCrashReporting` setting.
|
||||
*
|
||||
* @param {Object} action - The redux action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeCrashReportingChange({ settings: { disableCrashReporting } }: {
|
||||
settings: Partial<ISettingsState>;
|
||||
}) {
|
||||
if (typeof disableCrashReporting === 'boolean') {
|
||||
handleCrashReportingChange(disableCrashReporting);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates {@code startAudioOnly} flag if it's updated in the settings.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @param {Object} action - The redux action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeSetAudioOnly(
|
||||
{ dispatch }: IStore,
|
||||
{ settings: { startAudioOnly } }: { settings: Partial<ISettingsState>; }) {
|
||||
if (typeof startAudioOnly === 'boolean') {
|
||||
dispatch(setAudioOnly(startAudioOnly));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the display name to the one in JWT if there is one.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeUpdateDisplayName({ dispatch, getState }: IStore) {
|
||||
const state = getState();
|
||||
const hasJwt = Boolean(state['features/base/jwt'].jwt);
|
||||
|
||||
if (hasJwt) {
|
||||
const displayName = getJwtName(state);
|
||||
|
||||
if (displayName) {
|
||||
dispatch(updateSettings({
|
||||
displayName
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the local participant according to settings changes.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @param {Object} action - The dispatched action.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _updateLocalParticipant({ dispatch, getState }: IStore, action: AnyAction) {
|
||||
const { settings } = action;
|
||||
const localParticipant = getLocalParticipant(getState());
|
||||
const newLocalParticipant = {
|
||||
...localParticipant
|
||||
};
|
||||
|
||||
for (const key in settings) {
|
||||
if (settings.hasOwnProperty(key)) {
|
||||
newLocalParticipant[_mapSettingsFieldToParticipant(key) as keyof typeof newLocalParticipant]
|
||||
= settings[key];
|
||||
}
|
||||
}
|
||||
|
||||
dispatch(participantUpdated({
|
||||
...newLocalParticipant,
|
||||
id: newLocalParticipant.id ?? ''
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the userInfo set in the URL.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _updateLocalParticipantFromUrl({ dispatch, getState }: IStore) {
|
||||
const urlParams
|
||||
= parseURLParams(getState()['features/base/connection'].locationURL ?? '');
|
||||
const urlEmail = urlParams['userInfo.email'];
|
||||
const urlDisplayName = urlParams['userInfo.displayName'];
|
||||
|
||||
if (!urlEmail && !urlDisplayName) {
|
||||
return;
|
||||
}
|
||||
|
||||
const localParticipant = getLocalParticipant(getState());
|
||||
|
||||
if (localParticipant) {
|
||||
const displayName = _.escape(urlDisplayName);
|
||||
const email = _.escape(urlEmail);
|
||||
|
||||
dispatch(participantUpdated({
|
||||
...localParticipant,
|
||||
email,
|
||||
name: displayName
|
||||
}));
|
||||
|
||||
dispatch(updateSettings({
|
||||
displayName,
|
||||
email
|
||||
}));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
import { IStore } from '../../app/types';
|
||||
import { PREJOIN_INITIALIZED } from '../../prejoin/actionTypes';
|
||||
import { setPrejoinPageVisibility } from '../../prejoin/actions';
|
||||
import { APP_WILL_MOUNT } from '../app/actionTypes';
|
||||
import { getJwtName } from '../jwt/functions';
|
||||
import MiddlewareRegistry from '../redux/MiddlewareRegistry';
|
||||
|
||||
import { updateSettings } from './actions';
|
||||
|
||||
import './middleware.any';
|
||||
|
||||
/**
|
||||
* The middleware of the feature base/settings. Distributes changes to the state
|
||||
* of base/settings to the states of other features computed from the state of
|
||||
* base/settings.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @returns {Function}
|
||||
*/
|
||||
MiddlewareRegistry.register(store => next => action => {
|
||||
const result = next(action);
|
||||
|
||||
switch (action.type) {
|
||||
case APP_WILL_MOUNT:
|
||||
_initializeShowPrejoin(store);
|
||||
break;
|
||||
case PREJOIN_INITIALIZED:
|
||||
_maybeUpdateDisplayName(store);
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
/**
|
||||
* Overwrites the showPrejoin flag based on cached used selection for showing prejoin screen.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _initializeShowPrejoin({ dispatch, getState }: IStore) {
|
||||
const { userSelectedSkipPrejoin } = getState()['features/base/settings'];
|
||||
|
||||
if (userSelectedSkipPrejoin) {
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the display name to the one in JWT if there is one.
|
||||
*
|
||||
* @param {Store} store - The redux store.
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
function _maybeUpdateDisplayName({ dispatch, getState }: IStore) {
|
||||
const state = getState();
|
||||
const hasJwt = Boolean(state['features/base/jwt'].jwt);
|
||||
|
||||
if (hasJwt) {
|
||||
const displayName = getJwtName(state);
|
||||
|
||||
if (displayName) {
|
||||
dispatch(updateSettings({
|
||||
displayName
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -15,9 +15,12 @@ export * from './actions.any';
|
|||
* Signals that the local participant is ending screensharing or beginning the screensharing flow.
|
||||
*
|
||||
* @param {boolean} enabled - The state to toggle screen sharing to.
|
||||
* @param {boolean} _ignore1 - Ignored.
|
||||
* @param {boolean} _ignore2 - Ignored.
|
||||
* @param {Object} _ignore3 - Ignored.
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function toggleScreensharing(enabled: boolean) {
|
||||
export function toggleScreensharing(enabled: boolean, _ignore1?: boolean, _ignore2?: boolean, _ignore3?: any) {
|
||||
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
|
||||
const state = getState();
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import React, { ReactNode, useEffect, useLayoutEffect, useRef, useState } from '
|
|||
import { useSelector } from 'react-redux';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { getComputedOuterHeight } from '../../../../participants-pane/functions';
|
||||
// eslint-disable-next-line lines-around-comment
|
||||
// @ts-ignore
|
||||
import { Drawer, JitsiPortal } from '../../../../toolbox/components/web';
|
||||
|
@ -11,6 +10,30 @@ import { showOverflowDrawer } from '../../../../toolbox/functions.web';
|
|||
import participantsPaneTheme from '../../../components/themes/participantsPaneTheme.json';
|
||||
import { withPixelLineHeight } from '../../../styles/functions.web';
|
||||
|
||||
/**
|
||||
* Get a style property from a style declaration as a float.
|
||||
*
|
||||
* @param {CSSStyleDeclaration} styles - Style declaration.
|
||||
* @param {string} name - Property name.
|
||||
* @returns {number} Float value.
|
||||
*/
|
||||
const getFloatStyleProperty = (styles: CSSStyleDeclaration, name: string) =>
|
||||
parseFloat(styles.getPropertyValue(name));
|
||||
|
||||
/**
|
||||
* Gets the outer height of an element, including margins.
|
||||
*
|
||||
* @param {Element} element - Target element.
|
||||
* @returns {number} Computed height.
|
||||
*/
|
||||
const getComputedOuterHeight = (element: HTMLElement) => {
|
||||
const computedStyle = getComputedStyle(element);
|
||||
|
||||
return element.offsetHeight
|
||||
+ getFloatStyleProperty(computedStyle, 'margin-top')
|
||||
+ getFloatStyleProperty(computedStyle, 'margin-bottom');
|
||||
};
|
||||
|
||||
type Props = {
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
/**
|
||||
* The types of the buttons.
|
||||
*/
|
||||
export enum BUTTON_TYPES {
|
||||
DESTRUCTIVE = 'destructive',
|
||||
PRIMARY = 'primary',
|
||||
SECONDARY = 'secondary',
|
||||
TERTIARY = 'tertiary'
|
||||
}
|
||||
|
||||
/**
|
||||
* The modes of the buttons.
|
||||
*/
|
||||
export const BUTTON_MODES: {
|
||||
CONTAINED: 'contained';
|
||||
} = {
|
||||
CONTAINED: 'contained'
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
export * from './constants.any';
|
|
@ -1,23 +1,6 @@
|
|||
import { Theme } from '@mui/material';
|
||||
|
||||
/**
|
||||
* The types of the buttons.
|
||||
*/
|
||||
export enum BUTTON_TYPES {
|
||||
DESTRUCTIVE = 'destructive',
|
||||
PRIMARY = 'primary',
|
||||
SECONDARY = 'secondary',
|
||||
TERTIARY = 'tertiary'
|
||||
}
|
||||
|
||||
/**
|
||||
* The modes of the buttons.
|
||||
*/
|
||||
export const BUTTON_MODES: {
|
||||
CONTAINED: 'contained';
|
||||
} = {
|
||||
CONTAINED: 'contained'
|
||||
};
|
||||
export * from './constants.any';
|
||||
|
||||
/**
|
||||
* Returns an object containing the declaration of the common, reusable CSS classes.
|
|
@ -45,3 +45,17 @@ export function createWebTheme({ font, colors, colorMap, shape, spacing, typogra
|
|||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the first styled ancestor component of an element.
|
||||
*
|
||||
* @param {HTMLElement|null} target - Element to look up.
|
||||
* @param {string} cssClass - Styled component reference.
|
||||
* @returns {HTMLElement|null} Ancestor.
|
||||
*/
|
||||
export const findAncestorByClass = (target: HTMLElement | null, cssClass: string): HTMLElement | null => {
|
||||
if (!target || target.classList.contains(cssClass)) {
|
||||
return target;
|
||||
}
|
||||
|
||||
return findAncestorByClass(target.parentElement, cssClass);
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useCallback, useRef, useState } from 'react';
|
||||
|
||||
import { findAncestorByClass } from '../../../participants-pane/functions';
|
||||
import { findAncestorByClass } from '../functions.web';
|
||||
|
||||
|
||||
type RaiseContext = {
|
||||
|
|
|
@ -6,9 +6,10 @@ import logger from './logger';
|
|||
* Opens URL in the browser.
|
||||
*
|
||||
* @param {string} url - The URL to be opened.
|
||||
* @param {boolean} _ignore - Ignored.
|
||||
* @returns {void}
|
||||
*/
|
||||
export function openURLInBrowser(url: string) {
|
||||
export function openURLInBrowser(url: string, _ignore?: boolean) {
|
||||
Linking.openURL(url).catch(error => {
|
||||
logger.error(`An error occurred while trying to open ${url}`, error);
|
||||
});
|
||||
|
|
|
@ -17,7 +17,8 @@ import { LargeVideo } from '../../../large-video';
|
|||
import { LobbyScreen } from '../../../lobby';
|
||||
import { getIsLobbyVisible } from '../../../lobby/functions';
|
||||
import { ParticipantsPane } from '../../../participants-pane/components/web';
|
||||
import { Prejoin, isPrejoinPageVisible } from '../../../prejoin';
|
||||
import Prejoin from '../../../prejoin/components/web/Prejoin';
|
||||
import { isPrejoinPageVisible } from '../../../prejoin/functions';
|
||||
import { toggleToolboxVisible } from '../../../toolbox/actions.any';
|
||||
import { fullScreenChanged, showToolbox } from '../../../toolbox/actions.web';
|
||||
import { JitsiPortal, Toolbox } from '../../../toolbox/components/web';
|
||||
|
|
|
@ -4,7 +4,7 @@ import React, { useCallback } from 'react';
|
|||
|
||||
import { connect } from '../../../base/redux';
|
||||
import { DialInSummary } from '../../../invite';
|
||||
import Prejoin from '../../../prejoin/components/Prejoin.native';
|
||||
import Prejoin from '../../../prejoin/components/native/Prejoin';
|
||||
import WelcomePage from '../../../welcome/components/WelcomePage';
|
||||
import { isWelcomePageEnabled } from '../../../welcome/functions';
|
||||
import { _ROOT_NAVIGATION_READY } from '../actionTypes';
|
||||
|
|
|
@ -128,7 +128,7 @@ export function showNotification(props: INotificationProps = {}, type?: string)
|
|||
type: SHOW_NOTIFICATION,
|
||||
props,
|
||||
timeout: getNotificationTimeout(type, notificationTimeouts),
|
||||
uid: props.uid || window.Date.now().toString()
|
||||
uid: props.uid || Date.now().toString()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -13,12 +13,12 @@ import { isLocalParticipantModerator } from '../../../base/participants/function
|
|||
import Button from '../../../base/ui/components/web/Button';
|
||||
import ClickableIcon from '../../../base/ui/components/web/ClickableIcon';
|
||||
import { BUTTON_TYPES } from '../../../base/ui/constants';
|
||||
import { findAncestorByClass } from '../../../base/ui/functions.web';
|
||||
import { isAddBreakoutRoomButtonVisible } from '../../../breakout-rooms/functions';
|
||||
// @ts-ignore
|
||||
import { MuteEveryoneDialog } from '../../../video-menu/components/';
|
||||
import { close } from '../../actions';
|
||||
import {
|
||||
findAncestorByClass,
|
||||
getParticipantsPaneOpen,
|
||||
isMoreActionsVisible,
|
||||
isMuteAllVisible
|
||||
|
|
|
@ -24,21 +24,6 @@ import { isInBreakoutRoom } from '../breakout-rooms/functions';
|
|||
|
||||
import { MEDIA_STATE, QUICK_ACTION_BUTTON, REDUCER_KEY } from './constants';
|
||||
|
||||
/**
|
||||
* Find the first styled ancestor component of an element.
|
||||
*
|
||||
* @param {HTMLElement|null} target - Element to look up.
|
||||
* @param {string} cssClass - Styled component reference.
|
||||
* @returns {HTMLElement|null} Ancestor.
|
||||
*/
|
||||
export const findAncestorByClass = (target: HTMLElement | null, cssClass: string): HTMLElement | null => {
|
||||
if (!target || target.classList.contains(cssClass)) {
|
||||
return target;
|
||||
}
|
||||
|
||||
return findAncestorByClass(target.parentElement, cssClass);
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if a participant is force muted.
|
||||
*
|
||||
|
@ -110,31 +95,6 @@ export function getParticipantVideoMediaState(participant: IParticipant, muted:
|
|||
return MEDIA_STATE.UNMUTED;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a style property from a style declaration as a float.
|
||||
*
|
||||
* @param {CSSStyleDeclaration} styles - Style declaration.
|
||||
* @param {string} name - Property name.
|
||||
* @returns {number} Float value.
|
||||
*/
|
||||
export const getFloatStyleProperty = (styles: CSSStyleDeclaration, name: string) =>
|
||||
parseFloat(styles.getPropertyValue(name));
|
||||
|
||||
/**
|
||||
* Gets the outer height of an element, including margins.
|
||||
*
|
||||
* @param {Element} element - Target element.
|
||||
* @returns {number} Computed height.
|
||||
*/
|
||||
export const getComputedOuterHeight = (element: HTMLElement) => {
|
||||
const computedStyle = getComputedStyle(element);
|
||||
|
||||
return element.offsetHeight
|
||||
+ getFloatStyleProperty(computedStyle, 'margin-top')
|
||||
+ getFloatStyleProperty(computedStyle, 'margin-bottom');
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns this feature's root state.
|
||||
*
|
||||
|
|
|
@ -15,40 +15,39 @@ import {
|
|||
import { useDispatch, useSelector } from 'react-redux';
|
||||
|
||||
// @ts-ignore
|
||||
import { appNavigate } from '../../app/actions.native';
|
||||
import { IReduxState } from '../../app/types';
|
||||
import { setAudioOnly } from '../../base/audio-only/actions';
|
||||
import { getConferenceName } from '../../base/conference/functions';
|
||||
import { connect } from '../../base/connection/actions.native';
|
||||
import { IconClose } from '../../base/icons/svg';
|
||||
import { appNavigate } from '../../../app/actions.native';
|
||||
import { IReduxState } from '../../../app/types';
|
||||
import { setAudioOnly } from '../../../base/audio-only/actions';
|
||||
import { getConferenceName } from '../../../base/conference/functions';
|
||||
import { connect } from '../../../base/connection/actions.native';
|
||||
import { IconClose } from '../../../base/icons/svg';
|
||||
// @ts-ignore
|
||||
import JitsiScreen from '../../base/modal/components/JitsiScreen';
|
||||
import { getLocalParticipant } from '../../base/participants/functions';
|
||||
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
|
||||
import { getLocalParticipant } from '../../../base/participants/functions';
|
||||
// @ts-ignore
|
||||
import { getFieldValue } from '../../base/react';
|
||||
import { ASPECT_RATIO_NARROW } from '../../base/responsive-ui/constants';
|
||||
import { updateSettings } from '../../base/settings/actions';
|
||||
import BaseTheme from '../../base/ui/components/BaseTheme.native';
|
||||
import Button from '../../base/ui/components/native/Button';
|
||||
import { BUTTON_TYPES } from '../../base/ui/constants';
|
||||
import { BrandingImageBackground } from '../../dynamic-branding/components/native';
|
||||
import { getFieldValue } from '../../../base/react';
|
||||
import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
|
||||
import { updateSettings } from '../../../base/settings/actions';
|
||||
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
|
||||
import Button from '../../../base/ui/components/native/Button';
|
||||
import { BUTTON_TYPES } from '../../../base/ui/constants';
|
||||
import { BrandingImageBackground } from '../../../dynamic-branding/components/native';
|
||||
// @ts-ignore
|
||||
import { LargeVideo } from '../../large-video/components';
|
||||
import { LargeVideo } from '../../../large-video/components';
|
||||
// @ts-ignore
|
||||
import HeaderNavigationButton from '../../mobile/navigation/components/HeaderNavigationButton';
|
||||
import HeaderNavigationButton from '../../../mobile/navigation/components/HeaderNavigationButton';
|
||||
// @ts-ignore
|
||||
import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';
|
||||
import { navigateRoot } from '../../../mobile/navigation/rootNavigationContainerRef';
|
||||
// @ts-ignore
|
||||
import { screen } from '../../mobile/navigation/routes';
|
||||
import { screen } from '../../../mobile/navigation/routes';
|
||||
// @ts-ignore
|
||||
import AudioMuteButton from '../../toolbox/components/AudioMuteButton';
|
||||
import AudioMuteButton from '../../../toolbox/components/AudioMuteButton';
|
||||
// @ts-ignore
|
||||
import VideoMuteButton from '../../toolbox/components/VideoMuteButton';
|
||||
import { isDisplayNameRequired } from '../functions';
|
||||
import { IPrejoinProps } from '../types';
|
||||
|
||||
import VideoMuteButton from '../../../toolbox/components/VideoMuteButton';
|
||||
import { isDisplayNameRequired } from '../../functions';
|
||||
import { IPrejoinProps } from '../../types';
|
||||
// @ts-ignore
|
||||
import styles from './styles';
|
||||
import styles from '../styles';
|
||||
|
||||
|
||||
const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
|
|
@ -2,7 +2,7 @@ import { Theme } from '@mui/material';
|
|||
import React from 'react';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import Icon from '../../base/icons/components/Icon';
|
||||
import Icon from '../../../base/icons/components/Icon';
|
||||
|
||||
type Props = {
|
||||
|
|
@ -3,28 +3,28 @@
|
|||
import InlineDialog from '@atlaskit/inline-dialog';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { Avatar } from '../../base/avatar';
|
||||
import { isNameReadOnly } from '../../base/config';
|
||||
import { translate } from '../../base/i18n';
|
||||
import { IconArrowDown, IconArrowUp, IconPhone, IconVolumeOff } from '../../base/icons';
|
||||
import { isVideoMutedByUser } from '../../base/media';
|
||||
import { getLocalParticipant } from '../../base/participants';
|
||||
import { ActionButton, InputField, PreMeetingScreen } from '../../base/premeeting';
|
||||
import { connect } from '../../base/redux';
|
||||
import { getDisplayName, updateSettings } from '../../base/settings';
|
||||
import { getLocalJitsiVideoTrack } from '../../base/tracks';
|
||||
import { Avatar } from '../../../base/avatar';
|
||||
import { isNameReadOnly } from '../../../base/config';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { IconArrowDown, IconArrowUp, IconPhone, IconVolumeOff } from '../../../base/icons';
|
||||
import { isVideoMutedByUser } from '../../../base/media';
|
||||
import { getLocalParticipant } from '../../../base/participants';
|
||||
import { ActionButton, InputField, PreMeetingScreen } from '../../../base/premeeting';
|
||||
import { connect } from '../../../base/redux';
|
||||
import { getDisplayName, updateSettings } from '../../../base/settings';
|
||||
import { getLocalJitsiVideoTrack } from '../../../base/tracks';
|
||||
import {
|
||||
joinConference as joinConferenceAction,
|
||||
joinConferenceWithoutAudio as joinConferenceWithoutAudioAction,
|
||||
setJoinByPhoneDialogVisiblity as setJoinByPhoneDialogVisiblityAction
|
||||
} from '../actions';
|
||||
} from '../../actions';
|
||||
import {
|
||||
isDeviceStatusVisible,
|
||||
isDisplayNameRequired,
|
||||
isJoinByPhoneButtonVisible,
|
||||
isJoinByPhoneDialogVisible,
|
||||
isPrejoinDisplayNameVisible
|
||||
} from '../functions';
|
||||
} from '../../functions';
|
||||
|
||||
import DropdownButton from './DropdownButton';
|
||||
import JoinByPhoneDialog from './dialogs/JoinByPhoneDialog';
|
|
@ -4,14 +4,14 @@ import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
|||
import React from 'react';
|
||||
import { batch } from 'react-redux';
|
||||
|
||||
import { BaseApp } from '../../../features/base/app';
|
||||
import { getConferenceOptions } from '../../base/conference/functions';
|
||||
import { setConfig } from '../../base/config';
|
||||
import { DialogContainer } from '../../base/dialog';
|
||||
import { createPrejoinTracks } from '../../base/tracks';
|
||||
import GlobalStyles from '../../base/ui/components/GlobalStyles';
|
||||
import JitsiThemeProvider from '../../base/ui/components/JitsiThemeProvider.web';
|
||||
import { initPrejoin, makePrecallTest } from '../actions';
|
||||
import { BaseApp } from '../../../base/app';
|
||||
import { getConferenceOptions } from '../../../base/conference/functions';
|
||||
import { setConfig } from '../../../base/config';
|
||||
import { DialogContainer } from '../../../base/dialog';
|
||||
import { createPrejoinTracks } from '../../../base/tracks';
|
||||
import GlobalStyles from '../../../base/ui/components/GlobalStyles.web';
|
||||
import JitsiThemeProvider from '../../../base/ui/components/JitsiThemeProvider.web';
|
||||
import { initPrejoin, makePrecallTest } from '../../actions';
|
||||
|
||||
import PrejoinThirdParty from './PrejoinThirdParty';
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import { translate } from '../../base/i18n';
|
||||
import { isVideoMutedByUser } from '../../base/media';
|
||||
import { PreMeetingScreen } from '../../base/premeeting';
|
||||
import { connect } from '../../base/redux';
|
||||
import { getLocalJitsiVideoTrack } from '../../base/tracks';
|
||||
import { isDeviceStatusVisible } from '../functions';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { isVideoMutedByUser } from '../../../base/media';
|
||||
import { PreMeetingScreen } from '../../../base/premeeting';
|
||||
import { connect } from '../../../base/redux';
|
||||
import { getLocalJitsiVideoTrack } from '../../../base/tracks';
|
||||
import { isDeviceStatusVisible } from '../../functions';
|
||||
|
||||
type Props = {
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import React from 'react';
|
||||
|
||||
import { countries } from '../../utils';
|
||||
import { countries } from '../../../utils';
|
||||
|
||||
import CountryRow from './CountryRow';
|
||||
|
|
@ -3,10 +3,10 @@
|
|||
import InlineDialog from '@atlaskit/inline-dialog';
|
||||
import React, { PureComponent } from 'react';
|
||||
|
||||
import { connect } from '../../../base/redux';
|
||||
import { setDialOutCountry, setDialOutNumber } from '../../actions';
|
||||
import { getDialOutCountry, getDialOutNumber } from '../../functions';
|
||||
import { getCountryFromDialCodeText } from '../../utils';
|
||||
import { connect } from '../../../../base/redux';
|
||||
import { setDialOutCountry, setDialOutNumber } from '../../../actions.web';
|
||||
import { getDialOutCountry, getDialOutNumber } from '../../../functions';
|
||||
import { getCountryFromDialCodeText } from '../../../utils';
|
||||
|
||||
import CountryDropDown from './CountryDropdown';
|
||||
import CountrySelector from './CountrySelector';
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import { Icon, IconArrowDown } from '../../../base/icons';
|
||||
import { Icon, IconArrowDown } from '../../../../base/icons';
|
||||
|
||||
type Props = {
|
||||
|
|
@ -6,10 +6,10 @@ import { WithTranslation } from 'react-i18next';
|
|||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
// @ts-ignore
|
||||
import { Avatar } from '../../../base/avatar';
|
||||
import { translate } from '../../../base/i18n/functions';
|
||||
import Icon from '../../../base/icons/components/Icon';
|
||||
import { IconClose } from '../../../base/icons/svg';
|
||||
import { Avatar } from '../../../../base/avatar';
|
||||
import { translate } from '../../../../base/i18n/functions';
|
||||
import Icon from '../../../../base/icons/components/Icon';
|
||||
import { IconClose } from '../../../../base/icons/svg';
|
||||
// @ts-ignore
|
||||
import Label from '../Label';
|
||||
|
|
@ -5,12 +5,12 @@ import React from 'react';
|
|||
import { WithTranslation } from 'react-i18next';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { translate } from '../../../base/i18n/functions';
|
||||
import Icon from '../../../base/icons/components/Icon';
|
||||
import { IconArrowLeft } from '../../../base/icons/svg';
|
||||
import { Button } from '../../../base/ui/components/web';
|
||||
import { translate } from '../../../../base/i18n/functions';
|
||||
import Icon from '../../../../base/icons/components/Icon';
|
||||
import { IconArrowLeft } from '../../../../base/icons/svg';
|
||||
import { Button } from '../../../../base/ui/components/web';
|
||||
// @ts-ignore
|
||||
import { getCountryCodeFromPhone } from '../../utils';
|
||||
import { getCountryCodeFromPhone } from '../../../utils';
|
||||
// @ts-ignore
|
||||
import Label from '../Label';
|
||||
|
|
@ -5,10 +5,10 @@ import React from 'react';
|
|||
import { WithTranslation } from 'react-i18next';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { translate } from '../../../base/i18n/functions';
|
||||
import Icon from '../../../base/icons/components/Icon';
|
||||
import { IconClose } from '../../../base/icons/svg';
|
||||
import { Button } from '../../../base/ui/components/web';
|
||||
import { translate } from '../../../../base/i18n/functions';
|
||||
import Icon from '../../../../base/icons/components/Icon';
|
||||
import { IconClose } from '../../../../base/icons/svg';
|
||||
import { Button } from '../../../../base/ui/components/web';
|
||||
// @ts-ignore
|
||||
import Label from '../Label';
|
||||
// @ts-ignore
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
import React, { PureComponent } from 'react';
|
||||
|
||||
import { connect } from '../../../base/redux';
|
||||
import { connect } from '../../../../base/redux';
|
||||
import {
|
||||
getConferenceId,
|
||||
getDefaultDialInNumber,
|
||||
updateDialInNumbers
|
||||
} from '../../../invite';
|
||||
} from '../../../../invite';
|
||||
import {
|
||||
dialOut as dialOutAction,
|
||||
joinConferenceWithoutAudio as joinConferenceWithoutAudioAction,
|
||||
openDialInPage as openDialInPageAction
|
||||
} from '../../actions';
|
||||
import { getDialOutStatus, getFullDialOutNumber } from '../../functions';
|
||||
} from '../../../actions';
|
||||
import { getDialOutStatus, getFullDialOutNumber } from '../../../functions';
|
||||
|
||||
import CallingDialog from './CallingDialog';
|
||||
import DialInDialog from './DialInDialog';
|
|
@ -3,15 +3,15 @@ import React from 'react';
|
|||
import { WithTranslation } from 'react-i18next';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { IReduxState } from '../../../app/types';
|
||||
import { translate } from '../../../base/i18n/functions';
|
||||
import Icon from '../../../base/icons/components/Icon';
|
||||
import { IconCheckSolid, IconExclamationTriangle } from '../../../base/icons/svg';
|
||||
import { connect } from '../../../base/redux/functions';
|
||||
import { IReduxState } from '../../../../app/types';
|
||||
import { translate } from '../../../../base/i18n/functions';
|
||||
import Icon from '../../../../base/icons/components/Icon';
|
||||
import { IconCheckSolid, IconExclamationTriangle } from '../../../../base/icons/svg';
|
||||
import { connect } from '../../../../base/redux/functions';
|
||||
import {
|
||||
getDeviceStatusText,
|
||||
getDeviceStatusType
|
||||
} from '../../functions';
|
||||
} from '../../../functions';
|
||||
|
||||
export interface IProps extends WithTranslation {
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
export * from './actions';
|
||||
export * from './functions';
|
||||
|
||||
export { default as Prejoin } from './components/Prejoin';
|
|
@ -13,7 +13,7 @@ import {
|
|||
} from '../base/participants';
|
||||
import { getLocalDesktopTrack, getLocalVideoTrack, toggleScreensharing } from '../base/tracks';
|
||||
import { NOTIFICATION_TIMEOUT_TYPE, showNotification } from '../notifications';
|
||||
import { isScreenVideoShared } from '../screen-share';
|
||||
import { isScreenVideoShared } from '../screen-share/functions';
|
||||
|
||||
import {
|
||||
CAPTURE_EVENTS,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
appNavigate,
|
||||
maybeRedirectToWelcomePage
|
||||
} from '../app/actions.web';
|
||||
} from '../app/actions';
|
||||
import { IStore } from '../app/types';
|
||||
import { conferenceLeft, setPassword } from '../base/conference/actions';
|
||||
import { JITSI_CONFERENCE_URL_KEY } from '../base/conference/constants';
|
||||
|
@ -29,6 +29,8 @@ export function _cancelPasswordRequiredPrompt(conference: any) {
|
|||
// when we are redirecting the library should handle any
|
||||
// unload and clean of the connection.
|
||||
APP.API.notifyReadyToClose();
|
||||
|
||||
// @ts-ignore
|
||||
dispatch(maybeRedirectToWelcomePage());
|
||||
|
||||
return;
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import {
|
||||
SET_SCREENSHARE_CAPTURE_FRAME_RATE
|
||||
} from './actionTypes';
|
||||
|
||||
/**
|
||||
* Updates the capture frame rate for screenshare in redux.
|
||||
*
|
||||
* @param {number} captureFrameRate - The frame rate to be used for screenshare.
|
||||
* @returns {{
|
||||
* type: SET_SCREENSHARE_CAPTURE_FRAME_RATE,
|
||||
* captureFrameRate: number
|
||||
* }}
|
||||
*/
|
||||
export function setScreenshareFramerate(captureFrameRate: number) {
|
||||
return {
|
||||
type: SET_SCREENSHARE_CAPTURE_FRAME_RATE,
|
||||
captureFrameRate
|
||||
};
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
export * from './actions.any';
|
|
@ -5,14 +5,15 @@ import { shouldHideShareAudioHelper } from '../base/settings/functions';
|
|||
import { toggleScreensharing } from '../base/tracks/actions';
|
||||
|
||||
import {
|
||||
SET_SCREENSHARE_CAPTURE_FRAME_RATE,
|
||||
SET_SCREENSHARE_TRACKS,
|
||||
SET_SCREEN_AUDIO_SHARE_STATE
|
||||
} from './actionTypes';
|
||||
import ShareAudioDialog from './components/ShareAudioDialog';
|
||||
import ShareMediaWarningDialog from './components/ShareScreenWarningDialog';
|
||||
import ShareAudioDialog from './components/web/ShareAudioDialog';
|
||||
import ShareMediaWarningDialog from './components/web/ShareScreenWarningDialog';
|
||||
import { isAudioOnlySharing, isScreenVideoShared } from './functions';
|
||||
|
||||
export * from './actions.any';
|
||||
|
||||
/**
|
||||
* Updates the current known status of the shared video.
|
||||
*
|
||||
|
@ -29,22 +30,6 @@ export function setScreenAudioShareState(isSharingAudio: boolean) {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the capture frame rate for screenshare in redux.
|
||||
*
|
||||
* @param {number} captureFrameRate - The frame rate to be used for screenshare.
|
||||
* @returns {{
|
||||
* type: SET_SCREENSHARE_CAPTURE_FRAME_RATE,
|
||||
* captureFrameRate: number
|
||||
* }}
|
||||
*/
|
||||
export function setScreenshareFramerate(captureFrameRate: number) {
|
||||
return {
|
||||
type: SET_SCREENSHARE_CAPTURE_FRAME_RATE,
|
||||
captureFrameRate
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the audio track associated with the screenshare.
|
||||
*
|
|
@ -1,2 +0,0 @@
|
|||
export { default as ShareAudioButton } from './ShareAudioButton';
|
||||
export { default as ShareAudioDialog } from './ShareAudioDialog';
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
import type { Dispatch } from 'redux';
|
||||
|
||||
import { translate } from '../../base/i18n';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import {
|
||||
IconShareAudio,
|
||||
IconStopAudioShare
|
||||
} from '../../base/icons';
|
||||
import { connect } from '../../base/redux';
|
||||
} from '../../../base/icons';
|
||||
import { connect } from '../../../base/redux';
|
||||
import {
|
||||
AbstractButton,
|
||||
type AbstractButtonProps
|
||||
} from '../../base/toolbox/components';
|
||||
import { setOverflowMenuVisible } from '../../toolbox/actions';
|
||||
import { startAudioScreenShareFlow } from '../actions';
|
||||
import { isAudioOnlySharing } from '../functions';
|
||||
} from '../../../base/toolbox/components';
|
||||
import { setOverflowMenuVisible } from '../../../toolbox/actions.web';
|
||||
import { startAudioScreenShareFlow } from '../../actions.web';
|
||||
import { isAudioOnlySharing } from '../../functions';
|
||||
|
||||
type Props = AbstractButtonProps & {
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
import React, { Component } from 'react';
|
||||
import { WithTranslation } from 'react-i18next';
|
||||
|
||||
import { IReduxState, IStore } from '../../app/types';
|
||||
import { translate } from '../../base/i18n/functions';
|
||||
import { connect } from '../../base/redux/functions';
|
||||
import { updateSettings } from '../../base/settings/actions';
|
||||
import { shouldHideShareAudioHelper } from '../../base/settings/functions.any';
|
||||
import { toggleScreensharing } from '../../base/tracks/actions';
|
||||
import Checkbox from '../../base/ui/components/web/Checkbox';
|
||||
import Dialog from '../../base/ui/components/web/Dialog';
|
||||
import { IReduxState, IStore } from '../../../app/types';
|
||||
import { translate } from '../../../base/i18n/functions';
|
||||
import { connect } from '../../../base/redux/functions';
|
||||
import { updateSettings } from '../../../base/settings/actions';
|
||||
import { shouldHideShareAudioHelper } from '../../../base/settings/functions.any';
|
||||
import { toggleScreensharing } from '../../../base/tracks/actions';
|
||||
import Checkbox from '../../../base/ui/components/web/Checkbox';
|
||||
import Dialog from '../../../base/ui/components/web/Dialog';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link ShareAudioDialog}.
|
|
@ -1,11 +1,11 @@
|
|||
import React, { Component } from 'react';
|
||||
import { WithTranslation } from 'react-i18next';
|
||||
|
||||
import { IStore } from '../../app/types';
|
||||
import { translate } from '../../base/i18n/functions';
|
||||
import { connect } from '../../base/redux/functions';
|
||||
import { toggleScreensharing } from '../../base/tracks/actions';
|
||||
import Dialog from '../../base/ui/components/web/Dialog';
|
||||
import { IStore } from '../../../app/types';
|
||||
import { translate } from '../../../base/i18n/functions';
|
||||
import { connect } from '../../../base/redux/functions';
|
||||
import { toggleScreensharing } from '../../../base/tracks/actions';
|
||||
import Dialog from '../../../base/ui/components/web/Dialog';
|
||||
|
||||
export interface IProps extends WithTranslation {
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
export * from './actions';
|
||||
export * from './actionTypes';
|
||||
export * from './components';
|
||||
export * from './functions';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { JitsiRecordingConstants } from '../base/lib-jitsi-meet';
|
||||
import { toState } from '../base/redux';
|
||||
import { getActiveSession } from '../recording/functions';
|
||||
import { isScreenVideoShared } from '../screen-share';
|
||||
import { isScreenVideoShared } from '../screen-share/functions';
|
||||
|
||||
import ScreenshotCaptureSummary from './ScreenshotCaptureSummary';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import { IconShareDesktop } from '../../../base/icons';
|
|||
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
|
||||
import { connect } from '../../../base/redux';
|
||||
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
||||
import { isScreenVideoShared } from '../../../screen-share';
|
||||
import { isScreenVideoShared } from '../../../screen-share/functions';
|
||||
import { isDesktopShareButtonDisabled } from '../../functions';
|
||||
|
||||
type Props = AbstractButtonProps & {
|
||||
|
|
|
@ -68,12 +68,14 @@ import {
|
|||
// @ts-ignore
|
||||
import { isSalesforceEnabled } from '../../../salesforce/functions';
|
||||
import {
|
||||
ShareAudioButton,
|
||||
isScreenAudioSupported,
|
||||
isScreenVideoShared,
|
||||
startScreenShareFlow
|
||||
// @ts-ignore
|
||||
} from '../../../screen-share';
|
||||
} from '../../../screen-share/actions.web';
|
||||
// @ts-ignore
|
||||
import ShareAudioButton from '../../../screen-share/components/web/ShareAudioButton';
|
||||
import {
|
||||
isScreenAudioSupported,
|
||||
isScreenVideoShared
|
||||
} from '../../../screen-share/functions';
|
||||
// @ts-ignore
|
||||
import SecurityDialogButton from '../../../security/components/security-dialog/web/SecurityDialogButton';
|
||||
// @ts-ignore
|
||||
|
|
|
@ -11,7 +11,7 @@ export * from './actions.any';
|
|||
* enabled: boolean
|
||||
* }}
|
||||
*/
|
||||
export function setIsCarmode(enabled) {
|
||||
export function setIsCarmode(enabled: boolean) {
|
||||
return {
|
||||
type: SET_CAR_MODE,
|
||||
enabled
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
// @ts-ignore
|
||||
import { getLogger } from '@jitsi/logger';
|
||||
|
||||
// @ts-expect-error
|
||||
import UIEvents from '../../../service/UI/UIEvents';
|
||||
import {
|
||||
|
@ -20,7 +17,7 @@ import { getLocalParticipant, getRemoteParticipants } from '../base/participants
|
|||
import { toggleScreensharing } from '../base/tracks/actions';
|
||||
import { isModerationNotificationDisplayed } from '../notifications/functions';
|
||||
|
||||
const logger = getLogger(__filename);
|
||||
import logger from './logger';
|
||||
|
||||
/**
|
||||
* Mutes the local participant.
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import { getLogger } from '../base/logging/functions';
|
||||
|
||||
export default getLogger('features/video-menu');
|
|
@ -7,7 +7,7 @@ import { App } from './features/app/components';
|
|||
import { getLogger } from './features/base/logging/functions';
|
||||
import { Platform } from './features/base/react';
|
||||
import { getJitsiMeetGlobalNS } from './features/base/util';
|
||||
import PrejoinApp from './features/prejoin/components/PrejoinApp';
|
||||
import PrejoinApp from './features/prejoin/components/web/PrejoinApp';
|
||||
|
||||
const logger = getLogger('index.web');
|
||||
const OS = Platform.OS;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"react/features/analytics/handlers/GoogleAnalyticsHandler.ts",
|
||||
"react/features/base/components/participants-pane-list",
|
||||
"react/features/connection-stats",
|
||||
"react/features/desktop-picker",
|
||||
|
@ -23,6 +24,7 @@
|
|||
"react/features/embed-meeting",
|
||||
"react/features/face-landmarks",
|
||||
"react/features/feedback",
|
||||
"react/features/noise-suppression",
|
||||
"react/features/screen-share",
|
||||
"react/features/stream-effects/noise-suppression",
|
||||
"react/features/stream-effects/rnnoise",
|
||||
|
|
Loading…
Reference in New Issue