From 6b085ea8c45bfc1fa7986cfa63361d2d7ea12a30 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 12 Aug 2025 06:49:15 +0000 Subject: [PATCH 01/15] [feat] Add issues: write permission to lint-and-format workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lint-and-format workflow creates comments on PRs, which requires the issues: write permission to function properly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/lint-and-format.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint-and-format.yaml b/.github/workflows/lint-and-format.yaml index 5d9a50d83..1605cace8 100644 --- a/.github/workflows/lint-and-format.yaml +++ b/.github/workflows/lint-and-format.yaml @@ -7,6 +7,7 @@ on: permissions: contents: write pull-requests: write + issues: write jobs: lint-and-format: From 73f71fc018e2ec6383800974d7947e151ceba478 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 12 Aug 2025 11:48:32 +0000 Subject: [PATCH 02/15] kick-format --- CLAUDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 2e15e3b17..8e18d3e89 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,6 +20,8 @@ ## Git Conventions + + - Use [prefix] format: [feat], [bugfix], [docs] - Add "Fixes #n" to PR descriptions - Never mention Claude/AI in commits From 7ee33e289220437eace039e27611dd97f6f3bd49 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 12 Aug 2025 11:52:25 +0000 Subject: [PATCH 03/15] kick-format-modify-main-ts --- CLAUDE.md | 2 -- src/main.ts | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8e18d3e89..2e15e3b17 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,8 +20,6 @@ ## Git Conventions - - - Use [prefix] format: [feat], [bugfix], [docs] - Add "Fixes #n" to PR descriptions - Never mention Claude/AI in commits diff --git a/src/main.ts b/src/main.ts index d278f816d..ace679c7b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,7 +20,8 @@ import App from './App.vue' import './assets/css/style.css' import { i18n } from './i18n' -const ComfyUIPreset = definePreset(Aura, { +const ComfyUIPreset = definePreset( + Aura, { semantic: { // @ts-expect-error fixme ts strict error primary: Aura['primitive'].blue From 0f747f3c5d1ebaa2c7d26107b328fb4c98892e0e Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 13 Aug 2025 05:21:29 +0000 Subject: [PATCH 04/15] use auto-commit-action to handle pullrequest-ref name --- .github/workflows/lint-and-format.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint-and-format.yaml b/.github/workflows/lint-and-format.yaml index 1605cace8..6acbb4dfa 100644 --- a/.github/workflows/lint-and-format.yaml +++ b/.github/workflows/lint-and-format.yaml @@ -44,14 +44,12 @@ jobs: echo "changed=false" >> $GITHUB_OUTPUT fi + # commit prettier fixed code - name: Commit changes if: steps.verify-changed-files.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add . - git commit -m "[auto-fix] Apply ESLint and Prettier fixes" - git push + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: '[auto-fix] Apply ESLint and Prettier fixe' - name: Final validation run: | @@ -81,4 +79,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, body: '## ⚠️ Linting/Formatting Issues Found\n\nThis PR has linting or formatting issues that need to be fixed.\n\n**Since this PR is from a fork, auto-fix cannot be applied automatically.**\n\n### Option 1: Set up pre-commit hooks (recommended)\nRun this once to automatically format code on every commit:\n```bash\nnpm run prepare\n```\n\n### Option 2: Fix manually\nRun these commands and push the changes:\n```bash\nnpm run lint:fix\nnpm run format\n```\n\nSee [CONTRIBUTING.md](https://github.com/Comfy-Org/ComfyUI_frontend/blob/main/CONTRIBUTING.md#git-pre-commit-hooks) for more details.' - }) \ No newline at end of file + }) From ec2888a116f357dd8dbe3cbc550ceb0b1c450d80 Mon Sep 17 00:00:00 2001 From: snomiao <7323030+snomiao@users.noreply.github.com> Date: Wed, 13 Aug 2025 05:25:41 +0000 Subject: [PATCH 05/15] [auto-fix] Apply ESLint and Prettier fixe --- src/main.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index ace679c7b..d278f816d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,8 +20,7 @@ import App from './App.vue' import './assets/css/style.css' import { i18n } from './i18n' -const ComfyUIPreset = definePreset( - Aura, { +const ComfyUIPreset = definePreset(Aura, { semantic: { // @ts-expect-error fixme ts strict error primary: Aura['primitive'].blue From 45b43aa0938ed46b24df97eb187e72ae4b7a1f23 Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 13 Aug 2025 06:49:05 +0000 Subject: [PATCH 06/15] feat: Add issues write permission to workflows to avoid lint and i18n workflow conflicts - Add issues: write permission to lint-and-format.yaml - Add issues: write permission to i18n.yaml - Prevents workflow conflicts when updating PR statuses or comments --- .github/workflows/i18n.yaml | 12 ++---------- .github/workflows/lint-and-format.yaml | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/i18n.yaml b/.github/workflows/i18n.yaml index 3482e74c6..bdf209a6a 100644 --- a/.github/workflows/i18n.yaml +++ b/.github/workflows/i18n.yaml @@ -1,7 +1,7 @@ name: Update Locales on: - pull_request: + push: branches: [ main, master, dev* ] paths-ignore: - '.github/**' @@ -12,8 +12,6 @@ on: jobs: update-locales: - # Don't run on fork PRs - if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest steps: - uses: Comfy-Org/ComfyUI_frontend_setup_action@v2.3 @@ -39,13 +37,7 @@ jobs: run: | git config --global user.name 'github-actions' git config --global user.email 'github-actions@github.com' - git fetch origin ${{ github.head_ref }} - # Stash any local changes before checkout - git stash -u - git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }} - # Apply the stashed changes if any - git stash pop || true git add src/locales/ git diff --staged --quiet || git commit -m "Update locales [skip ci]" - git push origin HEAD:${{ github.head_ref }} + git push origin HEAD working-directory: ComfyUI_frontend diff --git a/.github/workflows/lint-and-format.yaml b/.github/workflows/lint-and-format.yaml index 6acbb4dfa..5e95ee5bc 100644 --- a/.github/workflows/lint-and-format.yaml +++ b/.github/workflows/lint-and-format.yaml @@ -49,7 +49,7 @@ jobs: if: steps.verify-changed-files.outputs.changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: '[auto-fix] Apply ESLint and Prettier fixe' + commit_message: '[auto-fix] Apply ESLint and Prettier fix' - name: Final validation run: | From fe0054d9dd870c52e457a0f9d4a9d1849d67cb6e Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 13 Aug 2025 23:35:45 +0900 Subject: [PATCH 07/15] [feat] Add Linux core dump to .gitignore (#4960) Co-authored-by: Claude Co-authored-by: github-actions --- .gitignore | 5 ++++- src/locales/ar/commands.json | 3 +++ src/locales/ar/main.json | 1 + src/locales/en/commands.json | 6 +++--- src/locales/en/main.json | 1 + src/locales/es/commands.json | 3 +++ src/locales/es/main.json | 1 + src/locales/fr/commands.json | 3 +++ src/locales/fr/main.json | 1 + src/locales/ja/commands.json | 3 +++ src/locales/ja/main.json | 1 + src/locales/ko/commands.json | 3 +++ src/locales/ko/main.json | 1 + src/locales/ru/commands.json | 3 +++ src/locales/ru/main.json | 1 + src/locales/zh-TW/commands.json | 3 +++ src/locales/zh-TW/main.json | 1 + src/locales/zh/commands.json | 3 +++ src/locales/zh/main.json | 1 + 19 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a5347cd65..bee3e8317 100644 --- a/.gitignore +++ b/.gitignore @@ -61,5 +61,8 @@ dist.zip # Temporary repository directory templates_repo/ -# Vite’s timestamped config modules +# Vite's timestamped config modules vite.config.mts.timestamp-*.mjs + +# Linux core dumps +./core diff --git a/src/locales/ar/commands.json b/src/locales/ar/commands.json index da2a33980..6c323c639 100644 --- a/src/locales/ar/commands.json +++ b/src/locales/ar/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "تجميع العقد المحددة" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "فك التفرع الفرعي المحدد" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "تحويل العقد المحددة إلى عقدة مجموعة" }, diff --git a/src/locales/ar/main.json b/src/locales/ar/main.json index 1d60488a9..5862980c4 100644 --- a/src/locales/ar/main.json +++ b/src/locales/ar/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "تبديل شريط تقدم مدير العقد المخصصة", "Undo": "تراجع", "Ungroup selected group nodes": "فك تجميع عقد المجموعة المحددة", + "Unpack the selected Subgraph": "فك تجميع الرسم البياني الفرعي المحدد", "Workflow": "سير العمل", "Zoom In": "تكبير", "Zoom Out": "تصغير" diff --git a/src/locales/en/commands.json b/src/locales/en/commands.json index 51903a0b6..fdf8c3bd7 100644 --- a/src/locales/en/commands.json +++ b/src/locales/en/commands.json @@ -125,15 +125,15 @@ "Comfy_Graph_ExitSubgraph": { "label": "Exit Subgraph" }, - "Comfy_Graph_UnpackSubgraph": { - "label": "Unpack the selected Subgraph" - }, "Comfy_Graph_FitGroupToContents": { "label": "Fit Group To Contents" }, "Comfy_Graph_GroupSelectedNodes": { "label": "Group Selected Nodes" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "Unpack the selected Subgraph" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "Convert selected nodes to group node" }, diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 1b1f71f10..3c933f773 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -979,6 +979,7 @@ "Exit Subgraph": "Exit Subgraph", "Fit Group To Contents": "Fit Group To Contents", "Group Selected Nodes": "Group Selected Nodes", + "Unpack the selected Subgraph": "Unpack the selected Subgraph", "Convert selected nodes to group node": "Convert selected nodes to group node", "Manage group nodes": "Manage group nodes", "Ungroup selected group nodes": "Ungroup selected group nodes", diff --git a/src/locales/es/commands.json b/src/locales/es/commands.json index 84df6d9b5..11d0d99a0 100644 --- a/src/locales/es/commands.json +++ b/src/locales/es/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "Agrupar nodos seleccionados" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "Desempaquetar el subgrafo seleccionado" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "Convertir nodos seleccionados en nodo de grupo" }, diff --git a/src/locales/es/main.json b/src/locales/es/main.json index f62617ee2..647d3df74 100644 --- a/src/locales/es/main.json +++ b/src/locales/es/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "Alternar la Barra de Progreso del Administrador de Nodos Personalizados", "Undo": "Deshacer", "Ungroup selected group nodes": "Desagrupar nodos de grupo seleccionados", + "Unpack the selected Subgraph": "Desempaquetar el Subgrafo seleccionado", "Workflow": "Flujo de trabajo", "Zoom In": "Acercar", "Zoom Out": "Alejar" diff --git a/src/locales/fr/commands.json b/src/locales/fr/commands.json index 1f8c30012..f40ad108d 100644 --- a/src/locales/fr/commands.json +++ b/src/locales/fr/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "Grouper les nœuds sélectionnés" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "Décompresser le sous-graphe sélectionné" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "Convertir les nœuds sélectionnés en nœud de groupe" }, diff --git a/src/locales/fr/main.json b/src/locales/fr/main.json index dc179d31f..6a2ddcd1c 100644 --- a/src/locales/fr/main.json +++ b/src/locales/fr/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "Basculer la barre de progression du gestionnaire de nœuds personnalisés", "Undo": "Annuler", "Ungroup selected group nodes": "Dégrouper les nœuds de groupe sélectionnés", + "Unpack the selected Subgraph": "Décompresser le Subgraph sélectionné", "Workflow": "Flux de travail", "Zoom In": "Zoom avant", "Zoom Out": "Zoom arrière" diff --git a/src/locales/ja/commands.json b/src/locales/ja/commands.json index 853d8d8dd..fd503b42b 100644 --- a/src/locales/ja/commands.json +++ b/src/locales/ja/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "選択したノードをグループ化" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "選択したサブグラフを展開" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "選択したノードをグループノードに変換" }, diff --git a/src/locales/ja/main.json b/src/locales/ja/main.json index b6f66071d..d934551c9 100644 --- a/src/locales/ja/main.json +++ b/src/locales/ja/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "カスタムノードマネージャーの進行状況バーを切り替え", "Undo": "元に戻す", "Ungroup selected group nodes": "選択したグループノードのグループ解除", + "Unpack the selected Subgraph": "選択したサブグラフを展開", "Workflow": "ワークフロー", "Zoom In": "ズームイン", "Zoom Out": "ズームアウト" diff --git a/src/locales/ko/commands.json b/src/locales/ko/commands.json index 29fcb2968..dff73f051 100644 --- a/src/locales/ko/commands.json +++ b/src/locales/ko/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "선택한 노드 그룹화" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "선택한 서브그래프 풀기" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "선택한 노드를 그룹 노드로 변환" }, diff --git a/src/locales/ko/main.json b/src/locales/ko/main.json index 45b3eec42..4991f338a 100644 --- a/src/locales/ko/main.json +++ b/src/locales/ko/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "커스텀 노드 매니저 진행률 표시줄 전환", "Undo": "실행 취소", "Ungroup selected group nodes": "선택한 그룹 노드 그룹 해제", + "Unpack the selected Subgraph": "선택한 서브그래프 풀기", "Workflow": "워크플로", "Zoom In": "확대", "Zoom Out": "축소" diff --git a/src/locales/ru/commands.json b/src/locales/ru/commands.json index 805e814e8..130121e41 100644 --- a/src/locales/ru/commands.json +++ b/src/locales/ru/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "Группировать выбранные ноды" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "Распаковать выбранный подграф" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "Преобразовать выбранные ноды в групповую ноду" }, diff --git a/src/locales/ru/main.json b/src/locales/ru/main.json index fc04d60a0..290bc5609 100644 --- a/src/locales/ru/main.json +++ b/src/locales/ru/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "Переключить индикатор выполнения менеджера пользовательских узлов", "Undo": "Отменить", "Ungroup selected group nodes": "Разгруппировать выбранные групповые ноды", + "Unpack the selected Subgraph": "Распаковать выбранный подграф", "Workflow": "Рабочий процесс", "Zoom In": "Увеличить", "Zoom Out": "Уменьшить" diff --git a/src/locales/zh-TW/commands.json b/src/locales/zh-TW/commands.json index 0dda2c282..0f76375b4 100644 --- a/src/locales/zh-TW/commands.json +++ b/src/locales/zh-TW/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "群組所選節點" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "解開所選子圖" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "將選取的節點轉換為群組節點" }, diff --git a/src/locales/zh-TW/main.json b/src/locales/zh-TW/main.json index d04470758..331be2a5f 100644 --- a/src/locales/zh-TW/main.json +++ b/src/locales/zh-TW/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "切換自訂節點管理器進度條", "Undo": "復原", "Ungroup selected group nodes": "取消群組選取的群組節點", + "Unpack the selected Subgraph": "解包所選子圖", "Workflow": "工作流程", "Zoom In": "放大", "Zoom Out": "縮小" diff --git a/src/locales/zh/commands.json b/src/locales/zh/commands.json index d974e499c..9fd2e66ff 100644 --- a/src/locales/zh/commands.json +++ b/src/locales/zh/commands.json @@ -131,6 +131,9 @@ "Comfy_Graph_GroupSelectedNodes": { "label": "添加框到选中节点" }, + "Comfy_Graph_UnpackSubgraph": { + "label": "解開所選子圖" + }, "Comfy_GroupNode_ConvertSelectedNodesToGroupNode": { "label": "将选中节点转换为组节点" }, diff --git a/src/locales/zh/main.json b/src/locales/zh/main.json index 1431a0891..8da79e6d1 100644 --- a/src/locales/zh/main.json +++ b/src/locales/zh/main.json @@ -849,6 +849,7 @@ "Toggle the Custom Nodes Manager Progress Bar": "切换自定义节点管理器进度条", "Undo": "撤销", "Ungroup selected group nodes": "解散选中组节点", + "Unpack the selected Subgraph": "解開所選子圖", "Workflow": "工作流", "Zoom In": "放大画面", "Zoom Out": "缩小画面" From c5581c9393307d61850d3d0b0101a30f97df9534 Mon Sep 17 00:00:00 2001 From: snomiao Date: Thu, 14 Aug 2025 01:08:37 +0900 Subject: [PATCH 08/15] [feat] Add alternative package manager lockfiles to .gitignore (#4961) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Add bun.lock, bun.lockb, pnpm-lock.yaml, and yarn.lock to .gitignore - Allows users to use faster package managers (Bun, pnpm) without making git status dirty - Maintains npm as the default while supporting developer choice of package manager ## Test plan - [x] Verify .gitignore changes are correct - [ ] Test that creating these lockfiles doesn't show in git status - [ ] Confirm existing npm functionality remains unaffected 🤖 Generated with [Claude Code](https://claude.ai/code) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-4961-feat-Add-alternative-package-manager-lockfiles-to-gitignore-24e6d73d3650817c8fa4fb8e94df5ac6) by [Unito](https://www.unito.io) Co-authored-by: Claude --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index bee3e8317..c51197db0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,12 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* +# Package manager lockfiles (allow users to use different package managers) +bun.lock +bun.lockb +pnpm-lock.yaml +yarn.lock + # ESLint cache .eslintcache From 3024dcc41b0796af42e9ef6914fee5bcfba417e6 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Wed, 13 Aug 2025 19:46:03 +0100 Subject: [PATCH 09/15] Update side toolbar menu (#4946) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Side toolbar menu UI updates ## Summary - Currently the template modal is very hidden. Many users do not find it - The current icons are quite aleatory ## Changes **What**: - Add templates shortcut button - Add item label in normal size - Use custom icon Critical design decisions or edge cases that need attention: - Sidebar tabs registered using custom icons will have their associated command registed with an undefined icon (currently only string icons are accepted, not components). I couldn't see anywhere directly using this icon, but we should consider autogenerating an icon font so we can use classes for our custom icons (or locating and updating locations to support both icon types) ## Screenshots (if applicable) Normal mode: image Small mode: image ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-4946-Update-side-toolbar-menu-24d6d73d365081c5b2bdc0ee8b61dc50) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions --- src/assets/icons/custom/ai-model.svg | 6 +++ src/assets/icons/custom/node.svg | 3 ++ src/assets/icons/custom/template.svg | 5 ++ src/components/sidebar/SideToolbar.vue | 6 ++- src/components/sidebar/SidebarIcon.vue | 53 +++++++++++++++---- .../sidebar/SidebarTemplatesButton.vue | 35 ++++++++++++ .../sidebarTabs/useModelLibrarySidebarTab.ts | 9 +++- .../sidebarTabs/useNodeLibrarySidebarTab.ts | 9 +++- .../sidebarTabs/useQueueSidebarTab.ts | 1 + .../sidebarTabs/useWorkflowsSidebarTab.ts | 9 +++- src/locales/ar/main.json | 8 +++ src/locales/en/main.json | 8 +++ src/locales/es/main.json | 8 +++ src/locales/fr/main.json | 8 +++ src/locales/ja/main.json | 8 +++ src/locales/ko/main.json | 8 +++ src/locales/ru/main.json | 8 +++ src/locales/zh-TW/main.json | 8 +++ src/locales/zh/main.json | 8 +++ src/stores/workspace/sidebarTabStore.ts | 2 +- src/types/extensionTypes.ts | 3 +- src/vite-env.d.ts | 12 +++++ vitest.config.ts | 12 ++++- 23 files changed, 218 insertions(+), 19 deletions(-) create mode 100644 src/assets/icons/custom/ai-model.svg create mode 100644 src/assets/icons/custom/node.svg create mode 100644 src/assets/icons/custom/template.svg create mode 100644 src/components/sidebar/SidebarTemplatesButton.vue diff --git a/src/assets/icons/custom/ai-model.svg b/src/assets/icons/custom/ai-model.svg new file mode 100644 index 000000000..ede8e5c7e --- /dev/null +++ b/src/assets/icons/custom/ai-model.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/icons/custom/node.svg b/src/assets/icons/custom/node.svg new file mode 100644 index 000000000..3239b59bd --- /dev/null +++ b/src/assets/icons/custom/node.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/assets/icons/custom/template.svg b/src/assets/icons/custom/template.svg new file mode 100644 index 000000000..2a2a75f8d --- /dev/null +++ b/src/assets/icons/custom/template.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/components/sidebar/SideToolbar.vue b/src/components/sidebar/SideToolbar.vue index 0ef8598d1..72a451d81 100644 --- a/src/components/sidebar/SideToolbar.vue +++ b/src/components/sidebar/SideToolbar.vue @@ -8,10 +8,13 @@ :icon-badge="tab.iconBadge" :tooltip="tab.tooltip" :tooltip-suffix="getTabTooltipSuffix(tab)" + :label="tab.label || tab.title" + :is-small="isSmall" :selected="tab.id === selectedTab?.id" :class="tab.id + '-tab-button'" @click="onTabClick(tab)" /> +
@@ -43,6 +46,7 @@ import type { SidebarTabExtension } from '@/types/extensionTypes' import SidebarHelpCenterIcon from './SidebarHelpCenterIcon.vue' import SidebarIcon from './SidebarIcon.vue' import SidebarLogoutIcon from './SidebarLogoutIcon.vue' +import SidebarTemplatesButton from './SidebarTemplatesButton.vue' const workspaceStore = useWorkspaceStore() const settingStore = useSettingStore() @@ -86,7 +90,7 @@ const getTabTooltipSuffix = (tab: SidebarTabExtension) => { box-shadow: var(--bar-shadow); --sidebar-width: 4rem; - --sidebar-icon-size: 1.5rem; + --sidebar-icon-size: 1rem; } .side-tool-bar-container.small-sidebar { diff --git a/src/components/sidebar/SidebarIcon.vue b/src/components/sidebar/SidebarIcon.vue index 5002d7724..f38a0aa0b 100644 --- a/src/components/sidebar/SidebarIcon.vue +++ b/src/components/sidebar/SidebarIcon.vue @@ -19,12 +19,29 @@ @click="emit('click', $event)" > @@ -33,6 +50,7 @@ import Button from 'primevue/button' import OverlayBadge from 'primevue/overlaybadge' import { computed } from 'vue' +import type { Component } from 'vue' import { useI18n } from 'vue-i18n' const { t } = useI18n() @@ -41,13 +59,17 @@ const { selected = false, tooltip = '', tooltipSuffix = '', - iconBadge = '' + iconBadge = '', + label = '', + isSmall = false } = defineProps<{ - icon?: string + icon?: string | Component selected?: boolean tooltip?: string tooltipSuffix?: string iconBadge?: string | (() => string | null) + label?: string + isSmall?: boolean }>() const emit = defineEmits<{ @@ -74,10 +96,23 @@ const computedTooltip = computed(() => t(tooltip) + tooltipSuffix)