From ba3b1bae87f6eef877946de55a829f22cbd17ebd Mon Sep 17 00:00:00 2001 From: Terry Jia Date: Fri, 2 May 2025 17:50:53 -0400 Subject: [PATCH] add List view for workflow tempalte (#3710) Co-authored-by: Chenlei Hu Co-authored-by: github-actions --- .../templates/TemplateWorkflowList.vue | 69 ++++++++++++++++ .../templates/TemplateWorkflowView.vue | 82 +++++++++++++++++++ .../templates/TemplateWorkflowsContent.vue | 38 +++------ src/locales/en/main.json | 3 +- src/locales/es/main.json | 1 + src/locales/fr/main.json | 1 + src/locales/ja/main.json | 1 + src/locales/ko/main.json | 1 + src/locales/ru/main.json | 1 + src/locales/zh/main.json | 1 + vite.config.mts | 4 + 11 files changed, 175 insertions(+), 27 deletions(-) create mode 100644 src/components/templates/TemplateWorkflowList.vue create mode 100644 src/components/templates/TemplateWorkflowView.vue diff --git a/src/components/templates/TemplateWorkflowList.vue b/src/components/templates/TemplateWorkflowList.vue new file mode 100644 index 000000000..9b5dad257 --- /dev/null +++ b/src/components/templates/TemplateWorkflowList.vue @@ -0,0 +1,69 @@ + + + diff --git a/src/components/templates/TemplateWorkflowView.vue b/src/components/templates/TemplateWorkflowView.vue new file mode 100644 index 000000000..d4bbda523 --- /dev/null +++ b/src/components/templates/TemplateWorkflowView.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/components/templates/TemplateWorkflowsContent.vue b/src/components/templates/TemplateWorkflowsContent.vue index 40a256b7b..18d5523ba 100644 --- a/src/components/templates/TemplateWorkflowsContent.vue +++ b/src/components/templates/TemplateWorkflowsContent.vue @@ -30,36 +30,22 @@ />
-
-
-

- {{ selectedTab.title }} -

-
-
-
- -
-
-
+
@@ -73,7 +59,7 @@ import ProgressSpinner from 'primevue/progressspinner' import { computed, ref, watch } from 'vue' import { useI18n } from 'vue-i18n' -import TemplateWorkflowCard from '@/components/templates/TemplateWorkflowCard.vue' +import TemplateWorkflowView from '@/components/templates/TemplateWorkflowView.vue' import TemplateWorkflowsSideNav from '@/components/templates/TemplateWorkflowsSideNav.vue' import { useResponsiveCollapse } from '@/composables/element/useResponsiveCollapse' import { api } from '@/scripts/api' diff --git a/src/locales/en/main.json b/src/locales/en/main.json index f74617009..329a178ce 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -113,7 +113,8 @@ "login": "Login", "learnMore": "Learn more", "amount": "Amount", - "unknownError": "Unknown error" + "unknownError": "Unknown error", + "title": "Title" }, "manager": { "title": "Custom Nodes Manager", diff --git a/src/locales/es/main.json b/src/locales/es/main.json index 8e31759fa..558d7e65a 100644 --- a/src/locales/es/main.json +++ b/src/locales/es/main.json @@ -308,6 +308,7 @@ "success": "Éxito", "systemInfo": "Información del sistema", "terminal": "Terminal", + "title": "Título", "unknownError": "Error desconocido", "update": "Actualizar", "updateAvailable": "Actualización Disponible", diff --git a/src/locales/fr/main.json b/src/locales/fr/main.json index 8aeaf5d82..58b4da66c 100644 --- a/src/locales/fr/main.json +++ b/src/locales/fr/main.json @@ -308,6 +308,7 @@ "success": "Succès", "systemInfo": "Informations système", "terminal": "Terminal", + "title": "Titre", "unknownError": "Erreur inconnue", "update": "Mettre à jour", "updateAvailable": "Mise à jour disponible", diff --git a/src/locales/ja/main.json b/src/locales/ja/main.json index 1399f6f93..7d7e7e64f 100644 --- a/src/locales/ja/main.json +++ b/src/locales/ja/main.json @@ -308,6 +308,7 @@ "success": "成功", "systemInfo": "システム情報", "terminal": "ターミナル", + "title": "タイトル", "unknownError": "不明なエラー", "update": "更新", "updateAvailable": "更新が利用可能", diff --git a/src/locales/ko/main.json b/src/locales/ko/main.json index c23abffb7..28e2ed934 100644 --- a/src/locales/ko/main.json +++ b/src/locales/ko/main.json @@ -308,6 +308,7 @@ "success": "성공", "systemInfo": "시스템 정보", "terminal": "터미널", + "title": "제목", "unknownError": "알 수 없는 오류", "update": "업데이트", "updateAvailable": "업데이트 가능", diff --git a/src/locales/ru/main.json b/src/locales/ru/main.json index 03509f6ec..e566074d9 100644 --- a/src/locales/ru/main.json +++ b/src/locales/ru/main.json @@ -308,6 +308,7 @@ "success": "Успех", "systemInfo": "Информация о системе", "terminal": "Терминал", + "title": "Заголовок", "unknownError": "Неизвестная ошибка", "update": "Обновить", "updateAvailable": "Доступно обновление", diff --git a/src/locales/zh/main.json b/src/locales/zh/main.json index d78ec63c7..48f754b83 100644 --- a/src/locales/zh/main.json +++ b/src/locales/zh/main.json @@ -308,6 +308,7 @@ "success": "成功", "systemInfo": "系统信息", "terminal": "终端", + "title": "标题", "unknownError": "未知错误", "update": "更新", "updateAvailable": "有更新可用", diff --git a/vite.config.mts b/vite.config.mts index 432af6f85..0785fc295 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -52,6 +52,10 @@ export default defineConfig({ target: DEV_SERVER_COMFYUI_URL }, + '/templates': { + target: DEV_SERVER_COMFYUI_URL + }, + '/testsubrouteindex': { target: 'http://localhost:5173', rewrite: (path) => path.substring('/testsubrouteindex'.length)