Skip to content

Commit 5e27ba2

Browse files
chore: move the button from settings to the toolbar
1 parent d64ffe0 commit 5e27ba2

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

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)