@liujitcn/kratos-admin-system 0.0.21 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/package/declarations/src/api/system/base_language.d.ts +5 -4
  2. package/dist/package/declarations/src/api/system/base_translation.d.ts +7 -4
  3. package/dist/package/declarations/src/api/system/ops_monitoring.d.ts +19 -0
  4. package/dist/package/declarations/src/api/system/ops_monitoring_sse.d.ts +12 -0
  5. package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +9 -32
  6. package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +3 -6
  7. package/dist/package/declarations/src/components/dynamicTranslation.d.ts +11 -17
  8. package/dist/package/declarations/src/locales/generated.d.ts +6536 -0
  9. package/dist/package/declarations/src/rpc/base/v1/ai_session.d.ts +12 -2
  10. package/dist/package/declarations/src/rpc/base/v1/ai_tool.d.ts +9 -1
  11. package/dist/package/declarations/src/rpc/base/v1/config.d.ts +35 -0
  12. package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +1 -1
  13. package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +23 -7
  14. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +7 -77
  15. package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +9 -1
  16. package/dist/package/declarations/src/rpc/system/admin/v1/base_language.d.ts +7 -2
  17. package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +5 -40
  18. package/dist/package/declarations/src/rpc/system/admin/v1/base_migration.d.ts +6 -6
  19. package/dist/package/declarations/src/rpc/system/admin/v1/base_role.d.ts +13 -1
  20. package/dist/package/declarations/src/rpc/system/admin/v1/base_translation.d.ts +54 -81
  21. package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +11 -1
  22. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +11 -11
  23. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +11 -1
  24. package/dist/package/declarations/src/rpc/system/admin/v1/common.d.ts +13 -0
  25. package/dist/package/declarations/src/rpc/system/admin/v1/ops_monitoring.d.ts +222 -0
  26. package/dist/package/declarations/src/views/tool/ops-monitoring/index.vue.d.ts +3 -0
  27. package/dist/package/src/api/base/ai_message.ts +2 -2
  28. package/dist/package/src/api/system/base_language.ts +13 -15
  29. package/dist/package/src/api/system/base_translation.ts +17 -6
  30. package/dist/package/src/api/system/ops_monitoring.ts +88 -0
  31. package/dist/package/src/api/system/ops_monitoring_sse.ts +49 -0
  32. package/dist/package/src/components/DynamicTranslationCell.vue +199 -126
  33. package/dist/package/src/components/DynamicTranslationEditor.vue +109 -78
  34. package/dist/package/src/components/dynamicTranslation.ts +11 -31
  35. package/dist/package/src/locales/README.md +7 -5
  36. package/dist/package/src/locales/en-US.json +876 -872
  37. package/dist/package/src/locales/es-ES.json +900 -895
  38. package/dist/package/src/locales/fr-FR.json +896 -891
  39. package/dist/package/src/locales/generated.ts +22 -0
  40. package/dist/package/src/locales/ja-JP.json +876 -872
  41. package/dist/package/src/locales/ko-KR.json +881 -876
  42. package/dist/package/src/locales/zh-CN.json +876 -872
  43. package/dist/package/src/locales/zh-TW.json +876 -871
  44. package/dist/package/src/module.ts +3 -17
  45. package/dist/package/src/rpc/base/v1/ai_session.ts +13 -2
  46. package/dist/package/src/rpc/base/v1/ai_tool.ts +10 -1
  47. package/dist/package/src/rpc/base/v1/config.ts +47 -0
  48. package/dist/package/src/rpc/system/admin/v1/auth.ts +1 -1
  49. package/dist/package/src/rpc/system/admin/v1/base_config.ts +24 -7
  50. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +7 -79
  51. package/dist/package/src/rpc/system/admin/v1/base_job.ts +10 -1
  52. package/dist/package/src/rpc/system/admin/v1/base_language.ts +8 -2
  53. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +5 -41
  54. package/dist/package/src/rpc/system/admin/v1/base_migration.ts +8 -8
  55. package/dist/package/src/rpc/system/admin/v1/base_role.ts +14 -1
  56. package/dist/package/src/rpc/system/admin/v1/base_translation.ts +54 -81
  57. package/dist/package/src/rpc/system/admin/v1/base_user.ts +12 -1
  58. package/dist/package/src/rpc/system/admin/v1/code_gen.ts +11 -11
  59. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +12 -1
  60. package/dist/package/src/rpc/system/admin/v1/common.ts +21 -0
  61. package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +255 -0
  62. package/dist/package/src/views/ai/chat/components/ChatPanel.vue +36 -36
  63. package/dist/package/src/views/ai/chat/components/SessionPanel.vue +6 -6
  64. package/dist/package/src/views/ai/chat/components/XSender.vue +20 -20
  65. package/dist/package/src/views/ai/chat/index.vue +33 -32
  66. package/dist/package/src/views/ai/chat/message.ts +16 -15
  67. package/dist/package/src/views/base/api/index.vue +55 -56
  68. package/dist/package/src/views/base/area/index.vue +18 -19
  69. package/dist/package/src/views/base/config/index.vue +143 -133
  70. package/dist/package/src/views/base/dept/index.vue +42 -43
  71. package/dist/package/src/views/base/dict/index.vue +49 -45
  72. package/dist/package/src/views/base/dict/item.vue +54 -49
  73. package/dist/package/src/views/base/job/index.vue +51 -52
  74. package/dist/package/src/views/base/job/log.vue +18 -18
  75. package/dist/package/src/views/{tool → base}/language/index.vue +51 -47
  76. package/dist/package/src/views/base/log/index.vue +40 -40
  77. package/dist/package/src/views/base/menu/index.vue +220 -177
  78. package/dist/package/src/views/base/migration/index.vue +24 -24
  79. package/dist/package/src/views/base/post/index.vue +42 -43
  80. package/dist/package/src/views/base/role/index.vue +54 -55
  81. package/dist/package/src/views/base/tenant/index.vue +42 -43
  82. package/dist/package/src/views/base/user/components/dept-tree.vue +1 -1
  83. package/dist/package/src/views/base/user/index.vue +69 -71
  84. package/dist/package/src/views/profile/components/base.vue +9 -9
  85. package/dist/package/src/views/profile/components/password.vue +19 -20
  86. package/dist/package/src/views/profile/components/security.vue +20 -20
  87. package/dist/package/src/views/profile/index.vue +3 -3
  88. package/dist/package/src/views/tool/api-doc/index.vue +1 -1
  89. package/dist/package/src/views/tool/code-gen/code-preview/index.vue +13 -13
  90. package/dist/package/src/views/tool/code-gen/columns/index.vue +89 -89
  91. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +5 -5
  92. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +21 -21
  93. package/dist/package/src/views/tool/code-gen/components/CodePreviewPane.vue +5 -5
  94. package/dist/package/src/views/tool/code-gen/config.ts +60 -60
  95. package/dist/package/src/views/tool/code-gen/preview/data.ts +2 -2
  96. package/dist/package/src/views/tool/code-gen/preview/index.vue +30 -31
  97. package/dist/package/src/views/tool/code-gen/proto/index.vue +43 -43
  98. package/dist/package/src/views/tool/code-gen/table/index.vue +95 -95
  99. package/dist/package/src/views/tool/ops-monitoring/index.vue +1175 -0
  100. package/dist/package/src/views/tool/project-doc/index.vue +7 -7
  101. package/package.json +2 -2
  102. package/dist/package/declarations/src/rpc/base/v1/enum.d.ts +0 -43
  103. package/dist/package/declarations/src/rpc/system/common/v1/enum.d.ts +0 -67
  104. package/dist/package/src/rpc/base/v1/enum.ts +0 -54
  105. package/dist/package/src/rpc/system/common/v1/enum.ts +0 -80
  106. /package/dist/package/declarations/src/views/{tool → base}/language/index.vue.d.ts +0 -0
