mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 07:44:11 +00:00
Add vue node feature flag (#4927)
This commit is contained in:
@@ -276,6 +276,33 @@ export function useCoreCommands(): ComfyCommand[] {
|
||||
app.canvas.setDirty(true, true)
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Experimental.ToggleVueNodes',
|
||||
label: () =>
|
||||
`Experimental: ${
|
||||
useSettingStore().get('Comfy.VueNodes.Enabled') ? 'Disable' : 'Enable'
|
||||
} Vue Nodes`,
|
||||
function: async () => {
|
||||
const settingStore = useSettingStore()
|
||||
const current = settingStore.get('Comfy.VueNodes.Enabled') ?? false
|
||||
await settingStore.set('Comfy.VueNodes.Enabled', !current)
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Experimental.ToggleVueNodeDebugPanel',
|
||||
label: () =>
|
||||
`Experimental: ${
|
||||
useSettingStore().get('Comfy.VueNodes.DebugPanel.Visible')
|
||||
? 'Hide'
|
||||
: 'Show'
|
||||
} Vue Node Debug Panel`,
|
||||
function: async () => {
|
||||
const settingStore = useSettingStore()
|
||||
const current =
|
||||
settingStore.get('Comfy.VueNodes.DebugPanel.Visible') ?? false
|
||||
await settingStore.set('Comfy.VueNodes.DebugPanel.Visible', !current)
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Comfy.Canvas.FitView',
|
||||
icon: 'pi pi-expand',
|
||||
|
||||
@@ -17,21 +17,10 @@ export const useFeatureFlags = () => {
|
||||
*/
|
||||
const isVueNodesEnabled = computed(() => {
|
||||
try {
|
||||
return settingStore.get('Comfy.VueNodes.Enabled' as any) ?? true // Default to true for development
|
||||
// Off by default: ensure Vue nodes are disabled unless explicitly enabled
|
||||
return settingStore.get('Comfy.VueNodes.Enabled') ?? false
|
||||
} catch {
|
||||
return true // Default to true for development
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Enable Vue widget rendering within Vue nodes
|
||||
* When disabled, Vue nodes render without widgets (structure only)
|
||||
*/
|
||||
const isVueWidgetsEnabled = computed(() => {
|
||||
try {
|
||||
return settingStore.get('Comfy.VueNodes.Widgets' as any) ?? true
|
||||
} catch {
|
||||
return true
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -74,7 +63,6 @@ export const useFeatureFlags = () => {
|
||||
|
||||
return {
|
||||
isVueNodesEnabled,
|
||||
isVueWidgetsEnabled,
|
||||
isDevModeEnabled,
|
||||
shouldRenderVueNodes,
|
||||
syncVueNodesFlag
|
||||
|
||||
Reference in New Issue
Block a user