"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7319/react/features/video-menu/components/web/MuteEveryonesVideoDialog.tsx" (6 Jun 2023, 2041 Bytes) of package /linux/misc/jitsi-meet-7319.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TSX (TypeScript with React) source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "MuteEveryonesVideoDialog.tsx": jitsi-meet_8319_vs_jitsi-meet_8615.

    1 import React from 'react';
    2 import { connect } from 'react-redux';
    3 
    4 import { translate } from '../../../base/i18n/functions';
    5 import Dialog from '../../../base/ui/components/web/Dialog';
    6 import Switch from '../../../base/ui/components/web/Switch';
    7 import AbstractMuteEveryonesVideoDialog, { type IProps, abstractMapStateToProps }
    8     from '../AbstractMuteEveryonesVideoDialog';
    9 
   10 /**
   11  * A React Component with the contents for a dialog that asks for confirmation
   12  * from the user before disabling all remote participants cameras.
   13  *
   14  * @augments AbstractMuteEveryonesVideoDialog
   15  */
   16 class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<IProps> {
   17 
   18     /**
   19      * Implements React's {@link Component#render()}.
   20      *
   21      * @inheritdoc
   22      * @returns {ReactElement}
   23      */
   24     render() {
   25         return (
   26             <Dialog
   27                 ok = {{ translationKey: 'dialog.muteParticipantsVideoButton' }}
   28                 onSubmit = { this._onSubmit }
   29                 title = { this.props.title }>
   30                 <div className = 'mute-dialog'>
   31                     {this.state.content}
   32                     { this.props.isModerationSupported && this.props.exclude.length === 0 && (
   33                         <>
   34                             <div className = 'separator-line' />
   35                             <div className = 'control-row'>
   36                                 <label htmlFor = 'moderation-switch'>
   37                                     {this.props.t('dialog.moderationVideoLabel')}
   38                                 </label>
   39                                 <Switch
   40                                     checked = { !this.state.moderationEnabled }
   41                                     id = 'moderation-switch'
   42                                     onChange = { this._onToggleModeration } />
   43                             </div>
   44                         </>
   45                     )}
   46                 </div>
   47             </Dialog>
   48         );
   49     }
   50 }
   51 
   52 export default translate(connect(abstractMapStateToProps)(MuteEveryonesVideoDialog));