Files
ComfyUI_frontend/src/stores/helpCenterStore.ts
pythongosssss 4ca6220adf Refactor app menu items (#4665)
* Restructures the application menu
- rename Workflow to File
- move new & template items to top level
- add View menu and related sub items

Commands
- add "active" state getter shown as checkmark in the menu

Node side panel
- add refresh node defs
- change reset view icon

Help center
- change to use store for visibility

Fixes
- Fix bug with mouse down where if you drag mouse out, mouse up wasn't caught
- Fix issue with canvas info setting not triggering a redraw on change

* Fix missing translation warnings

* Add separator under new

* tidy

* Update locales [skip ci]

* fix some tests

* fix

* Hide icon if there is an active state within the menu item group

* Update locales [skip ci]

* Fix tests

* Implement feedback
- Remove queue, node lib, model lib, workflows, manager, help center
- Add minimap, link visibility

* Update locales [skip ci]

* Add plus icon on "New" menu item

* Update locales [skip ci]

* Fix test

* Fix translations

* Update locales [skip ci]

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-08-14 14:53:46 -07:00

26 lines
407 B
TypeScript

import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useHelpCenterStore = defineStore('helpCenter', () => {
const isVisible = ref(false)
const toggle = () => {
isVisible.value = !isVisible.value
}
const show = () => {
isVisible.value = true
}
const hide = () => {
isVisible.value = false
}
return {
isVisible,
toggle,
show,
hide
}
})