mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 19:27:57 +00:00
The panel will appear on the right side after the participant pane panel. Currently the panel is disabled by default and the components that are rendered in the panel are empty (null). The panel is easily customizable by adding some content in the CustomPanel component.
30 lines
749 B
TypeScript
30 lines
749 B
TypeScript
import { useSelector } from 'react-redux';
|
|
|
|
import CustomPanelButton from './components/web/CustomPanelButton';
|
|
import { isCustomPanelEnabled } from './functions';
|
|
|
|
/**
|
|
* Configuration for the custom panel toolbar button.
|
|
*/
|
|
const customPanel = {
|
|
key: 'custom-panel',
|
|
Content: CustomPanelButton,
|
|
group: 2
|
|
};
|
|
|
|
/**
|
|
* A hook that returns the custom panel button if the feature is enabled.
|
|
* Uses useSelector for reactive updates when the feature is toggled dynamically.
|
|
*
|
|
* @returns {Object | undefined} The button configuration or undefined if disabled.
|
|
*/
|
|
export function useCustomPanelButton() {
|
|
const enabled = useSelector(isCustomPanelEnabled);
|
|
|
|
if (enabled) {
|
|
return customPanel;
|
|
}
|
|
|
|
return undefined;
|
|
}
|