mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 01:09:46 +00:00
use correct response shape
This commit is contained in:
@@ -667,9 +667,10 @@ export function useCoreCommands(): ComfyCommand[] {
|
|||||||
label: 'Toggle the Custom Nodes Manager',
|
label: 'Toggle the Custom Nodes Manager',
|
||||||
versionAdded: '1.12.10',
|
versionAdded: '1.12.10',
|
||||||
function: async () => {
|
function: async () => {
|
||||||
const isLegacyManagerUI =
|
const { is_legacy_manager_ui } =
|
||||||
await useComfyManagerService().isLegacyManagerUI()
|
(await useComfyManagerService().isLegacyManagerUI()) ?? {}
|
||||||
if (isLegacyManagerUI) {
|
|
||||||
|
if (is_legacy_manager_ui === true) {
|
||||||
try {
|
try {
|
||||||
await useCommandStore().execute(
|
await useCommandStore().execute(
|
||||||
'Comfy.Manager.Menu.ToggleVisibility' // This command is registered by legacy manager FE extension
|
'Comfy.Manager.Menu.ToggleVisibility' // This command is registered by legacy manager FE extension
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ export const useComfyManagerService = () => {
|
|||||||
const isLegacyManagerUI = async (signal?: AbortSignal) => {
|
const isLegacyManagerUI = async (signal?: AbortSignal) => {
|
||||||
const errorContext = 'Checking if user set Manager to use the legacy UI'
|
const errorContext = 'Checking if user set Manager to use the legacy UI'
|
||||||
|
|
||||||
return executeRequest<boolean>(
|
return executeRequest<{ is_legacy_manager_ui: boolean }>(
|
||||||
() => managerApiClient.get(ManagerRoute.IS_LEGACY_MANAGER_UI, { signal }),
|
() => managerApiClient.get(ManagerRoute.IS_LEGACY_MANAGER_UI, { signal }),
|
||||||
{ errorContext }
|
{ errorContext }
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user