File tree Expand file tree Collapse file tree 6 files changed +49
-0
lines changed
samples/sample-action-button-dropdown-plugin/src/components/sample-action-button-dropdown-plugin-item Expand file tree Collapse file tree 6 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,18 @@ function SampleActionButtonDropdownPlugin(
143
143
} , 5000 ) ;
144
144
} ,
145
145
} ) ,
146
+ new ActionButtonDropdownOption ( {
147
+ label : 'Hide nav-bar' ,
148
+ icon : 'copy' ,
149
+ tooltip : 'this is a button injected by plugin' ,
150
+ allowed : true ,
151
+ onClick : ( ) => {
152
+ pluginApi . uiCommands . navBar . setDisplayNavBar ( { displayNavBar : false } ) ;
153
+ setTimeout ( ( ) => {
154
+ pluginApi . uiCommands . navBar . setDisplayNavBar ( { displayNavBar : true } ) ;
155
+ } , 5000 ) ;
156
+ } ,
157
+ } ) ,
146
158
new ActionButtonDropdownOption ( {
147
159
label : showingGenericContentInPresentationArea ? 'Return previous presentation content' : 'Set different content in presentation area' ,
148
160
icon : 'copy' ,
Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ import { conference } from './conference/commands';
7
7
import { notification } from './notification/commands' ;
8
8
import { actionsBar } from './actions-bar/commands' ;
9
9
import { layout } from './layout/commands' ;
10
+ import { navBar } from './nav-bar/commands' ;
10
11
11
12
export const uiCommands = {
12
13
actionsBar,
13
14
chat,
14
15
externalVideo,
15
16
sidekickOptionsContainer,
17
+ navBar,
16
18
presentationArea,
17
19
userStatus,
18
20
conference,
Original file line number Diff line number Diff line change
1
+ import { NavBarEnum } from './enums' ;
2
+ import { SetDisplayNavBarCommandArguments } from './types' ;
3
+
4
+ export const navBar = {
5
+ /**
6
+ * Sets the displayNavBar to true (show it) or false (hide it).
7
+ *
8
+ * @param setDisplayNavBarCommandArguments: object with a boolean that tells whether to display
9
+ * the navbar
10
+ */
11
+ setDisplayNavBar : ( setDisplayNavBarCommandArguments : SetDisplayNavBarCommandArguments ) => {
12
+ const { displayNavBar } = setDisplayNavBarCommandArguments ;
13
+ window . dispatchEvent (
14
+ new CustomEvent <
15
+ SetDisplayNavBarCommandArguments
16
+ > ( NavBarEnum . SET_DISPLAY_NAV_BAR , {
17
+ detail : {
18
+ displayNavBar,
19
+ } ,
20
+ } ) ,
21
+ ) ;
22
+ } ,
23
+ } ;
Original file line number Diff line number Diff line change
1
+ export enum NavBarEnum {
2
+ SET_DISPLAY_NAV_BAR = 'SET_DISPLAY_NAV_BAR_COMMAND' ,
3
+ }
Original file line number Diff line number Diff line change
1
+ export interface SetDisplayNavBarCommandArguments {
2
+ displayNavBar : boolean ;
3
+ }
4
+
5
+ export interface UiCommandsNavBarObject {
6
+ setDisplayNavBar : ( setDisplayNavBarCommandArguments : SetDisplayNavBarCommandArguments ) => void ;
7
+ }
Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ import { UiCommandsConferenceObject } from './conference/types';
7
7
import { UiCommandsNotificationObject } from './notification/types' ;
8
8
import { UiCommandsActionsBarObject } from './actions-bar/types' ;
9
9
import { UiCommandsLayoutObject } from './layout/types' ;
10
+ import { UiCommandsNavBarObject } from './nav-bar/types' ;
10
11
11
12
export interface UiCommands {
12
13
layout : UiCommandsLayoutObject ;
13
14
actionsBar : UiCommandsActionsBarObject ;
14
15
chat : UiCommandsChatObject ;
15
16
externalVideo : UiCommandsExternalVideoObject ;
16
17
sidekickOptionsContainer : UiCommandsSidekickOptionsContainerObject ;
18
+ navBar : UiCommandsNavBarObject ;
17
19
presentationArea : UiCommandsPresentationAreaObject ;
18
20
userStatus : UiCommandsUserStatusObject ;
19
21
conference : UiCommandsConferenceObject ;
You can’t perform that action at this time.
0 commit comments