From e316f0daf5fe01a9e717c4857661cdb4fca73edf Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 11:30:52 +0800
Subject: [PATCH 01/75] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20vue-i18n=20?=
=?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BE=9D=E8=B5=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/package.json | 1 +
ui/yarn.lock | 54 ++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 54 insertions(+), 1 deletion(-)
diff --git a/ui/package.json b/ui/package.json
index 4c0c90c14..a8ce38c11 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -31,6 +31,7 @@
"uuid": "^8.3.2",
"vue": "^3.0.5",
"vue-clipboard3": "^1.0.1",
+ "vue-i18n": "9.0.0",
"vue-router": "^4.0.5",
"vuex": "^4.0.0",
"yaml": "^2.0.0-5"
diff --git a/ui/yarn.lock b/ui/yarn.lock
index 5097e0b44..18a7de430 100644
--- a/ui/yarn.lock
+++ b/ui/yarn.lock
@@ -514,6 +514,44 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"
+"@intlify/core-base@9.0.0":
+ version "9.0.0"
+ resolved "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.0.0.tgz#3de223b8532c535d022e5be58f7d56a26d2fb12f"
+ integrity sha512-dxqakT94EV2bFshG3LENQUPWX9yJFCga1BOwJ6mz7J8LnAYVB9Kxw7NRyE2ybN31USW2IUTQH6WWR1yDbCiefQ==
+ dependencies:
+ "@intlify/message-compiler" "9.0.0"
+ "@intlify/message-resolver" "9.0.0"
+ "@intlify/runtime" "9.0.0"
+ "@intlify/shared" "9.0.0"
+
+"@intlify/message-compiler@9.0.0":
+ version "9.0.0"
+ resolved "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.0.0.tgz#8a1079f8aebcde33057ce769817691ce27ad3e0d"
+ integrity sha512-3oiLj+8z6koRYJwknazjilBsrqnJEAJywr/t39MYVy2yPmwOI1+NDfdDwM9U3ioA2RvsQEUICqW8gmjq1YIElw==
+ dependencies:
+ "@intlify/message-resolver" "9.0.0"
+ "@intlify/shared" "9.0.0"
+ source-map "0.6.1"
+
+"@intlify/message-resolver@9.0.0":
+ version "9.0.0"
+ resolved "https://registry.npmmirror.com/@intlify/message-resolver/-/message-resolver-9.0.0.tgz#0077ec24606b6486d238bdef9044e27729f4782c"
+ integrity sha512-LVK4cwu1l33yvBy0UQkEdXm6pZUcbbiparobruJXz+U8jRTmYHBprN59j59YKXEKcV43cHfzNveaQIm84bgxvQ==
+
+"@intlify/runtime@9.0.0":
+ version "9.0.0"
+ resolved "https://registry.npmmirror.com/@intlify/runtime/-/runtime-9.0.0.tgz#bf9415ff90c746a9be38a5c32f71cbbe9848eee8"
+ integrity sha512-UqCKduZezb5/qA+XPRfHVvXoLmhnQ8iKMyCh0Lg3ZwjW2vOMep/AgZU3T9cgESe67r4buPYHs7nOBSHbTdjNxg==
+ dependencies:
+ "@intlify/message-compiler" "9.0.0"
+ "@intlify/message-resolver" "9.0.0"
+ "@intlify/shared" "9.0.0"
+
+"@intlify/shared@9.0.0":
+ version "9.0.0"
+ resolved "https://registry.npmmirror.com/@intlify/shared/-/shared-9.0.0.tgz#d85b3b5f9033f377c5cf2202cf2459aa49948f36"
+ integrity sha512-0r4v7dnY8g/Jfx2swUWy2GyfH/WvIpWvkU4OIupvxDTWiE8RhcpbOCVvqpVh/xGi0proHQ/r2Dhc0QSItUsfDQ==
+
"@jridgewell/resolve-uri@^3.0.3":
version "3.1.0"
resolved "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
@@ -774,6 +812,11 @@
"@vue/compiler-dom" "3.0.11"
"@vue/shared" "3.0.11"
+"@vue/devtools-api@^6.0.0-beta.5":
+ version "6.6.4"
+ resolved "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.4.tgz#cbe97fe0162b365edc1dba80e173f90492535343"
+ integrity sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==
+
"@vue/eslint-config-prettier@^7.0.0":
version "7.0.0"
resolved "https://registry.npmmirror.com/@vue/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz#44ab55ca22401102b57795c59428e9dade72be34"
@@ -3367,7 +3410,7 @@ smart-tagz@^0.2.0:
dependencies:
vue-feather-icons "^5.1.0"
-source-map@^0.6.1, source-map@~0.6.0:
+source-map@0.6.1, source-map@^0.6.1, source-map@~0.6.0:
version "0.6.1"
resolved "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
@@ -3777,6 +3820,15 @@ vue-feather-icons@^5.1.0:
dependencies:
babel-helper-vue-jsx-merge-props "^2.0.2"
+vue-i18n@9.0.0:
+ version "9.0.0"
+ resolved "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.0.0.tgz#a04c41d5ed3d5a068e923517bfaa0abcbc84e174"
+ integrity sha512-iks0eJDv/4cK/7tl/ooMUroNVVIGOK4kKS1PIHmPQk7QjT/sDfFM84vjPKgpARbw0GjJsOiADL43jufNfs9e9A==
+ dependencies:
+ "@intlify/core-base" "9.0.0"
+ "@intlify/shared" "9.0.0"
+ "@vue/devtools-api" "^6.0.0-beta.5"
+
vue-router@^4.0.5:
version "4.0.6"
resolved "https://registry.npmmirror.com/vue-router/-/vue-router-4.0.6.tgz#91750db507d26642f225b0ec6064568e5fe448d6"
--
Gitee
From 90f9968e4d1aceade02d0a9ef88006b6f57cbcf3 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 11:34:11 +0800
Subject: [PATCH 02/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=9B=BD?=
=?UTF-8?q?=E9=99=85=E5=8C=96=E9=80=BB=E8=BE=91=EF=BC=8C=E9=9B=86=E6=88=90?=
=?UTF-8?q?=20vue-i18n?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 36 ++++++++++++++++++++++++++++++++++++
ui/src/main.ts | 7 +++----
ui/src/utils/i18n.ts | 16 ++++++++++++++++
3 files changed, 55 insertions(+), 4 deletions(-)
create mode 100644 ui/src/locales/index.ts
create mode 100644 ui/src/utils/i18n.ts
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
new file mode 100644
index 000000000..688300b74
--- /dev/null
+++ b/ui/src/locales/index.ts
@@ -0,0 +1,36 @@
+import { createI18n } from 'vue-i18n';
+
+const messages = {
+ zh: {
+ top: {
+ logout: '退出',
+ language: '语言设置',
+ },
+ },
+
+ en: {
+ top: {
+ logout: 'Logout',
+ language: 'Language',
+ },
+ },
+};
+
+const getDefaultLocale = () => {
+ const saved = localStorage.getItem('JianmuLang');
+ if (saved) return saved;
+
+ const browserLang = navigator.language.split('-')[0];
+ const supportedLangs = ['zh', 'en'];
+ const lang = supportedLangs.includes(browserLang) ? browserLang : 'zh';
+ localStorage.setItem('JianmuLang', lang);
+ return lang;
+};
+
+const i18n = createI18n({
+ locale: getDefaultLocale(),
+ fallbackLocale: 'zh',
+ messages,
+});
+
+export default i18n;
diff --git a/ui/src/main.ts b/ui/src/main.ts
index 147442989..2f37b3298 100644
--- a/ui/src/main.ts
+++ b/ui/src/main.ts
@@ -9,7 +9,7 @@ import { globalErrorHandler } from './utils/global-error-handler';
import './utils/operation-btn-position.ts';
// 安装百度统计
import './utils/baidu-tongji.ts';
-
+import i18n from './locales';
// 打印环境变量,用于调试
console.debug(import.meta.env);
const app = createApp(App);
@@ -21,10 +21,9 @@ app.use(components);
app.use(router);
// 安装vuex
app.use(store);
-
+app.use(i18n);
// 注册全局异常处理方法
-app.config.errorHandler = (err, instance, info) =>
- globalErrorHandler(err as Error, instance, info, router, store);
+app.config.errorHandler = (err, instance, info) => globalErrorHandler(err as Error, instance, info, router, store);
app.config.globalProperties.$throw = (err: Error, instance: ComponentPublicInstance | null) =>
globalErrorHandler(err, instance, null, router, store);
diff --git a/ui/src/utils/i18n.ts b/ui/src/utils/i18n.ts
new file mode 100644
index 000000000..515520c7b
--- /dev/null
+++ b/ui/src/utils/i18n.ts
@@ -0,0 +1,16 @@
+import { useI18n } from 'vue-i18n';
+
+export function useLocale() {
+ const { locale, t } = useI18n();
+
+ const handleLocaleChange = (lang: string) => {
+ locale.value = lang;
+ localStorage.setItem('JianmuLang', lang);
+ };
+
+ return {
+ t,
+ locale,
+ handleLocaleChange,
+ };
+}
--
Gitee
From d48e10dbeccdc1d06893b17703fd68a689d10b75 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 11:37:06 +0800
Subject: [PATCH 03/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=9B=BD?=
=?UTF-8?q?=E9=99=85=E5=8C=96=E9=80=BB=E8=BE=91=EF=BC=8C=E9=9B=86=E6=88=90?=
=?UTF-8?q?=20vue-i18n?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--
Gitee
From 4e6492d0fcf08721eefea98774aa00ca1b918ca7 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 11:38:12 +0800
Subject: [PATCH 04/75] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=AF=AD?=
=?UTF-8?q?=E8=A8=80=E5=88=87=E6=8D=A2=E8=8F=9C=E5=8D=95=E5=92=8C=E5=9B=BD?=
=?UTF-8?q?=E9=99=85=E5=8C=96=E6=96=87=E6=9C=AC=E6=B8=B2=E6=9F=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/views/nav/top.vue | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/ui/src/views/nav/top.vue b/ui/src/views/nav/top.vue
index 64a061a00..a481b3888 100644
--- a/ui/src/views/nav/top.vue
+++ b/ui/src/views/nav/top.vue
@@ -47,7 +47,30 @@
- 退出
+
+
+
+ {{ t('top.language') }}
+ {{ locale === 'zh' ? '简体中文' : 'English' }}
+
+
+
+
+
+ 简体中文
+ English
+
+
+
+ {{ t('top.logout') }}
@@ -66,11 +89,12 @@ import { ISessionVo } from '@/api/dto/session';
import { version as v } from '@/../package.json';
import { IRootState } from '@/model';
import { IVersionVo } from '@/api/dto/common';
-
+import { useLocale } from '@/utils/i18n';
const { mapMutations } = createNamespacedHelpers(namespace);
export default defineComponent({
setup() {
+ const { t, locale, handleLocaleChange } = useLocale();
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const store = useStore();
@@ -94,6 +118,9 @@ export default defineComponent({
});
return {
+ t,
+ locale,
+ handleLocaleChange,
authMode,
loaded,
loginType,
--
Gitee
From f59ac3004cafaa20563c51875a500d4705ac9fd4 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 14:14:35 +0800
Subject: [PATCH 05/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=BA=95?=
=?UTF-8?q?=E9=83=A8=E5=AF=BC=E8=88=AA=E6=96=87=E6=9C=AC=E5=9B=BD=E9=99=85?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 12 ++++++++++++
ui/src/views/nav/bottom2.vue | 12 +++++-------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 688300b74..30e759466 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -6,6 +6,12 @@ const messages = {
logout: '退出',
language: '语言设置',
},
+ bottom2: {
+ project: '木兰社区孵化项目',
+ about: '关于建木',
+ manual: '使用手册',
+ contact: '联系我们',
+ },
},
en: {
@@ -13,6 +19,12 @@ const messages = {
logout: 'Logout',
language: 'Language',
},
+ bottom2: {
+ project: 'Mulan Incubator',
+ about: 'About Jianmu',
+ manual: 'Documentation',
+ contact: 'Contact Us',
+ },
},
};
diff --git a/ui/src/views/nav/bottom2.vue b/ui/src/views/nav/bottom2.vue
index 3dfb3053d..8abfdd02a 100644
--- a/ui/src/views/nav/bottom2.vue
+++ b/ui/src/views/nav/bottom2.vue
@@ -1,14 +1,12 @@
@@ -45,7 +43,7 @@ export default defineComponent({
.line {
width: 1px;
height: 14px;
- background: #B9CFE6;
+ background: #b9cfe6;
}
.mulan {
--
Gitee
From b75c195c900f6f6b1fdbbf005e91d09eefbe41db Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 14:23:55 +0800
Subject: [PATCH 06/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0=E5=BA=95?=
=?UTF-8?q?=E9=83=A8=E5=AF=BC=E8=88=AA=E6=96=87=E6=9C=AC=E5=9B=BD=E9=99=85?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 4 ++--
ui/src/views/nav/bottom.vue | 10 ++++------
ui/src/views/nav/bottom2.vue | 8 ++++----
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 30e759466..6d42cce34 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -6,7 +6,7 @@ const messages = {
logout: '退出',
language: '语言设置',
},
- bottom2: {
+ bottom: {
project: '木兰社区孵化项目',
about: '关于建木',
manual: '使用手册',
@@ -19,7 +19,7 @@ const messages = {
logout: 'Logout',
language: 'Language',
},
- bottom2: {
+ bottom: {
project: 'Mulan Incubator',
about: 'About Jianmu',
manual: 'Documentation',
diff --git a/ui/src/views/nav/bottom.vue b/ui/src/views/nav/bottom.vue
index 9e4c67836..37114caa3 100644
--- a/ui/src/views/nav/bottom.vue
+++ b/ui/src/views/nav/bottom.vue
@@ -1,12 +1,10 @@
diff --git a/ui/src/views/nav/bottom2.vue b/ui/src/views/nav/bottom2.vue
index 8abfdd02a..be4c003b0 100644
--- a/ui/src/views/nav/bottom2.vue
+++ b/ui/src/views/nav/bottom2.vue
@@ -1,12 +1,12 @@
--
Gitee
From 033e40363c7bbd6bb5ded0a08e20989f0b7e88a1 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 14:32:07 +0800
Subject: [PATCH 07/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0dialog.vue?=
=?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 6 ++++++
ui/src/views/login/dialog.vue | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 6d42cce34..5232ffa09 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -12,6 +12,9 @@ const messages = {
manual: '使用手册',
contact: '联系我们',
},
+ dialog: {
+ needLoginTip: '未登录状态下,操作内容将会丢失',
+ },
},
en: {
@@ -25,6 +28,9 @@ const messages = {
manual: 'Documentation',
contact: 'Contact Us',
},
+ dialog: {
+ needLoginTip: 'The contents of the operation will be lost if you are not logged in',
+ },
},
};
diff --git a/ui/src/views/login/dialog.vue b/ui/src/views/login/dialog.vue
index faee426f3..b57299459 100644
--- a/ui/src/views/login/dialog.vue
+++ b/ui/src/views/login/dialog.vue
@@ -2,7 +2,7 @@
- 未登录状态下,操作内容将会丢失
+ {{ $t('dialog.needLoginTip') }}
--
Gitee
From e3b3b2e8d1f80f1aca29746b2cb307765a4d14e7 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 16 Apr 2025 16:01:51 +0800
Subject: [PATCH 08/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0all-project.vue?=
=?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 16 ++++++++++++++++
ui/src/views/index/all-project.vue | 24 +++++++++++++++---------
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 5232ffa09..91eb620e6 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -15,6 +15,14 @@ const messages = {
dialog: {
needLoginTip: '未登录状态下,操作内容将会丢失',
},
+ allProject: {
+ projectList: '项目列表',
+ inputPlaceholder: '请输入项目名称',
+ empty: '暂无项目',
+ default: '默认排序',
+ lastExecute: '最近触发',
+ lastModify: '最近修改',
+ },
},
en: {
@@ -31,6 +39,14 @@ const messages = {
dialog: {
needLoginTip: 'The contents of the operation will be lost if you are not logged in',
},
+ allProject: {
+ projectList: 'Project List',
+ inputPlaceholder: 'Please enter project name',
+ empty: 'No Projects',
+ default: 'Default Sort',
+ lastExecute: 'Recently triggered',
+ lastModify: 'Recent changes',
+ },
},
};
diff --git a/ui/src/views/index/all-project.vue b/ui/src/views/index/all-project.vue
index 87af575f4..c5ea54f1c 100644
--- a/ui/src/views/index/all-project.vue
+++ b/ui/src/views/index/all-project.vue
@@ -3,7 +3,7 @@
-
项目列表
+
{{ $t('allProject.projectList') }}
-
+
@@ -31,7 +31,7 @@
/>
-
+
@@ -47,11 +47,12 @@ import { onBeforeRouteLeave, useRouter } from 'vue-router';
import { namespace } from '@/store/modules/project';
import { createNamespacedHelpers, useStore } from 'vuex';
import { SortTypeEnum } from '@/api/dto/enumeration';
-
+import { useI18n } from 'vue-i18n';
const { mapMutations } = createNamespacedHelpers(namespace);
export default defineComponent({
components: { ProjectGroup },
setup() {
+ const { t } = useI18n();
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const store = useStore();
@@ -66,10 +67,10 @@ export default defineComponent({
// 改变项目组排序后强制数据及时刷新
const groupListRefresh = ref
(true);
// 项目组排序类型
- const sortTypeList = ref>([
- { label: '默认排序', value: SortTypeEnum.DEFAULT_SORT },
- { label: '最近触发', value: SortTypeEnum.LAST_EXECUTION_TIME },
- { label: '最近修改', value: SortTypeEnum.LAST_MODIFIED_TIME },
+ const sortTypeList = computed>(() => [
+ { label: t('allProject.default'), value: SortTypeEnum.DEFAULT_SORT },
+ { label: t('allProject.lastExecute'), value: SortTypeEnum.LAST_EXECUTION_TIME },
+ { label: t('allProject.lastModify'), value: SortTypeEnum.LAST_MODIFIED_TIME },
]);
// 所有项目组在vuex中保存的排序类型
const sortType = computed(() => store.state[namespace].sortType);
@@ -115,6 +116,7 @@ export default defineComponent({
});
return {
+ t,
projectGroups,
projectName,
searchProject,
@@ -131,6 +133,10 @@ export default defineComponent({
\ No newline at end of file
+
--
Gitee
From 34cea8d5b91b6ef6a9cbba39e53b6e9fe760501e Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 10:04:02 +0800
Subject: [PATCH 39/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0login.vue?=
=?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 30 ++++++++++++++++++++++++++++++
ui/src/views/common/login.vue | 29 +++++++++++++++++------------
2 files changed, 47 insertions(+), 12 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index d14a2dd9a..701ab5020 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -357,6 +357,21 @@ const messages = {
browserVersion: '浏览器版本',
network: '网络',
},
+ login: {
+ welcome: '欢迎登录',
+ usernamePlaceholder: '请输入用户名',
+ passwordPlaceholder: '请输入密码',
+ remember: '记住用户名',
+ login: '登录',
+ loginProblem: '登录遇到问题,请尝试重新登录',
+ cancel: '取消',
+ reLogin: '重新登录',
+ loggingInWith: '{type} 账号登录中…',
+ loginWith: '使用 {type} 账号登录',
+ usernameEmpty: '用户名不能为空',
+ passwordEmpty: '密码不能为空',
+ success: '登录成功',
+ },
},
en: {
@@ -712,6 +727,21 @@ const messages = {
browserVersion: 'Browser Version',
network: 'Web',
},
+ login: {
+ welcome: 'Welcome to login',
+ usernamePlaceholder: 'Please enter your username',
+ passwordPlaceholder: 'Please enter your password',
+ remember: 'Remember username',
+ login: 'Login',
+ loginProblem: 'Problems logging in, please try to log in again',
+ cancel: 'Cancel',
+ reLogin: 'Re-login',
+ loggingInWith: 'Account login in progress with {type}…',
+ loginWith: 'Use {type} account to login',
+ usernameEmpty: 'Username can\'t be empty',
+ passwordEmpty: 'Password can\'t be empty',
+ success: 'Login successful',
+ },
},
};
diff --git a/ui/src/views/common/login.vue b/ui/src/views/common/login.vue
index ec59ef05a..d838f3112 100644
--- a/ui/src/views/common/login.vue
+++ b/ui/src/views/common/login.vue
@@ -2,7 +2,7 @@
-
欢迎登录
+
{{ t('login.welcome') }}
@@ -14,7 +14,7 @@
v-model="loginForm.username"
prefix-icon="jm-icon-input-user"
clearable
- placeholder="请输入用户名"
+ :placeholder="t('login.usernamePlaceholder')"
@keyup.enter="login"
/>
@@ -27,18 +27,18 @@
type="password"
clearable
show-password
- placeholder="请输入密码"
+ :placeholder="t('login.passwordPlaceholder')"
@keyup.enter="login"
/>
- 记住用户名
+ {{ t('login.remember') }}
- 登录
+ {{ t('login.login') }}
@@ -46,10 +46,10 @@
-
登录遇到问题,请尝试重新登录
+
{{ t('login.loginProblem') }}
- 取消
- 重新登录
+ {{ t('login.cancel') }}
+ {{ t('login.reLogin') }}
- {{ loading ? `${Type} 账号登录中…` : `使用 ${Type} 账号登录` }}
+ {{
+ loading ? t('login.loggingInWith', { type: Type }) : t('login.loginWith', { type: Type })
+ }}
@@ -71,6 +73,7 @@ import { useRoute, useRouter } from 'vue-router';
import { AUTHORIZE_INDEX, PLATFORM_INDEX } from '@/router/path-def';
import { fetchAuthUrl } from '@/api/session';
import { getRedirectUri } from '@/utils/redirect-uri';
+import { useLocale } from '@/utils/i18n';
const { mapActions: mapSessionActions, mapMutations } = createNamespacedHelpers(namespace);
@@ -87,6 +90,7 @@ export default defineComponent({
},
},
setup(props: any, { emit }) {
+ const { t } = useLocale();
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
@@ -149,7 +153,7 @@ export default defineComponent({
// 登录成功
loading.value = false;
authError.value = false;
- proxy.$success('登录成功');
+ proxy.$success(t('login.success'));
setTimeout(() => {
emit('logined');
}, 500);
@@ -210,6 +214,7 @@ export default defineComponent({
window.onstorage = null;
});
return {
+ t,
authError,
loginType,
Type,
@@ -218,8 +223,8 @@ export default defineComponent({
loginFormRef,
loginForm,
loginRule: ref>({
- username: [{ required: true, message: '用户名不能为空', trigger: 'blur' }],
- password: [{ required: true, message: '密码不能为空', trigger: 'blur' }],
+ username: [{ required: true, message: t('login.usernameEmpty'), trigger: 'blur' }],
+ password: [{ required: true, message: t('login.passwordEmpty'), trigger: 'blur' }],
}),
login: () => {
// 开启loading
--
Gitee
From a52eb00d7408b6335de7cd64bde2b43d4640fea0 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 10:33:58 +0800
Subject: [PATCH 40/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0project-group.v?=
=?UTF-8?q?ue=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 12 ++++++++++++
ui/src/views/common/project-group.vue | 14 ++++++++++----
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 701ab5020..fd69d1226 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -372,6 +372,12 @@ const messages = {
passwordEmpty: '密码不能为空',
success: '登录成功',
},
+ projectGroup: {
+ viewMore: '查看更多',
+ noProjects: '没有项目',
+ noResult: '没有找到相关结果',
+ totalProjects: '共有 { count } 个项目',
+ },
},
en: {
@@ -742,6 +748,12 @@ const messages = {
passwordEmpty: 'Password can\'t be empty',
success: 'Login successful',
},
+ projectGroup: {
+ viewMore: 'View More',
+ noProjects: 'No Projects',
+ noResult: 'No related results were found',
+ totalProjects: '(Total { count } projects)',
+ },
},
};
diff --git a/ui/src/views/common/project-group.vue b/ui/src/views/common/project-group.vue
index 2245fbb6d..fa0d3d0de 100644
--- a/ui/src/views/common/project-group.vue
+++ b/ui/src/views/common/project-group.vue
@@ -16,11 +16,13 @@
{{ projectGroup?.name }}
- (共有 {{ projectPage.total >= 0 ? projectPage.total : 0 }} 个项目)
+ {{
+ $t('projectGroup.totalProjects', { count: projectPage.total >= 0 ? projectPage.total : 0 })
+ }}
- 查看更多
+ {{ $t('projectGroup.viewMore') }}
@@ -29,10 +31,14 @@
-
+
--
Gitee
From 9638b6d650b956600b0cce98eb98c7321d0cef2c Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 10:53:54 +0800
Subject: [PATCH 41/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0cache-drawer-it?=
=?UTF-8?q?em.vue=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 26 +++++++++++++++++
ui/src/views/common/cache-drawer-item.vue | 35 ++++++++++++++++-------
2 files changed, 50 insertions(+), 11 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index fd69d1226..2b132a575 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -378,6 +378,19 @@ const messages = {
noResult: '没有找到相关结果',
totalProjects: '共有 { count } 个项目',
},
+ cacheDrawerItem: {
+ unavailable: '不可用',
+ clear: '清理',
+ viewMount: '查看挂载点',
+ noMount: '未设置挂载点',
+ node: '节点',
+ mountDir: '挂载目录',
+ confirmClearTitle: '确定清理当前缓存?',
+ confirmClearTip: '旧的缓存数据将被清空',
+ cancel: '取消',
+ confirm: '确定',
+ clearSuccess: '清理成功',
+ },
},
en: {
@@ -754,6 +767,19 @@ const messages = {
noResult: 'No related results were found',
totalProjects: '(Total { count } projects)',
},
+ cacheDrawerItem: {
+ unavailable: 'Unavailable',
+ clear: 'Clear',
+ viewMount: 'View mount point',
+ noMount: 'Mount point not set',
+ node: 'Node',
+ mountDir: 'Mount directory',
+ confirmClearTitle: 'Make sure to clear the current cache?',
+ confirmClearTip: 'Old cached data will be cleared',
+ cancel: 'Cancel',
+ confirm: 'Confirm',
+ clearSuccess: 'Clear Successful',
+ },
},
};
diff --git a/ui/src/views/common/cache-drawer-item.vue b/ui/src/views/common/cache-drawer-item.vue
index 863b8d4f5..7a1678c1a 100644
--- a/ui/src/views/common/cache-drawer-item.vue
+++ b/ui/src/views/common/cache-drawer-item.vue
@@ -3,12 +3,14 @@
- 不可用
+ {{ t('cacheDrawerItem.unavailable') }}
-
清理
+
+ {{ t('cacheDrawerItem.clear') }}
+
{{ originData.workerId }}
@@ -16,16 +18,16 @@
- 查看挂载点
+ {{ t('cacheDrawerItem.viewMount') }}
- 未设置挂载点
+ {{ t('cacheDrawerItem.noMount') }}
-
- 旧的缓存数据将被清空
+
+ {{ t('cacheDrawerItem.confirmClearTip') }}
- 取消
- 确定
+ {{ t('cacheDrawerItem.cancel') }}
+ {{
+ t('cacheDrawerItem.confirm')
+ }}
@@ -61,6 +71,7 @@ import yaml from 'yaml';
import { clearCache } from '@/api/cache';
import defaultIcon from '@/components/workflow/workflow-editor/svgs/shape/async-task.svg';
import shellIcon from '@/components/workflow/workflow-editor/svgs/shape/shell.svg';
+import { useLocale } from '@/utils/i18n';
export default defineComponent({
props: {
@@ -70,6 +81,7 @@ export default defineComponent({
},
},
setup(props) {
+ const { t } = useLocale();
const { proxy } = getCurrentInstance() as any;
const toggle = ref(false);
const dialogVisible = ref(false);
@@ -94,7 +106,7 @@ export default defineComponent({
try {
loading.value = true;
await clearCache(originData.value.id);
- proxy.$success('清理成功');
+ proxy.$success(t('cacheDrawerItem.clearSuccess'));
dialogVisible.value = false;
} catch (err) {
proxy.$throw(err, proxy);
@@ -103,6 +115,7 @@ export default defineComponent({
}
};
return {
+ t,
loading,
toggle,
dialogVisible,
--
Gitee
From fae39a637b5188cbcaa3a0f8afeb9b79d2b9a00a Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 10:56:56 +0800
Subject: [PATCH 42/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0cache-drawer.vu?=
=?UTF-8?q?e=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 6 ++++++
ui/src/views/common/cache-drawer.vue | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 2b132a575..b7b6ab9c2 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -391,6 +391,9 @@ const messages = {
confirm: '确定',
clearSuccess: '清理成功',
},
+ cacheDrawer: {
+ viewCache: '查看缓存',
+ },
},
en: {
@@ -780,6 +783,9 @@ const messages = {
confirm: 'Confirm',
clearSuccess: 'Clear Successful',
},
+ cacheDrawer: {
+ viewCache: 'View Cache',
+ },
},
};
diff --git a/ui/src/views/common/cache-drawer.vue b/ui/src/views/common/cache-drawer.vue
index f39a191d2..03b16eaa7 100644
--- a/ui/src/views/common/cache-drawer.vue
+++ b/ui/src/views/common/cache-drawer.vue
@@ -11,7 +11,7 @@
- 查看缓存
+ {{ $t('cacheDrawer.viewCache') }}
--
Gitee
From a128569ea598a13c8008d41cc95f3e563203c0cc Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 14:39:09 +0800
Subject: [PATCH 43/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0project-item.vu?=
=?UTF-8?q?e=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 107 +++++++++++++++
ui/src/views/common/project-item.vue | 198 +++++++++++++++++----------
2 files changed, 233 insertions(+), 72 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index b7b6ab9c2..45028d5a7 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -394,6 +394,59 @@ const messages = {
cacheDrawer: {
viewCache: '查看缓存',
},
+ projectItem: {
+ concurrent: '可并发',
+ tipInit:
+ '前序流程正在执行或已挂起,待执行完毕或手动终止后,本次流程将开始执行。 或开启并发执行,开启后,多次可同时执行。',
+ tipSuspended: '当前流程中某个节点执行失败,流程处于暂停状态,需要手动 重试/忽略 挂起节点。',
+ terminate: '终止',
+ nextTime: '距离下次执行还有',
+ suspended: '挂起',
+ running: '执行',
+ duration: '时长',
+ disabled: '已禁用,不可',
+ trigger: '触发',
+ edit: '编辑',
+ sync: '同步DSL',
+ openGit: '打开git仓库',
+ previewWorkflow: '预览流程',
+ previewPipeline: '预览管道',
+ disable: '禁用',
+ enable: '启用',
+ delete: '删除',
+ cache: '缓存',
+
+ project: '项目',
+ failed: '失败',
+ Running: '执行中',
+ succeeded: '成功',
+ notStarted: '未启动',
+ pending: '待启动',
+ nextTimeTip: '定时项目:下次执行时间',
+ confirmTerminate: '确定要终止吗?',
+ terminateTitle: '终止项目执行',
+ confirm: '确定',
+ cancel: '取消',
+ terminateSuccess: '终止成功',
+ operationSuccess: '操作成功',
+ confirmTrigger: '确定要触发吗?',
+ triggerTitle: '触发项目执行',
+ confirmGeneric: '确定要',
+ enabled: '已启用',
+ Disabled: '已禁用',
+ notModifiable: '不可修改',
+ dslUpdateTip: '若要修改,请通过DSL更新',
+ close: '关闭',
+ disableProject: '禁用项目',
+ enableProject: '启用项目',
+ confirmSync: '确定要同步吗?',
+ syncTitle: '同步DSL',
+ syncSuccess: '同步成功',
+ confirmDelete: '确定要删除项目吗?',
+ deleteTitle: '删除项目',
+ name: '名称:',
+ deleteSuccess: '删除成功',
+ },
},
en: {
@@ -786,6 +839,60 @@ const messages = {
cacheDrawer: {
viewCache: 'View Cache',
},
+ projectItem: {
+ concurrent: 'Can be concurrent',
+ tipInit:
+ 'The prequel process is executing or has hung, and the current process will start executing when it finishes or is manually terminated. Or enable concurrent execution, when enabled, multiple times can be executed at the same time.',
+ tipSuspended:
+ 'If a node in the current process fails to execute, the process is suspended and you need to manually retry/ignore the pending node.',
+ terminate: 'Terminate',
+ nextTime: 'Until next execution',
+ suspended: 'Suspend',
+ running: 'Execution',
+ duration: 'Duration',
+ disabled: 'Disabled, not available',
+ trigger: 'Trigger',
+ edit: 'Edit',
+ sync: 'Sync DSL',
+ openGit: 'Open git repository',
+ previewWorkflow: 'Preview process',
+ previewPipeline: 'Preview pipeline',
+ disable: 'Disable',
+ enable: 'Enable',
+ delete: 'Delete',
+ cache: 'Cache',
+
+ project: 'project',
+ failed: 'Failed',
+ Running: 'Executing',
+ succeeded: 'Successful',
+ notStarted: 'Not started',
+ pending: 'Pending start',
+ nextTimeTip: 'Timed item: next execution time',
+ confirmTerminate: 'Sure to terminate?',
+ terminateTitle: 'Terminate project execution',
+ confirm: 'OK',
+ cancel: 'Cancel',
+ terminateSuccess: 'Terminate Successful',
+ operationSuccess: 'Operation Successful',
+ confirmTrigger: 'Are you sure you want to trigger?',
+ triggerTitle: 'Trigger item execution',
+ confirmGeneric: 'Are you sure you want to?',
+ enabled: 'Enabled',
+ Disabled: 'Disabled',
+ notModifiable: 'Not modifiable',
+ dslUpdateTip: 'To modify, update via DSL',
+ close: 'Close',
+ disableProject: 'Disable project',
+ enableProject: 'Enable project',
+ confirmSync: 'Sure to synchronise?',
+ syncTitle: 'Synchronise DSL',
+ syncSuccess: 'Synchronise Successful',
+ confirmDelete: 'Are you sure you want to delete the project?',
+ deleteTitle: 'Delete project',
+ name: 'Name:',
+ deleteSuccess: 'Delete Successful',
+ },
},
};
diff --git a/ui/src/views/common/project-item.vue b/ui/src/views/common/project-item.vue
index 54f569caa..266daafe7 100644
--- a/ui/src/views/common/project-item.vue
+++ b/ui/src/views/common/project-item.vue
@@ -8,7 +8,7 @@
>
- 可并发
+ {{ t('projectItem.concurrent') }}
#{{ executeCount }}
-
终止
+
{{
+ t('projectItem.terminate')
+ }}
- 距离下次执行还有
+ {{ t('projectItem.nextTime') }}
@@ -63,7 +63,13 @@
- {{ project.status === ProjectStatusEnum.SUSPENDED ? '挂起' : '执行' }}时长
+ {{
+ project.status === ProjectStatusEnum.SUSPENDED
+ ? t('projectItem.suspended')
+ : t('projectItem.running')
+ }}{{ t('projectItem.duration') }}
-
+
-
+
-
+
-
+
-
+
-
+
@@ -135,12 +156,15 @@
href="javascript: void(0)"
:class="enabled ? 'jm-icon-button-disable' : 'jm-icon-button-off'"
style="width: 90px; display: inline-block"
- >{{ enabled ? '禁用' : '启用' }}{{ enabled ? t('projectItem.disable') : t('projectItem.enable') }}
- 删除{{ t('projectItem.delete') }}
@@ -167,7 +191,7 @@
>
- 可并发
+ {{ t('projectItem.concurrent') }}
#{{ executeCount }}
-
终止
+
{{
+ t('projectItem.terminate')
+ }}
- 距离下次执行还有
+ {{ t('projectItem.nextTime') }}
@@ -222,7 +246,13 @@
- {{ project.status === ProjectStatusEnum.SUSPENDED ? '挂起' : '执行' }}时长
+ {{
+ project.status === ProjectStatusEnum.SUSPENDED
+ ? t('projectItem.suspended')
+ : t('projectItem.running')
+ }}{{ t('projectItem.duration') }}
-
+
-
+
-
+
-
+
-
+
-
+
@@ -294,7 +339,7 @@
href="javascript: void(0)"
class="jm-icon-workflow-cache"
style="width: 90px; display: inline-block"
- >缓存{{ t('projectItem.cache') }}
@@ -302,12 +347,15 @@
href="javascript: void(0)"
:class="enabled ? 'jm-icon-button-disable' : 'jm-icon-button-off'"
style="width: 90px; display: inline-block"
- >{{ enabled ? '禁用' : '启用' }}{{ enabled ? t('projectItem.disable') : t('projectItem.enable') }}
- 删除{{ t('projectItem.delete') }}
@@ -352,6 +400,7 @@ import { useRouter } from 'vue-router';
import { terminate } from '@/api/workflow-execution-record';
import dayjs from 'dayjs';
import WebhookSettingDialog from '@/views/common/webhook-setting-dialog.vue';
+import { useLocale } from '@/utils/i18n';
export default defineComponent({
components: { WebhookSettingDialog, ProjectPreviewDialog, WebhookDrawer, CacheDrawer },
@@ -378,6 +427,7 @@ export default defineComponent({
},
emits: ['triggered', 'synchronized', 'deleted', 'terminated'],
setup(props: any, { emit }: SetupContext) {
+ const { t } = useLocale();
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const isMove = computed(() => props.move);
@@ -408,20 +458,20 @@ export default defineComponent({
const statusDesc = computed(() => {
switch (props.project.status) {
case ProjectStatusEnum.SUSPENDED:
- return '挂起';
+ return t('projectItem.suspended');
case ProjectStatusEnum.FAILED:
- return '失败';
+ return t('projectItem.failed');
case ProjectStatusEnum.RUNNING:
- return '执行中';
+ return t('projectItem.Running');
case ProjectStatusEnum.SUCCEEDED:
- return '成功';
+ return t('projectItem.succeeded');
default:
- return props.project.serialNo === 0 ? '未启动' : '待启动';
+ return props.project.serialNo === 0 ? t('projectItem.notStarted') : t('projectItem.pending');
}
});
// alarm 提示
const alarmTip = computed(
- () => `定时项目:下次执行时间 ${dayjs(props.project.nextTime).format('MM-DD HH:mm')}`,
+ () => `${t('projectItem.nextTimeTip')} ${dayjs(props.project.nextTime).format('MM-DD HH:mm')}`,
);
// 控制是否显示下一次执行时间
const isShowNextTime = computed(() => {
@@ -435,15 +485,15 @@ export default defineComponent({
});
const stopProcess = (id: string) => {
proxy
- .$confirm('确定要终止吗?', '终止项目执行', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ .$confirm(t('projectItem.confirmTerminate'), t('projectItem.terminateTitle'), {
+ confirmButtonText: t('projectItem.confirm'),
+ cancelButtonText: t('projectItem.cancel'),
type: 'info',
})
.then(() => {
terminate(id)
.then(() => {
- proxy.$success('终止成功');
+ proxy.$success(t('projectItem.terminateSuccess'));
// 终止项目
emit('terminated', id);
})
@@ -459,7 +509,7 @@ export default defineComponent({
try {
executing.value = true;
await executeImmediately(props.project.id, payload);
- proxy.$success('操作成功');
+ proxy.$success(t('projectItem.operationSuccess'));
visible.value = false;
emit('triggered', props.project.id);
} catch (err) {
@@ -469,6 +519,7 @@ export default defineComponent({
}
};
return {
+ t,
visible,
webhookDefinition,
executeCount,
@@ -503,16 +554,16 @@ export default defineComponent({
const { triggerType } = props.project;
const isWarning = triggerType === TriggerTypeEnum.WEBHOOK;
- const msg = '确定要触发吗?
';
+ const msg = `${t('projectItem.confirmTrigger')}
`;
if (isWarning) {
// 获取webhook触发器定义
webhookDefinition.value = await fetchWebhookDefinition(id);
// 如果没有webhook触发器参数定义则可直接触发
if (!webhookDefinition.value.params) {
proxy
- .$confirm(msg, '触发项目执行', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ .$confirm(msg, t('projectItem.triggerTitle'), {
+ confirmButtonText: t('projectItem.confirm'),
+ cancelButtonText: t('projectItem.cancel'),
type: 'info',
dangerouslyUseHTMLString: true,
})
@@ -521,7 +572,7 @@ export default defineComponent({
executeImmediately(id)
.then(() => {
- proxy.$success('操作成功');
+ proxy.$success(t('projectItem.operationSuccess'));
executing.value = false;
emit('triggered', id);
})
@@ -536,9 +587,9 @@ export default defineComponent({
}
} else {
proxy
- .$confirm(msg, '触发项目执行', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ .$confirm(msg, t('projectItem.triggerTitle'), {
+ confirmButtonText: t('projectItem.confirm'),
+ cancelButtonText: t('projectItem.cancel'),
type: isWarning ? 'warning' : 'info',
dangerouslyUseHTMLString: true,
})
@@ -547,7 +598,7 @@ export default defineComponent({
executeImmediately(id)
.then(() => {
- proxy.$success('操作成功');
+ proxy.$success(t('projectItem.operationSuccess'));
executing.value = false;
emit('triggered', id);
})
@@ -563,27 +614,31 @@ export default defineComponent({
return;
}
- const str = enabled.value ? '禁用' : '启用';
+ const str = enabled.value ? t('projectItem.disable') : t('projectItem.enable');
const msg = props.project.mutable
? `
-
确定要${str}吗?
+
${t('projectItem.confirm')}${str}?
`
: `
-
${enabled.value ? '已启用' : '已禁用'},不可修改
+
${enabled.value ? t('projectItem.enabled') : t('projectItem.Disabled')},${t(
+ 'projectItem.notModifiable',
+)}
- 若要修改,请通过DSL更新
+ ${t(
+ 'projectItem.dslUpdateTip',
+ )}
`;
proxy
- .$confirm(msg, `${str}项目`, {
+ .$confirm(msg, `${str}${t('projectItem.project')}`, {
showConfirmButton: props.project.mutable,
- confirmButtonText: '确定',
- cancelButtonText: props.project.mutable ? '取消' : '关闭',
+ confirmButtonText: t('projectItem.confirm'),
+ cancelButtonText: props.project.mutable ? t('projectItem.cancel') : t('projectItem.close'),
type: 'info',
dangerouslyUseHTMLString: true,
})
@@ -593,7 +648,7 @@ export default defineComponent({
await active(id, !enabled.value);
enabled.value = !enabled.value;
- proxy.$success(enabled.value ? '已启用' : '已禁用');
+ proxy.$success(enabled.value ? t('projectItem.enabled') : t('projectItem.Disabled'));
} catch (err) {
proxy.$throw(err, proxy);
} finally {
@@ -610,9 +665,9 @@ export default defineComponent({
}
proxy
- .$confirm('确定要同步吗?', '同步DSL', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ .$confirm(t('projectItem.confirmSync'), t('projectItem.syncTitle'), {
+ confirmButtonText: t('projectItem.confirm'),
+ cancelButtonText: t('projectItem.cancel'),
type: 'info',
})
.then(() => {
@@ -620,7 +675,7 @@ export default defineComponent({
synchronize(id)
.then(() => {
- proxy.$success('同步成功');
+ proxy.$success(t('projectItem.syncSuccess'));
synchronizing.value = false;
emit('synchronized', id);
@@ -638,13 +693,12 @@ export default defineComponent({
const { name } = props.project;
- let msg = '确定要删除项目吗?
';
- msg += `名称:${name}
`;
-
+ let msg = `${t('projectItem.confirmDelete')}
`;
+ msg += `${t('projectItem.name')}${name}
`;
proxy
- .$confirm(msg, '删除项目', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ .$confirm(msg, t('projectItem.deleteTitle'), {
+ confirmButtonText: t('projectItem.confirm'),
+ cancelButtonText: t('projectItem.cancel'),
type: 'warning',
dangerouslyUseHTMLString: true,
})
@@ -653,7 +707,7 @@ export default defineComponent({
del(id)
.then(() => {
- proxy.$success('删除成功');
+ proxy.$success(t('projectItem.deleteSuccess'));
deleting.value = false;
emit('deleted', id);
--
Gitee
From 7eb2107d3eb9719aeab56162a5004470e2f11811 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 15:06:27 +0800
Subject: [PATCH 44/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0webhook-drawer.?=
=?UTF-8?q?vue=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 64 ++++++++++++++++++++++
ui/src/views/common/webhook-drawer.vue | 74 ++++++++++++++------------
2 files changed, 105 insertions(+), 33 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 45028d5a7..d61dd1f42 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -447,6 +447,38 @@ const messages = {
name: '名称:',
deleteSuccess: '删除成功',
},
+ webhookDrawer: {
+ triggerTip: '可以通过调用以下Webhook地址来触发流程执行',
+ copyLink: '复制链接',
+ requestList: '请求列表',
+ noRecordLine1: '若无对应的触发记录,可到上游webhook管理中,',
+ noRecordLine2: '查看请求是否发送成功',
+ refresh: '刷新',
+ source: '来源',
+ requestTime: '请求时间',
+ status: '状态',
+ success: '成功',
+ failure: '失败',
+ errorMessage: '错误信息',
+ action: '操作',
+ retry: '重试',
+ details: '详情',
+ viewDetails: '查看详情',
+ trigger: '触发器',
+ paramList: '参数列表',
+ paramName: '参数唯一标识',
+ paramType: '参数类型',
+ paramValue: '参数值',
+ authRule: '认证规则',
+ noData: '暂无数据',
+ jsonPath: 'Json路径:',
+ copySuccess: '复制成功',
+ copyFailed: '复制失败,请手动复制',
+ retrySuccess: '重试成功',
+ confirmRetry: '确定要重试吗?',
+ confirm: '确认',
+ cancel: '取消',
+ },
},
en: {
@@ -893,6 +925,38 @@ const messages = {
name: 'Name:',
deleteSuccess: 'Delete Successful',
},
+ webhookDrawer: {
+ triggerTip: 'You can trigger the process execution by calling the following webhook address',
+ copyLink: 'Copy Link',
+ requestList: 'Request List',
+ noRecordLine1: 'If there is no corresponding trigger record, you can go to the upstream webhook management,',
+ noRecordLine2: 'to see if the request was sent successfully',
+ refresh: 'Refresh',
+ source: 'Source',
+ requestTime: 'Request Time',
+ status: 'Status',
+ success: 'Success',
+ failure: 'Failure',
+ errorMessage: 'Error Message',
+ action: 'Action',
+ retry: 'Retry',
+ details: 'Details',
+ viewDetails: 'View Details',
+ trigger: 'Trigger',
+ paramList: 'Parameter List',
+ paramName: 'Parameter Unique Identifier',
+ paramType: 'Parameter Type',
+ paramValue: 'Parameter Value',
+ authRule: 'Authentication Rule',
+ noData: 'No data available at this time',
+ jsonPath: 'Json Path:',
+ copySuccess: 'Copy Successful',
+ copyFailed: 'Copy Failed, please copy manually',
+ retrySuccess: 'Retry Successful',
+ confirmRetry: 'Are you sure you want to retry?',
+ confirm: 'Confirm',
+ cancel: 'Cancel',
+ },
},
};
diff --git a/ui/src/views/common/webhook-drawer.vue b/ui/src/views/common/webhook-drawer.vue
index f88a5b630..9f5d70b0a 100644
--- a/ui/src/views/common/webhook-drawer.vue
+++ b/ui/src/views/common/webhook-drawer.vue
@@ -12,7 +12,7 @@
{{ currentProject }}
-
可以通过调用以下Webhook地址来触发流程执行
+
{{ t('webhookDrawer.triggerTip') }}
@@ -21,22 +21,22 @@
- 复制链接
+ {{ t('webhookDrawer.copyLink') }}
-
请求列表
+
{{ t('webhookDrawer.requestList') }}
- 若无对应的触发记录,可到上游webhook管理中,
- 查看请求是否发送成功
+ {{ t('webhookDrawer.noRecordLine1') }}
+ {{ t('webhookDrawer.noRecordLine2') }}
-
+
-
-
+
+
{{ datetimeFormatter(scope.row.requestTime) }}
-
+
- 成功
- 失败
+
+ {{ t('webhookDrawer.success') }}
+
+ {{ t('webhookDrawer.failure') }}
-
+
-
+
@@ -94,14 +96,16 @@
-
触发器
+
+ {{ t('webhookDrawer.trigger') }}
+
Payload
JsonView
@@ -111,7 +115,7 @@
-
Json路径:
+
{{ t('webhookDrawer.jsonPath') }}
@@ -123,15 +127,15 @@
-
参数列表
+
{{ t('webhookDrawer.paramList') }}
-
+
-
-
+
+
@@ -171,7 +175,7 @@
-
认证规则
+
{{ t('webhookDrawer.authRule') }}
@@ -181,7 +185,7 @@
{{ webhookParamsDetail?.only }}
- 暂无数据
+ {{ t('webhookDrawer.noData') }}
@@ -204,6 +208,7 @@ import { StateEnum } from '@/components/load-more/enumeration';
import { ParamTypeEnum } from '@/api/dto/enumeration';
import JmTextViewer from '@/components/text-viewer/index.vue';
import ParamValue from '@/views/common/param-value.vue';
+import { useLocale } from '@/utils/i18n';
enum TabState {
TRIGGER = 'TRIGGER',
@@ -226,6 +231,7 @@ export default defineComponent({
},
emits: ['update:webhookVisible'],
setup(props, { emit }) {
+ const { t } = useLocale();
const { proxy } = getCurrentInstance() as any;
const { toClipboard } = useClipboard();
@@ -378,9 +384,9 @@ export default defineComponent({
}
try {
await toClipboard(link.value);
- proxy.$success('复制成功');
+ proxy.$success(t('webhookDrawer.copySuccess'));
} catch (err) {
- proxy.$error('复制失败,请手动复制');
+ proxy.$error(t('webhookDrawer.copyFailed'));
console.error(err);
}
};
@@ -397,7 +403,7 @@ export default defineComponent({
try {
webhookRequestParams.value.pageNum = START_PAGE_NUM;
await retryWebRequest(id);
- proxy.$success('重试成功');
+ proxy.$success(t('webhookDrawer.retrySuccess'));
// 旧数据覆盖新数据
await getWebhookRequestList('cover');
} catch (err) {
@@ -405,12 +411,13 @@ export default defineComponent({
}
};
// 重试
- let msg = '确定要重试吗?
';
+ let msg = `${t('webhookDrawer.confirmRetry')}
`;
const retry = (id: string) => {
+ proxy;
proxy
- .$confirm(msg, '重试', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
+ .$confirm(msg, t('webhookDrawer.retry'), {
+ confirmButtonText: t('webhookDrawer.confirm'),
+ cancelButtonText: t('webhookDrawer.cancel'),
type: 'info',
dangerouslyUseHTMLString: true,
})
@@ -498,9 +505,9 @@ export default defineComponent({
}
try {
await toClipboard(value);
- proxy.$success('复制成功');
+ proxy.$success(t('webhookDrawer.copySuccess'));
} catch (err) {
- proxy.$error('复制失败,请手动复制');
+ proxy.$error(t('webhookDrawer.copyFailed'));
console.error(err);
}
};
@@ -516,6 +523,7 @@ export default defineComponent({
refreshFlag.value = false;
};
return {
+ t,
loadState,
height,
scrollableEl,
--
Gitee
From b2213021aa561a81c9fc749b0303ef677aff6de1 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 15:28:15 +0800
Subject: [PATCH 45/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0webhook-setting?=
=?UTF-8?q?-dialog.vue=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/locales/index.ts | 28 +++++++++++
.../views/common/webhook-setting-dialog.vue | 46 +++++++++++++------
2 files changed, 60 insertions(+), 14 deletions(-)
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index d61dd1f42..a5a5cdb07 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -479,6 +479,20 @@ const messages = {
confirm: '确认',
cancel: '取消',
},
+ webhookSettingDialog: {
+ title: '触发执行',
+ tip: '项目已配置webhook,手动触发请填写参数',
+ importLast: '填入上次参数',
+ clear: '清空表单',
+ paramName: '参数名',
+ type: '类型',
+ paramValue: '参数值',
+ placeholder: '请输入参数值',
+ authRule: '认证规则',
+ cancel: '取消',
+ confirm: '确认',
+ selectPlaceholder: '请选择参数值',
+ },
},
en: {
@@ -957,6 +971,20 @@ const messages = {
confirm: 'Confirm',
cancel: 'Cancel',
},
+ webhookSettingDialog: {
+ title: 'Trigger execution',
+ tip: 'The project has been configured with a webhook, for manual triggering please fill in the parameters',
+ importLast: 'Fill in the last parameters',
+ clear: 'Clear the form',
+ paramName: 'Parameter name',
+ type: 'Type',
+ paramValue: 'Parameter value',
+ placeholder: 'Please enter the parameter value',
+ authRule: 'Authentication rules',
+ cancel: 'Cancel',
+ confirm: 'Confirm',
+ selectPlaceholder: 'Please select the parameter value',
+ },
},
};
diff --git a/ui/src/views/common/webhook-setting-dialog.vue b/ui/src/views/common/webhook-setting-dialog.vue
index ea68b82e7..f0b3d5872 100644
--- a/ui/src/views/common/webhook-setting-dialog.vue
+++ b/ui/src/views/common/webhook-setting-dialog.vue
@@ -7,18 +7,18 @@
:destroy-on-close="true"
@close="closeDialog"
>
- 触发执行
+ {{ t('webhookSettingDialog.title') }}
-
项目已配置webhook,手动触发请填写参数
+
{{ t('webhookSettingDialog.tip') }}
- 填入上次参数
+ {{ t('webhookSettingDialog.importLast') }}
- 清空表单
+ {{ t('webhookSettingDialog.clear') }}
@@ -31,7 +31,12 @@
:height="paramsTableHeight"
class="params-table"
>
-
+
@@ -39,12 +44,16 @@
-
+
{{ scope.row.type }}
-
+
@@ -53,13 +62,17 @@
-
+
@@ -85,7 +98,7 @@
-
认证规则
+
{{ t('webhookSettingDialog.authRule') }}
@@ -99,8 +112,8 @@
- 取消
- 确定
+ {{ t('webhookSettingDialog.cancel') }}
+ {{ t('webhookSettingDialog.confirm') }}
@@ -114,6 +127,7 @@ import { IProjectTriggeringDto, ITriggerDefinitionVo, IWebhookAuth, IWebhookPara
import { ParamTypeEnum } from '@/components/workflow/workflow-editor/model/data/enumeration';
import { IWebhookParameterVo, IWebRequestVo } from '@/api/dto/trigger';
import { getWebhookList, getWebhookParams } from '@/api/trigger';
+import { useLocale } from '@/utils/i18n';
export default defineComponent({
emits: ['update:model-value', 'submit'],
@@ -132,6 +146,7 @@ export default defineComponent({
},
},
setup(props, { emit }) {
+ const { t } = useLocale();
const { proxy } = getCurrentInstance() as any;
const dialogVisible = computed(() => props.modelValue);
const formRef = ref>();
@@ -176,7 +191,9 @@ export default defineComponent({
const rule = [
{
required: true,
- message: isBoolean ? '请选择参数值' : '请输入参数值',
+ message: isBoolean
+ ? t('webhookSettingDialog.selectPlaceholder')
+ : t('webhookSettingDialog.placeholder'),
trigger: isBoolean ? 'change' : 'blur',
},
];
@@ -257,6 +274,7 @@ export default defineComponent({
});
};
return {
+ t,
paramTableRef,
paramsTableHeight,
ruleForm,
--
Gitee
From 029b38790f18d3444c2e7bffdf4d1e0a674348f0 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 16:09:07 +0800
Subject: [PATCH 46/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0node-toolbar.vu?=
=?UTF-8?q?e=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workflow/workflow-viewer/node-toolbar.vue | 27 +++++++++++--------
ui/src/locales/index.ts | 22 +++++++++++++++
2 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/ui/src/components/workflow/workflow-viewer/node-toolbar.vue b/ui/src/components/workflow/workflow-viewer/node-toolbar.vue
index 78efed11d..cd1ecfc67 100644
--- a/ui/src/components/workflow/workflow-viewer/node-toolbar.vue
+++ b/ui/src/components/workflow/workflow-viewer/node-toolbar.vue
@@ -31,10 +31,10 @@
-
重试
+
{{ $t('nodeToolbar.retry') }}
-
忽略
+
{{ $t('nodeToolbar.ignore') }}
@@ -71,17 +71,17 @@
-
日志
+
{{ $t('nodeToolbar.log') }}
-
参数
+
{{ $t('nodeToolbar.param') }}
-
缓存
+
{{ $t('nodeToolbar.cache') }}
@@ -230,6 +230,10 @@ export default defineComponent({
.item {
user-select: none;
cursor: pointer;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
&:active {
.icon {
@@ -271,6 +275,7 @@ export default defineComponent({
font-size: 12px;
color: #082340;
line-height: 20px;
+ min-width: max-content;
}
}
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index a5a5cdb07..f0ea9f816 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -493,6 +493,17 @@ const messages = {
confirm: '确认',
selectPlaceholder: '请选择参数值',
},
+ nodeToolbar: {
+ confirmRetry: '确定要重试吗?',
+ confirmIgnore: '确定要忽略吗?',
+ confirm: '确认',
+ cancel: '取消',
+ retry: '重试',
+ ignore: '忽略',
+ log: '日志',
+ param: '参数',
+ cache: '缓存',
+ },
},
en: {
@@ -985,6 +996,17 @@ const messages = {
confirm: 'Confirm',
selectPlaceholder: 'Please select the parameter value',
},
+ nodeToolbar: {
+ confirmRetry: 'Sure you want to retry?',
+ confirmIgnore: 'Sure you want to ignore?',
+ confirm: 'Confirm',
+ cancel: 'Cancel',
+ retry: 'Retry',
+ ignore: 'Ignore',
+ log: 'Log',
+ param: 'Parameters',
+ cache: 'Cache',
+ },
},
};
--
Gitee
From 4e9646ea3814e4f574626cc8d03661e8a6043285 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Mon, 21 Apr 2025 16:32:35 +0800
Subject: [PATCH 47/75] =?UTF-8?q?feat:=20=E5=AE=9E=E7=8E=B0toolbar.vue?=
=?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workflow/workflow-viewer/task-state.vue | 16 +++++++++------
ui/src/locales/index.ts | 20 +++++++++++++++++++
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/ui/src/components/workflow/workflow-viewer/task-state.vue b/ui/src/components/workflow/workflow-viewer/task-state.vue
index 04555f4d3..5f7f5b6ea 100644
--- a/ui/src/components/workflow/workflow-viewer/task-state.vue
+++ b/ui/src/components/workflow/workflow-viewer/task-state.vue
@@ -6,13 +6,14 @@
-
\ No newline at end of file
+
diff --git a/ui/src/locales/index.ts b/ui/src/locales/index.ts
index 401f54f76..42af6907e 100644
--- a/ui/src/locales/index.ts
+++ b/ui/src/locales/index.ts
@@ -737,6 +737,13 @@ const messages = {
download: '下载',
moreLog: '日志过大,更多日志请下载查看',
},
+ textCopy: {
+ copy: '复制',
+ valueEmpty: '值为空',
+ copied: '已复制',
+ copyFailed: '复制失败',
+ cause: '原因:',
+ },
},
en: {
@@ -1474,6 +1481,13 @@ const messages = {
download: 'Download',
moreLog: 'log is too large, more logs please download to view',
},
+ textCopy: {
+ copy: 'Copy',
+ valueEmpty: 'value is null',
+ copied: 'copied',
+ copyFailed: 'copy failed',
+ cause: 'cause: ',
+ },
},
};
--
Gitee
From 13dd0c09f1829b7c8b48c98d7eac65f6d910ff80 Mon Sep 17 00:00:00 2001
From: cae545e5 <1876869218@qq.com>
Date: Wed, 23 Apr 2025 17:20:28 +0800
Subject: [PATCH 75/75] =?UTF-8?q?feat:=20=E7=9B=91=E5=90=AC=E8=AF=AD?=
=?UTF-8?q?=E8=A8=80=E7=B1=BB=E5=9E=8B=E5=8F=98=E5=8C=96=E5=88=B7=E6=96=B0?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2,=E7=94=A8=E6=9D=A5=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E9=9D=A2=E5=8C=85=E5=B1=91=E4=B8=8D=E9=9A=8F=E7=9D=80=E8=AF=AD?=
=?UTF-8?q?=E8=A8=80=E5=88=87=E6=8D=A2=E6=94=B9=E5=8F=98=E6=96=87=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/views/nav/top.vue | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ui/src/views/nav/top.vue b/ui/src/views/nav/top.vue
index 6d33f0d74..566c9a925 100644
--- a/ui/src/views/nav/top.vue
+++ b/ui/src/views/nav/top.vue
@@ -79,7 +79,7 @@