mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +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