chore: fix dark mode keyboard shortcut [skip e2e]
This commit is contained in:
@@ -23,12 +23,15 @@ const QuickSettingsButton = ({ application, isMobileNavigation = false }: Props)
|
|||||||
const toggleMenu = () => setIsOpen(!isOpen)
|
const toggleMenu = () => setIsOpen(!isOpen)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
const darkThemeFeature = new UIFeature(GetDarkThemeFeature())
|
||||||
|
|
||||||
return commandService.addCommandHandler({
|
return commandService.addCommandHandler({
|
||||||
command: TOGGLE_DARK_MODE_COMMAND,
|
command: TOGGLE_DARK_MODE_COMMAND,
|
||||||
category: 'General',
|
category: 'General',
|
||||||
description: 'Toggle dark mode',
|
description: 'Toggle dark mode',
|
||||||
onKeyDown: () => {
|
onKeyDown: () => {
|
||||||
void application.componentManager.toggleTheme(new UIFeature(GetDarkThemeFeature()))
|
void application.componentManager.toggleTheme(darkThemeFeature)
|
||||||
|
return true
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}, [application, commandService])
|
}, [application, commandService])
|
||||||
|
|||||||
Reference in New Issue
Block a user