mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
feat: Add rightSidebarTabStore for managing right sidebar visibility
This commit is contained in:
25
src/stores/workspace/rightSidebarTabStore.ts
Normal file
25
src/stores/workspace/rightSidebarTabStore.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export const useRightSidebarTabStore = defineStore('rightSidebarTab', () => {
|
||||
const isVisible = ref(false)
|
||||
|
||||
const toggleVisibility = () => {
|
||||
isVisible.value = !isVisible.value
|
||||
}
|
||||
|
||||
const show = () => {
|
||||
isVisible.value = true
|
||||
}
|
||||
|
||||
const hide = () => {
|
||||
isVisible.value = false
|
||||
}
|
||||
|
||||
return {
|
||||
isVisible,
|
||||
toggleVisibility,
|
||||
show,
|
||||
hide
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user