First commit
This commit is contained in:
15
frontend/app/composables/useLanguageMenu.ts
Normal file
15
frontend/app/composables/useLanguageMenu.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/* The open state of the reader's language menu, shared like the other popups:
|
||||
the book's Esc handler defers to whatever popup is on top, and the menu
|
||||
steps aside when search or settings opens — popups don't stack in this app. */
|
||||
export function useLanguageMenu() {
|
||||
const open = useState<boolean>('language-menu:open', () => false)
|
||||
|
||||
function show() {
|
||||
open.value = true
|
||||
}
|
||||
function hide() {
|
||||
open.value = false
|
||||
}
|
||||
|
||||
return { open, show, hide }
|
||||
}
|
||||
Reference in New Issue
Block a user