mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 11:57:48 +00:00
feat(toolbar-button-clicked) Enhance toolbar buttons with notify click
- add possibility to allow execution of the button's routine besides triggering `toolbarButtonClicked` API event - keep backwards compatibility - get rid of `ToolbarButton`
This commit is contained in:
@@ -13,6 +13,11 @@ import PasswordSection from './PasswordSection';
|
||||
|
||||
type Props = {
|
||||
|
||||
/**
|
||||
* Toolbar buttons which have their click exposed through the API.
|
||||
*/
|
||||
_buttonsWithNotifyClick: Array<string | Object>,
|
||||
|
||||
/**
|
||||
* Whether or not the current user can modify the current password.
|
||||
*/
|
||||
@@ -57,6 +62,7 @@ type Props = {
|
||||
* @returns {React$Element<any>}
|
||||
*/
|
||||
function SecurityDialog({
|
||||
_buttonsWithNotifyClick,
|
||||
_canEditPassword,
|
||||
_conference,
|
||||
_locked,
|
||||
@@ -82,6 +88,7 @@ function SecurityDialog({
|
||||
<div className = 'security-dialog'>
|
||||
<LobbySection />
|
||||
<PasswordSection
|
||||
buttonsWithNotifyClick = { _buttonsWithNotifyClick }
|
||||
canEditPassword = { _canEditPassword }
|
||||
conference = { _conference }
|
||||
locked = { _locked }
|
||||
@@ -117,11 +124,12 @@ function mapStateToProps(state) {
|
||||
locked,
|
||||
password
|
||||
} = state['features/base/conference'];
|
||||
const { roomPasswordNumberOfDigits } = state['features/base/config'];
|
||||
const { roomPasswordNumberOfDigits, buttonsWithNotifyClick } = state['features/base/config'];
|
||||
|
||||
const showE2ee = Boolean(e2eeSupported) && isLocalParticipantModerator(state);
|
||||
|
||||
return {
|
||||
_buttonsWithNotifyClick: buttonsWithNotifyClick,
|
||||
_canEditPassword: isLocalParticipantModerator(state),
|
||||
_conference: conference,
|
||||
_dialIn: state['features/invite'],
|
||||
|
||||
Reference in New Issue
Block a user