Initial commit: AI chat assistant with workflow chat, workspace, and profile tabs
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
29
composables/useDrawer.uts
Normal file
29
composables/useDrawer.uts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* useDrawer — Drawer open/close state management
|
||||
*
|
||||
* Controls the left-slide drawer that contains history and workspace views.
|
||||
* Simple boolean toggle — no persistence needed.
|
||||
*/
|
||||
|
||||
export function useDrawer() {
|
||||
const isDrawerOpen = ref(false)
|
||||
|
||||
function openDrawer(): void {
|
||||
isDrawerOpen.value = true
|
||||
}
|
||||
|
||||
function closeDrawer(): void {
|
||||
isDrawerOpen.value = false
|
||||
}
|
||||
|
||||
function toggleDrawer(): void {
|
||||
isDrawerOpen.value = !isDrawerOpen.value
|
||||
}
|
||||
|
||||
return {
|
||||
isDrawerOpen,
|
||||
openDrawer,
|
||||
closeDrawer,
|
||||
toggleDrawer,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user