snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
Some checks failed
Prosody Plugin Tests / test (push) Failing after 10m11s
Close stale issues and PRs / stale (push) Failing after 1s

This commit is contained in:
upstream-mirror
2026-09-15 15:56:32 +05:00
commit 1d2bfcac0c
3159 changed files with 464524 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
import { Component } from 'react';
import { WithTranslation } from 'react-i18next';
import { createRemoteVideoMenuButtonEvent } from '../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../analytics/functions';
import { IReduxState, IStore } from '../../app/types';
import { grantModerator } from '../../base/participants/actions';
import { getParticipantById } from '../../base/participants/functions';
interface IProps extends WithTranslation {
/**
* The Redux dispatch function.
*/
dispatch: IStore['dispatch'];
/**
* The ID of the remote participant to be granted moderator rights.
*/
participantID: string;
/**
* The name of the remote participant to be granted moderator rights.
*/
participantName?: string;
}
/**
* Abstract dialog to confirm granting moderator to a participant.
*/
export default class AbstractGrantModeratorDialog
extends Component<IProps> {
/**
* Initializes a new {@code AbstractGrantModeratorDialog} instance.
*
* @inheritdoc
*/
constructor(props: IProps) {
super(props);
this._onSubmit = this._onSubmit.bind(this);
}
/**
* Callback for the confirm button.
*
* @private
* @returns {boolean} - True (to note that the modal should be closed).
*/
_onSubmit() {
const { dispatch, participantID } = this.props;
sendAnalytics(createRemoteVideoMenuButtonEvent(
'grant.moderator.button',
{
'participant_id': participantID
}));
dispatch(grantModerator(participantID));
return true;
}
}
/**
* Maps (parts of) the Redux state to the associated {@code AbstractMuteEveryoneDialog}'s props.
*
* @param {IReduxState} state - The redux state.
* @param {Object} ownProps - The properties explicitly passed to the component.
* @returns {IProps}
*/
export function abstractMapStateToProps(state: IReduxState, ownProps: IProps) {
return {
participantName: getParticipantById(state, ownProps.participantID)?.name
};
}