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:
jaeone94
2026-02-24 13:30:27 +09:00
parent 8dbd3b206d
commit bdc080823f
2 changed files with 2 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ type NodePack = components['schemas']['Node']
const {
nodePacks,
isLoading = false,
label = 'Install',
label,
size = 'sm',
hasConflict,
conflictInfo

View File

@@ -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)
}