First commit
This commit is contained in:
19
frontend/app/composables/useSettings.ts
Normal file
19
frontend/app/composables/useSettings.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Shared open state for the settings popup (SettingsModal.vue).
|
||||
The sidebar cog flips this flag; the modal itself owns the settings. */
|
||||
export function useSettings() {
|
||||
const open = useState<boolean>('settings:open', () => false)
|
||||
|
||||
function show() {
|
||||
open.value = true
|
||||
}
|
||||
|
||||
function hide() {
|
||||
open.value = false
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
open.value = !open.value
|
||||
}
|
||||
|
||||
return { open, show, hide, toggle }
|
||||
}
|
||||
Reference in New Issue
Block a user