Skip to content

Commit 759a325

Browse files
Merge pull request #14 from pexip/13-move-the-button-from-settings-to-the-toolbar
chore: move the button from settings to the toolbar
2 parents d64ffe0 + eb3e089 commit 759a325

4 files changed

Lines changed: 16 additions & 8 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ to use this version or a later one.
88

99
## How to use
1010

11-
To activate this feature the host user should click on the settings button
12-
located on the top-right corner. One thing to take into account is that this
13-
option will only be available during conferences.
11+
To activate this feature, the host must click the toolbar button. Note that this
12+
option is only available during conferences that do not use direct media. If the
13+
conference uses direct media, the button will not be available.
1414

1515
<div align='center'>
1616

17-
![settings panel](./images/settings.png)
17+
![button](./images/button.png)
1818

1919
</div>
2020

images/button.png

11.3 KB
Loading

images/settings.png

-28.4 KB
Binary file not shown.

src/index.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ import { i18next } from './i18n'
88

99
const version = 1
1010

11+
const icon =
12+
'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="rgb(50, 50, 50)"><path d="M240-320h320v-80H240v80Zm400 0h80v-80h-80v80ZM240-480h80v-80h-80v80Zm160 0h320v-80H400v80ZM160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-480H160v480Zm0 0v-480 480Z"/></svg>'
13+
1114
const plugin = await registerPlugin({
1215
id: 'message-overlay',
1316
version
1417
})
1518

1619
setPlugin(plugin)
1720

18-
let button: Button<'settingsMenu'> | null = null
21+
let button: Button<'toolbar'> | null = null
1922
let creatingButton = false
2023

2124
const breakoutRooms = new Map<string, string>()
@@ -59,9 +62,14 @@ const addButton = async (): Promise<void> => {
5962
try {
6063
creatingButton = true
6164
button = await plugin.ui.addButton({
62-
position: 'settingsMenu',
63-
label: i18next.t('setMessageOverlay'),
64-
inMeetingOnly: true,
65+
position: 'toolbar',
66+
tooltip: i18next.t('setMessageOverlay'),
67+
icon: {
68+
custom: {
69+
main: icon,
70+
hover: icon
71+
}
72+
},
6573
roles: ['chair']
6674
})
6775
button.onClick.add(handleClickButton)

0 commit comments

Comments
 (0)