mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
fix: properties panel obscures menus in legacy layout (#8474)
## Summary Fixes overlap issue where the new menu's node properties panel could cover the old floating menu. ## Changes Hide the properties panel when using the legacy menu, so it doesn't obscure the old menu. The properties panel did not work anyway (empy content). ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8474-fix-increase-z-index-of-legacy-floating-menu-2f86d73d365081a0ab44db24c2ea6357) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref, watch } from 'vue'
|
||||||
|
|
||||||
import { useSettingStore } from '@/platform/settings/settingStore'
|
import { useSettingStore } from '@/platform/settings/settingStore'
|
||||||
|
|
||||||
@@ -19,8 +19,13 @@ type RightSidePanelSection = 'advanced-inputs' | string
|
|||||||
export const useRightSidePanelStore = defineStore('rightSidePanel', () => {
|
export const useRightSidePanelStore = defineStore('rightSidePanel', () => {
|
||||||
const settingStore = useSettingStore()
|
const settingStore = useSettingStore()
|
||||||
|
|
||||||
|
const isLegacyMenu = computed(
|
||||||
|
() => settingStore.get('Comfy.UseNewMenu') === 'Disabled'
|
||||||
|
)
|
||||||
|
|
||||||
const isOpen = computed({
|
const isOpen = computed({
|
||||||
get: () => settingStore.get('Comfy.RightSidePanel.IsOpen'),
|
get: () =>
|
||||||
|
!isLegacyMenu.value && settingStore.get('Comfy.RightSidePanel.IsOpen'),
|
||||||
set: (value: boolean) =>
|
set: (value: boolean) =>
|
||||||
settingStore.set('Comfy.RightSidePanel.IsOpen', value)
|
settingStore.set('Comfy.RightSidePanel.IsOpen', value)
|
||||||
})
|
})
|
||||||
@@ -29,7 +34,15 @@ export const useRightSidePanelStore = defineStore('rightSidePanel', () => {
|
|||||||
const focusedSection = ref<RightSidePanelSection | null>(null)
|
const focusedSection = ref<RightSidePanelSection | null>(null)
|
||||||
const searchQuery = ref('')
|
const searchQuery = ref('')
|
||||||
|
|
||||||
|
// Auto-close panel when switching to legacy menu mode
|
||||||
|
watch(isLegacyMenu, (legacy) => {
|
||||||
|
if (legacy) {
|
||||||
|
void settingStore.set('Comfy.RightSidePanel.IsOpen', false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
function openPanel(tab?: RightSidePanelTab) {
|
function openPanel(tab?: RightSidePanelTab) {
|
||||||
|
if (isLegacyMenu.value) return
|
||||||
isOpen.value = true
|
isOpen.value = true
|
||||||
if (tab) {
|
if (tab) {
|
||||||
activeTab.value = tab
|
activeTab.value = tab
|
||||||
|
|||||||
Reference in New Issue
Block a user