mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(toolbox): moved action to appropriate feature and fixed naming
This commit is contained in:
committed by
Calinteodor
parent
fa6dc292c1
commit
2d2bae6ec1
@@ -18,14 +18,3 @@ export const READY_TO_CLOSE = 'READY_TO_CLOSE';
|
||||
*/
|
||||
export const SCREEN_SHARE_PARTICIPANTS_UPDATED
|
||||
= 'SCREEN_SHARE_PARTICIPANTS_UPDATED';
|
||||
|
||||
/**
|
||||
* The type of (redux) action which signals that a custom button from the overflow menu was pressed.
|
||||
*
|
||||
* @returns {{
|
||||
* type: CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
* id: string,
|
||||
* text: string
|
||||
* }}
|
||||
*/
|
||||
export const CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED = 'CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED';
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
READY_TO_CLOSE,
|
||||
SCREEN_SHARE_PARTICIPANTS_UPDATED
|
||||
} from './actionTypes';
|
||||
import { READY_TO_CLOSE, SCREEN_SHARE_PARTICIPANTS_UPDATED } from './actionTypes';
|
||||
|
||||
|
||||
/**
|
||||
@@ -35,22 +31,3 @@ export function setParticipantsWithScreenShare(participantIds: Array<string>) {
|
||||
participantIds
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a (redux) action which that a custom overflow menu button was pressed.
|
||||
*
|
||||
* @param {string} id - The id for the custom button.
|
||||
* @param {string} text - The label for the custom button.
|
||||
* @returns {{
|
||||
* type: CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
* id: string,
|
||||
* text: string
|
||||
* }}
|
||||
*/
|
||||
export function customOverflowMenuButtonPressed(id: string, text: string) {
|
||||
return {
|
||||
type: CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
id,
|
||||
text
|
||||
};
|
||||
}
|
||||
|
||||
@@ -52,15 +52,13 @@ import { ITrack } from '../../base/tracks/types';
|
||||
import { CLOSE_CHAT, OPEN_CHAT } from '../../chat/actionTypes';
|
||||
import { closeChat, openChat, sendMessage, setPrivateMessageRecipient } from '../../chat/actions.native';
|
||||
import { setRequestingSubtitles } from '../../subtitles/actions.any';
|
||||
import { CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED } from '../../toolbox/actionTypes';
|
||||
import { muteLocal } from '../../video-menu/actions.native';
|
||||
import { ENTER_PICTURE_IN_PICTURE } from '../picture-in-picture/actionTypes';
|
||||
// @ts-ignore
|
||||
import { isExternalAPIAvailable } from '../react-native-sdk/functions';
|
||||
|
||||
import {
|
||||
CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
READY_TO_CLOSE
|
||||
} from './actionTypes';
|
||||
import { READY_TO_CLOSE } from './actionTypes';
|
||||
import { setParticipantsWithScreenShare } from './actions';
|
||||
import { participantToParticipantInfo, sendEvent } from './functions';
|
||||
import logger from './logger';
|
||||
@@ -82,12 +80,6 @@ const CHAT_TOGGLED = 'CHAT_TOGGLED';
|
||||
*/
|
||||
const CONFERENCE_TERMINATED = 'CONFERENCE_TERMINATED';
|
||||
|
||||
/**
|
||||
* Event which will be emitted on the native side to indicate that the custom overflow menu button was pressed.
|
||||
*/
|
||||
const CUSTOM_MENU_BUTTON_PRESSED = 'CUSTOM_MENU_BUTTON_PRESSED';
|
||||
|
||||
|
||||
/**
|
||||
* Event which will be emitted on the native side to indicate a message was received
|
||||
* through the channel.
|
||||
@@ -199,7 +191,7 @@ externalAPIEnabled && MiddlewareRegistry.register(store => next => action => {
|
||||
|
||||
sendEvent(
|
||||
store,
|
||||
CUSTOM_MENU_BUTTON_PRESSED,
|
||||
CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
{
|
||||
id,
|
||||
text
|
||||
|
||||
@@ -7,6 +7,17 @@
|
||||
*/
|
||||
export const CLEAR_TOOLBOX_TIMEOUT = 'CLEAR_TOOLBOX_TIMEOUT';
|
||||
|
||||
/**
|
||||
* The type of (redux) action which signals that a custom button from the overflow menu was pressed.
|
||||
*
|
||||
* @returns {{
|
||||
* type: CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
* id: string,
|
||||
* text: string
|
||||
* }}
|
||||
*/
|
||||
export const CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED = 'CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED';
|
||||
|
||||
/**
|
||||
* The type of (redux) action which updates whether the conference is or is not
|
||||
* currently in full screen view.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED } from './actionTypes';
|
||||
|
||||
export * from './actions.any';
|
||||
|
||||
/**
|
||||
@@ -22,3 +24,22 @@ export function showToolbox(_timeout?: number): any {
|
||||
export function setOverflowMenuVisible(_visible: boolean): any {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a (redux) action which that a custom overflow menu button was pressed.
|
||||
*
|
||||
* @param {string} id - The id for the custom button.
|
||||
* @param {string} text - The label for the custom button.
|
||||
* @returns {{
|
||||
* type: CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
* id: string,
|
||||
* text: string
|
||||
* }}
|
||||
*/
|
||||
export function customOverflowMenuButtonPressed(id: string, text: string) {
|
||||
return {
|
||||
type: CUSTOM_OVERFLOW_MENU_BUTTON_PRESSED,
|
||||
id,
|
||||
text
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import SettingsButton from '../../../base/settings/components/native/SettingsBut
|
||||
import BreakoutRoomsButton
|
||||
from '../../../breakout-rooms/components/native/BreakoutRoomsButton';
|
||||
import SharedDocumentButton from '../../../etherpad/components/SharedDocumentButton.native';
|
||||
import { customOverflowMenuButtonPressed } from '../../../mobile/external-api/actions';
|
||||
import ReactionMenu from '../../../reactions/components/native/ReactionMenu';
|
||||
import { shouldDisplayReactionsButtons } from '../../../reactions/functions.any';
|
||||
import LiveStreamButton from '../../../recording/components/LiveStream/native/LiveStreamButton';
|
||||
@@ -25,6 +24,7 @@ import ClosedCaptionButton from '../../../subtitles/components/native/ClosedCapt
|
||||
import TileViewButton from '../../../video-layout/components/TileViewButton';
|
||||
import styles from '../../../video-menu/components/native/styles';
|
||||
import WhiteboardButton from '../../../whiteboard/components/native/WhiteboardButton';
|
||||
import { customOverflowMenuButtonPressed } from '../../actions.native';
|
||||
import { getMovableButtons } from '../../functions.native';
|
||||
|
||||
import AudioOnlyButton from './AudioOnlyButton';
|
||||
|
||||
Reference in New Issue
Block a user