From 7d1659c04a96e2e322923499a366185543c53ef0 Mon Sep 17 00:00:00 2001 From: Jin Yi Date: Sat, 23 Aug 2025 02:41:39 +0900 Subject: [PATCH] Fix: Restore api.ts from main branch after incorrect rebase (#5150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: api.ts file is different with main branch * Update locales [skip ci] * fix: restore support dotprop access * fix: apply locales based on manager/menu-items-migration * fix: Add missing shortcuts translation section for CI tests - Added shortcuts section with keyboardShortcuts key - Fixes failing Playwright test looking for 'Keyboard Shortcuts' aria-label - Issue was caused by incomplete rebase from main branch 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * fix: Add missing versionMismatchWarning translations for CI tests - Added versionMismatchWarning section with all required keys - Added general versionMismatch related keys (updateFrontend, dismiss, etc.) - Fixes failing Playwright tests for version mismatch warnings - These keys were lost during the rebase from main branch 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --------- Co-authored-by: github-actions Co-authored-by: Claude --- src/locales/en/main.json | 27 +++++++++++++++++++++++++++ src/scripts/api.ts | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 51e94188bd..0c9d79920d 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -98,6 +98,12 @@ "nodes": "Nodes", "community": "Community", "all": "All", + "versionMismatchWarning": "Version Compatibility Warning", + "versionMismatchWarningMessage": "{warning}: {detail} Visit https://docs.comfy.org/installation/update_comfyui#common-update-issues for update instructions.", + "frontendOutdated": "Frontend version {frontendVersion} is outdated. Backend requires {requiredVersion} or higher.", + "frontendNewer": "Frontend version {frontendVersion} may not be compatible with backend version {backendVersion}.", + "updateFrontend": "Update Frontend", + "dismiss": "Dismiss", "update": "Update", "updated": "Updated", "resultsCount": "Found {count} Results", @@ -431,6 +437,20 @@ "error": "Unable to start ComfyUI Desktop" } }, + "shortcuts": { + "essentials": "Essential", + "viewControls": "View Controls", + "manageShortcuts": "Manage Shortcuts", + "noKeybinding": "No keybinding", + "keyboardShortcuts": "Keyboard Shortcuts", + "subcategories": { + "workflow": "Workflow", + "node": "Node", + "queue": "Queue", + "view": "View", + "panelControls": "Panel Controls" + } + }, "serverConfig": { "modifiedConfigs": "You have modified the following server configurations. Restart to apply changes.", "revertChanges": "Revert Changes", @@ -1362,6 +1382,13 @@ "outdatedVersionGeneric": "Some nodes require a newer version of ComfyUI. Please update to use all nodes.", "coreNodesFromVersion": "Requires ComfyUI {version}:" }, + "versionMismatchWarning": { + "title": "Version Compatibility Warning", + "frontendOutdated": "Frontend version {frontendVersion} is outdated. Backend requires version {requiredVersion} or higher.", + "frontendNewer": "Frontend version {frontendVersion} may not be compatible with backend version {backendVersion}.", + "updateFrontend": "Update Frontend", + "dismiss": "Dismiss" + }, "errorDialog": { "defaultTitle": "An error occurred", "loadWorkflowTitle": "Loading aborted due to error reloading workflow data", diff --git a/src/scripts/api.ts b/src/scripts/api.ts index 46732009c3..857626674f 100644 --- a/src/scripts/api.ts +++ b/src/scripts/api.ts @@ -1,5 +1,5 @@ import axios from 'axios' -import get from 'lodash/get' +import { get } from 'es-toolkit/compat' import defaultClientFeatureFlags from '@/config/clientFeatureFlags.json' import type {