mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix(manager): stop opening dialog for legacy-only commands and localize install button label
useManagerState.ts:
- Remove managerDialog.show(ManagerTab.All) from the isLegacyOnly branch;
when a command has no NEW_UI equivalent the toast alone should be shown
and the manager must not open
- Convert ManagerTab import to import type since it is now type-only
PackInstallButton.vue:
- Remove hardcoded default 'Install' from the label prop so computedLabel
can reach its i18n fallback (t('g.install') / t('manager.installSelected'));
the previous default made that branch permanently dead code
This commit is contained in:
@@ -35,7 +35,7 @@ type NodePack = components['schemas']['Node']
|
||||
const {
|
||||
nodePacks,
|
||||
isLoading = false,
|
||||
label = 'Install',
|
||||
label,
|
||||
size = 'sm',
|
||||
hasConflict,
|
||||
conflictInfo
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useSettingsDialog } from '@/platform/settings/composables/useSettingsDi
|
||||
import { useCommandStore } from '@/stores/commandStore'
|
||||
import { useSystemStatsStore } from '@/stores/systemStatsStore'
|
||||
import { useManagerDialog } from '@/workbench/extensions/manager/composables/useManagerDialog'
|
||||
import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes'
|
||||
import type { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes'
|
||||
|
||||
export enum ManagerUIState {
|
||||
DISABLED = 'disabled',
|
||||
@@ -182,14 +182,12 @@ export function useManagerState() {
|
||||
|
||||
case ManagerUIState.NEW_UI:
|
||||
if (options?.isLegacyOnly) {
|
||||
// Legacy command is not available in NEW_UI mode
|
||||
useToastStore().add({
|
||||
severity: 'error',
|
||||
summary: t('g.error'),
|
||||
detail: t('manager.legacyMenuNotAvailable'),
|
||||
life: 3000
|
||||
})
|
||||
managerDialog.show(ManagerTab.All)
|
||||
} else {
|
||||
managerDialog.show(options?.initialTab, options?.initialPackId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user