"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7550/react/features/video-menu/components/web/MuteEveryoneDialog.tsx" (26 Sep 2023, 1995 Bytes) of package /linux/misc/jitsi-meet-7550.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.

    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 AbstractMuteEveryoneDialog, { type IProps, abstractMapStateToProps }
    8     from '../AbstractMuteEveryoneDialog';
    9 
   10 /**
   11  * A React Component with the contents for a dialog that asks for confirmation
   12  * from the user before muting all remote participants.
   13  *
   14  * @augments AbstractMuteEveryoneDialog
   15  */
   16 class MuteEveryoneDialog extends AbstractMuteEveryoneDialog<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.muteParticipantButton' }}
   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.moderationAudioLabel')}
   38                                 </label>
   39                                 <Switch
   40                                     checked = { !this.state.audioModerationEnabled }
   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)(MuteEveryoneDialog));