First commit
This commit is contained in:
20
frontend/app/composables/useProfileMenu.ts
Normal file
20
frontend/app/composables/useProfileMenu.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/* Shared open state for the profile popup (ProfileModal.vue), shaped like
|
||||
useSettings and useSignInPopup. The account row in the sidebar flips this
|
||||
flag; the popup itself owns the account form. */
|
||||
export function useProfileMenu() {
|
||||
const open = useState<boolean>('profile: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