@@ -6,16 +6,16 @@
6
6
  <h3>{{ t("system.profile.security.title") }}</h3>
7
7
  <p>{{ t("system.profile.security.description") }}</p>
8
8
  </div>
9
- <el-tag effect="plain" type="success">{{ t("system.profile.security.value.accountNormal") }}</el-tag>
9
+ <el-tag effect="plain" type="success">{{ t("system.profile.security.value.account_normal") }}</el-tag>
10
10
  </div>
11
11
  <div class="security-list">
12
12
  <div class="security-item">
13
13
  <div class="security-item__content">
14
- <strong>{{ t("system.profile.security.field.loginPassword") }}</strong>
15
- <p>{{ t("system.profile.security.message.passwordHint") }}</p>
14
+ <strong>{{ t("system.profile.security.field.login_password") }}</strong>
15
+ <p>{{ t("system.profile.security.message.password_hint") }}</p>
16
16
  </div>
17
17
  <el-button type="primary" plain @click="emit('switchTab', 'password')">
18
- {{ t("system.profile.security.action.changePassword") }}
18
+ {{ t("system.profile.security.action.change_password") }}
19
19
  </el-button>
20
20
  </div>
21
21
  <div class="security-item">
@@ -24,7 +24,7 @@
24
24
  <p>{{ mobileTip }}</p>
25
25
  </div>
26
26
  <el-button plain @click="openPhoneDialog">
27
- {{ profile.phone ? t("system.profile.security.action.changePhone") : t("system.profile.security.action.bindNow") }}
27
+ {{ profile.phone ? t("system.profile.security.action.change_phone") : t("system.profile.security.action.bind_now") }}
28
28
  </el-button>
29
29
  </div>
30
30
  <div v-for="item in oauthBindings" :key="item.provider" class="security-item">
@@ -38,7 +38,7 @@
38
38
  <strong>{{ oauthName(item) }}</strong>
39
39
  <p>
40
40
  {{
41
- item.bound ? t("system.profile.security.message.oauthBound") : t("system.profile.security.message.oauthUnbound")
41
+ item.bound ? t("system.profile.security.message.oauth_bound") : t("system.profile.security.message.oauth_unbound")
42
42
  }}
43
43
  </p>
44
44
  </div>
@@ -70,11 +70,11 @@
70
70
  </template>
71
71
  <div class="status-grid">
72
72
  <div class="status-item">
73
- <span>{{ t("system.profile.security.field.phoneVerification") }}</span>
73
+ <span>{{ t("system.profile.security.field.phone_verification") }}</span>
74
74
  <strong>{{ profile.phone ? t("common.status.enabled") : t("common.status.disabled") }}</strong>
75
75
  </div>
76
76
  <div class="status-item">
77
- <span>{{ t("system.profile.security.field.profileCompletion") }}</span>
77
+ <span>{{ t("system.profile.security.field.profile_completion") }}</span>
78
78
  <strong>{{ profileCompletion }}</strong>
79
79
  </div>
80
80
  </div>
@@ -82,19 +82,19 @@
82
82
 
83
83
  <ProDialog
84
84
  v-model="phoneDialogVisible"
85
- :title="t('system.profile.security.dialog.bindPhone')"
85
+ :title="t('system.profile.security.dialog.bind_phone')"
86
86
  :width="520"
87
87
  @closed="handleDialogClosed"
88
88
  >
89
- <ProForm ref="phoneFormRef" :model="phoneForm" :fields="phoneFormFields" :rules="phoneFormRules" label-width="96px">
89
+ <ProForm ref="phoneFormRef" :model="phoneForm" :fields="phoneFormFields" :rules="phoneFormRules">
90
90
  <template #mobileCodeInput>
