fix(recording-dialog) Fix broken dialog content (#12490)
This commit is contained in:
parent
edf5e1c094
commit
7a3b8d6ac4
|
@ -7,6 +7,8 @@ import { ISwitchProps } from '../types';
|
||||||
|
|
||||||
interface IProps extends ISwitchProps {
|
interface IProps extends ISwitchProps {
|
||||||
|
|
||||||
|
className?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Id of the toggle.
|
* Id of the toggle.
|
||||||
*/
|
*/
|
||||||
|
@ -78,7 +80,7 @@ const useStyles = makeStyles()((theme: Theme) => {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const Switch = ({ id, checked, disabled, onChange }: IProps) => {
|
const Switch = ({ className, id, checked, disabled, onChange }: IProps) => {
|
||||||
const { classes: styles, cx } = useStyles();
|
const { classes: styles, cx } = useStyles();
|
||||||
const isMobile = isMobileBrowser();
|
const isMobile = isMobileBrowser();
|
||||||
|
|
||||||
|
@ -89,7 +91,7 @@ const Switch = ({ id, checked, disabled, onChange }: IProps) => {
|
||||||
return (
|
return (
|
||||||
<label
|
<label
|
||||||
className = { cx('toggle-container', styles.container, checked && styles.containerOn,
|
className = { cx('toggle-container', styles.container, checked && styles.containerOn,
|
||||||
isMobile && 'is-mobile', disabled && 'disabled') }>
|
isMobile && 'is-mobile', disabled && 'disabled', className) }>
|
||||||
<input
|
<input
|
||||||
type = 'checkbox'
|
type = 'checkbox'
|
||||||
{ ...(id ? { id } : {}) }
|
{ ...(id ? { id } : {}) }
|
||||||
|
|
|
@ -113,7 +113,7 @@ export interface IProps extends WithTranslation {
|
||||||
/**
|
/**
|
||||||
* Callback to change the local recording only self setting.
|
* Callback to change the local recording only self setting.
|
||||||
*/
|
*/
|
||||||
onLocalRecordingSelfChange: Function;
|
onLocalRecordingSelfChange: () => void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to be invoked on sharing setting change.
|
* Callback to be invoked on sharing setting change.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// XXX CSS is used on Web, JavaScript styles are use only for mobile. Export an
|
// XXX CSS is used on Web, JavaScript styles are use only for mobile. Export an
|
||||||
// (empty) object so that styles[*] statements on Web don't trigger errors.
|
// (empty) object so that styles[*] statements on Web don't trigger errors.
|
||||||
import BaseTheme from '../../../base/ui/components/BaseTheme';
|
|
||||||
|
|
||||||
export default {};
|
export default {};
|
||||||
|
|
||||||
|
@ -13,5 +12,3 @@ export const ICON_CLOUD = 'images/icon-cloud.png';
|
||||||
export const ICON_INFO = 'images/icon-info.png';
|
export const ICON_INFO = 'images/icon-info.png';
|
||||||
|
|
||||||
export const ICON_USERS = 'images/icon-users.png';
|
export const ICON_USERS = 'images/icon-users.png';
|
||||||
|
|
||||||
export const TRACK_COLOR = BaseTheme.palette.ui15;
|
|
||||||
|
|
|
@ -6,12 +6,12 @@ import {
|
||||||
Container,
|
Container,
|
||||||
Image,
|
Image,
|
||||||
LoadingIndicator,
|
LoadingIndicator,
|
||||||
Switch,
|
|
||||||
Text
|
Text
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
} from '../../../../base/react';
|
} from '../../../../base/react';
|
||||||
import { connect } from '../../../../base/redux/functions';
|
import { connect } from '../../../../base/redux/functions';
|
||||||
import Button from '../../../../base/ui/components/web/Button';
|
import Button from '../../../../base/ui/components/web/Button';
|
||||||
|
import Switch from '../../../../base/ui/components/web/Switch';
|
||||||
import { BUTTON_TYPES } from '../../../../base/ui/constants';
|
import { BUTTON_TYPES } from '../../../../base/ui/constants';
|
||||||
import { RECORDING_TYPES } from '../../../constants';
|
import { RECORDING_TYPES } from '../../../constants';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -25,8 +25,7 @@ import {
|
||||||
ICON_CLOUD,
|
ICON_CLOUD,
|
||||||
ICON_INFO,
|
ICON_INFO,
|
||||||
ICON_USERS,
|
ICON_USERS,
|
||||||
LOCAL_RECORDING,
|
LOCAL_RECORDING
|
||||||
TRACK_COLOR
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
} from '../styles.web';
|
} from '../styles.web';
|
||||||
|
|
||||||
|
@ -76,11 +75,10 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent<IP
|
||||||
= integrationsEnabled || _localRecordingAvailable
|
= integrationsEnabled || _localRecordingAvailable
|
||||||
? (
|
? (
|
||||||
<Switch
|
<Switch
|
||||||
|
checked = { selectedRecordingService === RECORDING_TYPES.JITSI_REC_SERVICE }
|
||||||
className = 'recording-switch'
|
className = 'recording-switch'
|
||||||
disabled = { isValidating }
|
disabled = { isValidating }
|
||||||
onValueChange = { this._onRecordingServiceSwitchChange }
|
onChange = { this._onRecordingServiceSwitchChange } />
|
||||||
trackColor = {{ false: TRACK_COLOR }}
|
|
||||||
value = { selectedRecordingService === RECORDING_TYPES.JITSI_REC_SERVICE } />
|
|
||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
const label = isVpaas ? t('recording.serviceDescriptionCloud') : t('recording.serviceDescription');
|
const label = isVpaas ? t('recording.serviceDescriptionCloud') : t('recording.serviceDescription');
|
||||||
|
@ -141,11 +139,10 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent<IP
|
||||||
{ t('recording.fileSharingdescription') }
|
{ t('recording.fileSharingdescription') }
|
||||||
</Text>
|
</Text>
|
||||||
<Switch
|
<Switch
|
||||||
|
checked = { sharingSetting }
|
||||||
className = 'recording-switch'
|
className = 'recording-switch'
|
||||||
disabled = { isValidating }
|
disabled = { isValidating }
|
||||||
onValueChange = { onSharingSettingChanged }
|
onChange = { onSharingSettingChanged } />
|
||||||
trackColor = {{ false: TRACK_COLOR }}
|
|
||||||
value = { sharingSetting } />
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -282,12 +279,11 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent<IP
|
||||||
if (fileRecordingsServiceEnabled || _localRecordingAvailable) {
|
if (fileRecordingsServiceEnabled || _localRecordingAvailable) {
|
||||||
switchContent = (
|
switchContent = (
|
||||||
<Switch
|
<Switch
|
||||||
|
checked = { selectedRecordingService
|
||||||
|
=== RECORDING_TYPES.DROPBOX }
|
||||||
className = 'recording-switch'
|
className = 'recording-switch'
|
||||||
disabled = { isValidating }
|
disabled = { isValidating }
|
||||||
onValueChange = { this._onDropboxSwitchChange }
|
onChange = { this._onDropboxSwitchChange } />
|
||||||
trackColor = {{ false: TRACK_COLOR }}
|
|
||||||
value = { selectedRecordingService
|
|
||||||
=== RECORDING_TYPES.DROPBOX } />
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,12 +347,11 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent<IP
|
||||||
{ t('recording.saveLocalRecording') }
|
{ t('recording.saveLocalRecording') }
|
||||||
</Text>
|
</Text>
|
||||||
<Switch
|
<Switch
|
||||||
|
checked = { selectedRecordingService
|
||||||
|
=== RECORDING_TYPES.LOCAL }
|
||||||
className = 'recording-switch'
|
className = 'recording-switch'
|
||||||
disabled = { isValidating }
|
disabled = { isValidating }
|
||||||
onValueChange = { this._onLocalRecordingSwitchChange }
|
onChange = { this._onLocalRecordingSwitchChange } />
|
||||||
trackColor = {{ false: TRACK_COLOR }}
|
|
||||||
value = { selectedRecordingService
|
|
||||||
=== RECORDING_TYPES.LOCAL } />
|
|
||||||
</Container>
|
</Container>
|
||||||
</Container>
|
</Container>
|
||||||
{selectedRecordingService === RECORDING_TYPES.LOCAL && (
|
{selectedRecordingService === RECORDING_TYPES.LOCAL && (
|
||||||
|
@ -373,11 +368,10 @@ class StartRecordingDialogContent extends AbstractStartRecordingDialogContent<IP
|
||||||
{t('recording.onlyRecordSelf')}
|
{t('recording.onlyRecordSelf')}
|
||||||
</Text>
|
</Text>
|
||||||
<Switch
|
<Switch
|
||||||
|
checked = { localRecordingOnlySelf }
|
||||||
className = 'recording-switch'
|
className = 'recording-switch'
|
||||||
disabled = { isValidating }
|
disabled = { isValidating }
|
||||||
onValueChange = { onLocalRecordingSelfChange }
|
onChange = { onLocalRecordingSelfChange } />
|
||||||
trackColor = {{ false: TRACK_COLOR }}
|
|
||||||
value = { localRecordingOnlySelf } />
|
|
||||||
</Container>
|
</Container>
|
||||||
</Container>
|
</Container>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue