First commit
This commit is contained in:
15
frontend/app/composables/useAccountActionsMenu.ts
Normal file
15
frontend/app/composables/useAccountActionsMenu.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/* The open state of the ⋮ menu on a row of the admin dashboard, shared like the
|
||||
other popups. One row's menu at a time, so it holds the id of the account
|
||||
whose menu is open — '' when none is — rather than a boolean per row. */
|
||||
export function useAccountActionsMenu() {
|
||||
const openId = useState<string>('account-actions-menu:open', () => '')
|
||||
|
||||
function show(id: string) {
|
||||
openId.value = id
|
||||
}
|
||||
function hide() {
|
||||
openId.value = ''
|
||||
}
|
||||
|
||||
return { openId, show, hide }
|
||||
}
|
||||
Reference in New Issue
Block a user