91
91
  <el-input v-model="phoneForm.code" :placeholder="t('system.profile.security.placeholder.code')">
92
92
  <template #append>
93
93
  <el-button :disabled="countdown > 0" @click="handleSendCode">
94
94
  {{
95
95
  countdown > 0
96
- ? t("system.profile.security.action.retryAfter", { seconds: countdown })
97
- : t("system.profile.security.action.sendCode")
96
+ ? t("system.profile.security.action.retry_after", { seconds: countdown })
97
+ : t("system.profile.security.action.send_code")
98
98
  }}
99
99
  </el-button>
100
100
  </template>
@@ -167,7 +167,7 @@ const sendPhoneCodeForm = reactive<SendPhoneCodeRequest>({
167
167
  const phoneFormFields = computed<ProFormField[]>(() => [
168
168
  {
169
169
  prop: "phone",
170
- label: t("system.profile.security.field.phoneNumber"),
170
+ label: t("system.profile.security.field.phone_number"),
171
171
  component: "input",
172
172
  props: { placeholder: t("system.profile.security.placeholder.phone") }
173
173
  },
@@ -190,8 +190,8 @@ const phoneFormRules = computed(() => ({
190
190
  /** 根据当前绑定状态输出手机号说明文案。 */
191
191
  const mobileTip = computed(() => {
192
192
  return props.profile.phone
193
- ? t("system.profile.security.message.phoneBound", { phone: props.profile.phone })
194
- : t("system.profile.security.message.phoneUnbound");
193
+ ? t("system.profile.security.message.phone_bound", { phone: props.profile.phone })
194
+ : t("system.profile.security.message.phone_unbound");
195
195
  });
196
196
 
197
197
  /** 根据关键资料估算当前资料完成度。 */
@@ -228,7 +228,7 @@ async function consumeOauthBindingResult() {
228
228
  if (typeof bindError === "string" && bindError) {
229
229
  ElMessage.error(bindError);
230
230
  } else if (bindSuccess === "1") {
231
- ElMessage.success(t("system.profile.security.message.oauthBindSuccess"));
231
+ ElMessage.success(t("system.profile.security.message.oauth_bind_success"));
232
232
  } else {
233
233
  return;
234
234
  }
@@ -263,7 +263,7 @@ async function handleBindOauth(binding: SecurityOauthBinding) {
263
263
  /** 解绑三方账号并刷新绑定状态。 */
264
264
  async function handleUnbindOauth(binding: SecurityOauthBinding) {
265
265
  await ElMessageBox.confirm(
266
- t("system.profile.security.dialog.confirmUnbind", { provider: oauthName(binding) }),
266
+ t("system.profile.security.dialog.confirm_unbind", { provider: oauthName(binding) }),
267
267
  t("common.title.warning"),
268
268
  {
269
269
  type: "warning",
@@ -274,7 +274,7 @@ async function handleUnbindOauth(binding: SecurityOauthBinding) {
274
274
  oauthLoadingProvider.value = binding.provider;
275
275
  try {
276
276
  await defProfileOauthService.UnbindOauthAccount({ provider: binding.provider });
277
- ElMessage.success(t("system.profile.security.message.oauthUnbindSuccess"));
277
+ ElMessage.success(t("system.profile.security.message.oauth_unbind_success"));
278
278
  await loadOauthBindings();
279
279
  } finally {
280
280
  oauthLoadingProvider.value = "";
@@ -301,7 +301,7 @@ async function handleSendCode() {
301
301
 
302
302
  sendPhoneCodeForm.phone = phoneForm.phone;
303
303
  await defProfileAuthService.SendPhoneCode(sendPhoneCodeForm);
304
- ElMessage.success(t("system.profile.security.message.codeSent"));
304
+ ElMessage.success(t("system.profile.security.message.code_sent"));
305
305
  startCountdown();
306
306
  }
307
307
 
@@ -312,7 +312,7 @@ async function handleSubmitPhone() {
312
312
  submitLoading.value = true;
313
313
  try {
314
314
  await defProfileAuthService.UpdateUserPhone({ user_phone: phoneForm });
315
- ElMessage.success(t("system.profile.security.message.phoneUpdated"));
315
+ ElMessage.success(t("system.profile.security.message.phone_updated"));
316
316
  phoneDialogVisible.value = false;
317
317
  emit("refreshed");
318
318
  } finally {
@@ -69,17 +69,17 @@ const profileTabs = computed<ProfileTabOption[]>(() => [
69
69
  {
70
70
  value: "account",
71
71
  label: t("system.profile.account.title"),
72
- description: t("system.profile.account.navDescription")
72
+ description: t("system.profile.account.nav_description")
73
73
  },
74
74
  {
75
75
  value: "security",
76
76
  label: t("system.profile.security.title"),
77
- description: t("system.profile.security.navDescription")
77
+ description: t("system.profile.security.nav_description")
78
78
  },
79
79
  {
80
80
  value: "password",
81
81
  label: t("system.profile.password.title"),
82
- description: t("system.profile.password.navDescription")
82
+ description: t("system.profile.password.nav_description")
83
83
  }
84
84
  ]);
85
85
  const userProfileForm = reactive<UserProfileForm>({
@@ -15,7 +15,7 @@
15
15
  <span class="api-doc-page__document-key">{{ document.key }}</span>
16
16
  </button>
17
17
  </div>
18
- <el-empty v-else :image-size="56" :description="t('system.apiDoc.message.empty')" />
18
+ <el-empty v-else :image-size="56" :description="t('system.base.api.doc.message.empty')" />
19
19
  </el-card>
20
20
  <el-card class="code-gen-sub-card api-doc-page__card" shadow="never">
21
21
  <div ref="swaggerRootRef" class="api-doc-page__swagger" />
@@ -5,17 +5,17 @@
5
5
  <div v-if="BUTTONS['tool:code-gen-table:generate']" class="code-gen-toolbar">
6
6
  <div class="code-gen-code-preview-actions">
7
7
  <el-button :icon="Clock" :disabled="!progressTaskAvailable" @click="handleOpenProgress">
8
- {{ t("system.codegen.action.recentTask") }}
8
+ {{ t("system.code.gen.action.recent_task") }}
9
9
  </el-button>
10
10
  <el-button :icon="Promotion" type="primary" :loading="generating" @click="handleGenerate">
11
- {{ t("system.codegen.action.generate") }}
11
+ {{ t("system.code.gen.action.generate") }}
12
12
  </el-button>
13
13
  </div>
14
14
  </div>
15
15
 
16
16
  <el-alert v-if="previewError" class="code-gen-code-preview-alert" :title="previewError" type="warning" :closable="false" />
17
17
  <CodePreviewPane v-if="loading || files.length" class="code-gen-code-preview-table" :files="files" :loading="loading" />
18
- <el-empty v-else class="code-gen-code-preview-empty" :description="t('system.codegen.preview.message.emptyFiles')" />
18
+ <el-empty v-else class="code-gen-code-preview-empty" :description="t('system.code.gen.preview.message.empty_files')" />
19
19
  </el-card>
20
20
 
21
21
  <CodeGenProgressDialog
@@ -39,7 +39,7 @@ import { defCodeGenService } from "@liujitcn/kratos-admin-system/api/system/code
39
39
  import { defCodeGenTableService } from "@liujitcn/kratos-admin-system/api/system/code_gen_table";
40
40
  import type { CodeGenPreviewFile } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen";
41
41
  import type { CodeGenTableForm } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen_table";
42
- import { CodeGenTableStatus } from "@liujitcn/kratos-admin-system/rpc/system/common/v1/enum";
42
+ import { CodeGenTableStatus } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/code_gen_table";
43
43
  import CodeGenProgressDialog from "../components/CodeGenProgressDialog.vue";
44
44
  import CodePreviewPane from "../components/CodePreviewPane.vue";
45
45
 
@@ -51,7 +51,7 @@ defineOptions({
51
51
  const codeGenTaskStorageKey = "code-gen-progress-task-id";
52
52
  const codeGenProgressDialogVisibleStorageKey = "code-gen-progress-dialog-visible";
53
53
  const codeGenProgressSelectedTableIdsStorageKey = "code-gen-progress-selected-table-ids";
54
- const codeGenStatusDisabled = CodeGenTableStatus.DISABLED_CGTS;
54
+ const codeGenStatusDisabled = CodeGenTableStatus.CODE_GEN_TABLE_STATUS_DISABLED;
55
55
 
56
56
  const route = useRoute();
57
57
  const tabsStore = useTabsStore();
@@ -78,7 +78,7 @@ const tableId = computed(() => {
78
78
  });
79
79
 
80
80
  /** 当前代码预览页标题。 */
81
- const pageTitle = computed(() => table.value?.comment || table.value?.name || t("system.codegen.preview.title.code"));
81
+ const pageTitle = computed(() => table.value?.comment || table.value?.name || t("system.code.gen.preview.title.code"));
82
82
 
83
83
  // 路由生成对象变化时重新载入对应代码预览。
84
84
  watch(
@@ -105,14 +105,14 @@ async function loadCodePreview() {
105
105
  files.value = preview.files ?? [];
106
106
  missingTranslations.value = preview.missing_translations ?? [];
107
107
  if (missingTranslations.value.length) {
108
- previewError.value = t("system.codegen.preview.message.missingTranslations", {
109
- items: missingTranslations.value.join(t("system.codegen.preview.value.listSeparator"))
108
+ previewError.value = t("system.code.gen.preview.message.missing_translations", {
109
+ items: missingTranslations.value.join(t("system.code.gen.preview.value.list_separator"))
110
110
  });
111
111
  }
112
- if (!files.value.length && !previewError.value) previewError.value = t("system.codegen.preview.message.noPreviewFiles");
112
+ if (!files.value.length && !previewError.value) previewError.value = t("system.code.gen.preview.message.no_preview_files");
113
113
  } catch {
114
114
  // 预览错误在页面内转成可操作提示,避免全局错误弹窗只显示“系统出错”。
115
- previewError.value = t("system.codegen.preview.message.loadFailed");
115
+ previewError.value = t("system.code.gen.preview.message.load_failed");
116
116
  }
117
117
  syncWorkspaceTitle();
118
118
  } finally {
@@ -122,7 +122,7 @@ async function loadCodePreview() {
122
122
 
123
123
  /** 同步代码预览页签和浏览器标题。 */
124
124
  function syncWorkspaceTitle() {
125
- const title = t("system.codegen.preview.title.workspace", { table: pageTitle.value });
125
+ const title = t("system.code.gen.preview.title.workspace", { table: pageTitle.value });
126
126
  tabsStore.setTabsTitle(title);
127
127
  document.title = `${title} - ${import.meta.env.VITE_GLOB_APP_TITLE}`;
128
128
  }
@@ -131,12 +131,12 @@ function syncWorkspaceTitle() {
131
131
  async function handleGenerate() {
132
132
  if (!table.value) return;
133
133
  if (table.value.status === codeGenStatusDisabled) {
134
- ElMessage.warning(t("system.codegen.table.message.disabled", { name: table.value.name }));
134
+ ElMessage.warning(t("system.code.gen.table.message.disabled", { name: table.value.name }));
135
135
  return;
136
136
  }
137
137
  try {
138
138
  await ElMessageBox.confirm(
139
- t("system.codegen.table.dialog.generateOne", { name: table.value.name }),
139
+ t("system.code.gen.table.dialog.generate_one", { name: table.value.name }),
140
140
  t("common.title.notice"),
141
141
  {
142
142
  confirmButtonText: t("common.action.confirm"),