@liujitcn/kratos-admin-system 0.0.49 → 0.0.50

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 (94) hide show
  1. package/README.md +44 -8
  2. package/dist/package/declarations/src/api/system/admin/v1/base_i18n_custom.d.ts +18 -0
  3. package/dist/package/declarations/src/api/system/admin/v1/base_tenant.d.ts +2 -2
  4. package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project.d.ts +23 -0
  5. package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project_grant.d.ts +16 -0
  6. package/dist/package/declarations/src/components/tenant-project/ProjectGrantDialog.vue.d.ts +8 -0
  7. package/dist/package/declarations/src/components/tenant-project/TenantProjectManager.vue.d.ts +29 -0
  8. package/dist/package/declarations/src/components/tenant-project/TenantProjectSelect.vue.d.ts +31 -0
  9. package/dist/package/declarations/src/components/tenant-project/TenantProjectText.vue.d.ts +19 -0
  10. package/dist/package/declarations/src/components/tenant-project/tenant-project-manager-data.d.ts +14 -0
  11. package/dist/package/declarations/src/components/tenant-project/tenant-project-manager.d.ts +40 -0
  12. package/dist/package/declarations/src/index.d.ts +2 -0
  13. package/dist/package/declarations/src/locales/generated.d.ts +172 -0
  14. package/dist/package/declarations/src/rpc/base/v1/config.d.ts +11 -0
  15. package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n_custom.d.ts +105 -0
  16. package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant.d.ts +10 -1
  17. package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project.d.ts +141 -0
  18. package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project_grant.d.ts +105 -0
  19. package/dist/package/declarations/src/views/ai/chat/components/SessionPanel.vue.d.ts +2 -2
  20. package/dist/package/declarations/src/views/base/i18n-custom/index.vue.d.ts +3 -0
  21. package/dist/package/declarations/src/views/base/project-grant/index.vue.d.ts +3 -0
  22. package/dist/package/declarations/src/views/base/tenant-project/index.vue.d.ts +3 -0
  23. package/dist/package/src/api/system/admin/v1/base_i18n_custom.ts +72 -0
  24. package/dist/package/src/api/system/admin/v1/base_tenant.ts +3 -2
  25. package/dist/package/src/api/system/admin/v1/base_tenant_project.ts +94 -0
  26. package/dist/package/src/api/system/admin/v1/base_tenant_project_grant.ts +63 -0
  27. package/dist/package/src/components/tenant-project/ProjectGrantDialog.vue +108 -0
  28. package/dist/package/src/components/tenant-project/TenantProjectManager.vue +452 -0
  29. package/dist/package/src/components/tenant-project/TenantProjectSelect.vue +83 -0
  30. package/dist/package/src/components/tenant-project/TenantProjectText.vue +37 -0
  31. package/dist/package/src/components/tenant-project/tenant-project-manager-data.ts +26 -0
  32. package/dist/package/src/components/tenant-project/tenant-project-manager.ts +48 -0
  33. package/dist/package/src/index.ts +12 -0
  34. package/dist/package/src/locales/README.md +1 -1
  35. package/dist/package/src/locales/en-US.json +45 -2
  36. package/dist/package/src/locales/ja-JP.json +45 -2
  37. package/dist/package/src/locales/zh-CN.json +45 -2
  38. package/dist/package/src/locales/zh-TW.json +45 -2
  39. package/dist/package/src/module.ts +3 -3
  40. package/dist/package/src/rpc/base/v1/config.ts +12 -0
  41. package/dist/package/src/rpc/system/admin/v1/base_i18n_custom.ts +126 -0
  42. package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +11 -1
  43. package/dist/package/src/rpc/system/admin/v1/base_tenant_project.ts +166 -0
  44. package/dist/package/src/rpc/system/admin/v1/base_tenant_project_grant.ts +128 -0
  45. package/dist/package/src/views/ai/chat/components/XSender.vue +4 -3
  46. package/dist/package/src/views/base/api-log/index.vue +3 -3
  47. package/dist/package/src/views/base/config/index.vue +3 -3
  48. package/dist/package/src/views/base/data-access-log/index.vue +3 -3
  49. package/dist/package/src/views/base/dept/index.vue +10 -45
  50. package/dist/package/src/views/base/dict/index.vue +3 -3
  51. package/dist/package/src/views/base/dict/item.vue +3 -3
  52. package/dist/package/src/views/base/file/index.vue +12 -3
  53. package/dist/package/src/views/base/i18n-custom/index.vue +321 -0
  54. package/dist/package/src/views/base/job/index.vue +3 -3
  55. package/dist/package/src/views/base/login-log/index.vue +13 -4
  56. package/dist/package/src/views/base/login-policy/index.vue +97 -34
  57. package/dist/package/src/views/base/menu/index.vue +3 -3
  58. package/dist/package/src/views/base/message/index.vue +9 -32
  59. package/dist/package/src/views/base/message-category/index.vue +2 -4
  60. package/dist/package/src/views/base/oauth-client/index.vue +8 -42
  61. package/dist/package/src/views/base/online-session/index.vue +8 -27
  62. package/dist/package/src/views/base/operation-log/index.vue +3 -3
  63. package/dist/package/src/views/base/permission-log/index.vue +3 -3
  64. package/dist/package/src/views/base/policy-evaluation-log/index.vue +3 -3
  65. package/dist/package/src/views/base/post/index.vue +9 -42
  66. package/dist/package/src/views/base/project-grant/index.vue +336 -0
  67. package/dist/package/src/views/base/role/index.vue +13 -47
  68. package/dist/package/src/views/base/tenant/index.vue +163 -19
  69. package/dist/package/src/views/base/tenant-project/index.vue +12 -0
  70. package/dist/package/src/views/base/user/index.vue +30 -51
  71. package/dist/package/src/views/profile/components/login-log.vue +15 -2
  72. package/dist/package/src/views/profile/components/password.vue +1 -1
  73. package/dist/package/src/views/profile/components/security.vue +2 -2
  74. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +2 -2
  75. package/dist/package/src/views/tool/code-gen/config.ts +2 -1
  76. package/package.json +2 -2
  77. /package/dist/package/declarations/src/components/{ChangePasswordForm.vue.d.ts → account/ChangePasswordForm.vue.d.ts} +0 -0
  78. /package/dist/package/declarations/src/components/{ForcedPasswordDialog.vue.d.ts → account/ForcedPasswordDialog.vue.d.ts} +0 -0
  79. /package/dist/package/declarations/src/components/{Ai.vue.d.ts → ai/Ai.vue.d.ts} +0 -0
  80. /package/dist/package/declarations/src/components/{DynamicI18nCell.vue.d.ts → i18n/DynamicI18nCell.vue.d.ts} +0 -0
  81. /package/dist/package/declarations/src/components/{DynamicI18nEditor.vue.d.ts → i18n/DynamicI18nEditor.vue.d.ts} +0 -0
  82. /package/dist/package/declarations/src/components/{dynamicI18n.d.ts → i18n/dynamicI18n.d.ts} +0 -0
  83. /package/dist/package/declarations/src/components/{LogTable.vue.d.ts → log/LogTable.vue.d.ts} +0 -0
  84. /package/dist/package/declarations/src/components/{log.d.ts → log/log.d.ts} +0 -0
  85. /package/dist/package/declarations/src/components/{Notification.vue.d.ts → notification/Notification.vue.d.ts} +0 -0
  86. /package/dist/package/src/components/{ChangePasswordForm.vue → account/ChangePasswordForm.vue} +0 -0
  87. /package/dist/package/src/components/{ForcedPasswordDialog.vue → account/ForcedPasswordDialog.vue} +0 -0
  88. /package/dist/package/src/components/{Ai.vue → ai/Ai.vue} +0 -0
  89. /package/dist/package/src/components/{DynamicI18nCell.vue → i18n/DynamicI18nCell.vue} +0 -0
  90. /package/dist/package/src/components/{DynamicI18nEditor.vue → i18n/DynamicI18nEditor.vue} +0 -0
  91. /package/dist/package/src/components/{dynamicI18n.ts → i18n/dynamicI18n.ts} +0 -0
  92. /package/dist/package/src/components/{LogTable.vue → log/LogTable.vue} +0 -0
  93. /package/dist/package/src/components/{log.ts → log/log.ts} +0 -0
  94. /package/dist/package/src/components/{Notification.vue → notification/Notification.vue} +0 -0
@@ -0,0 +1,26 @@
1
+ import type { BaseTenantProject } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_tenant_project";
2
+
3
+ /** 租户项目业务数据查询键。 */
4
+ export interface TenantProjectKey {
5
+ /** 租户 ID。 */
6
+ tenant_id: number;
7
+ /** 公共项目 ID。 */
8
+ project_id: number;
9
+ }
10
+
11
+ /** 租户项目扩展数据,外层键由租户 ID 和项目 ID 组成。 */
12
+ export type TenantProjectExtraData = Record<string, Record<string, unknown>>;
13
+
14
+ /** 创建租户项目扩展数据的稳定键。 */
15
+ export function tenantProjectKey(tenantId: number, projectId: number): string {
16
+ return `${tenantId}:${projectId}`;
17
+ }
18
+
19
+ /** 将外部业务字段合并到项目行,同时保护公共项目字段。 */
20
+ export function mergeTenantProjectExtraData(project: BaseTenantProject, extra?: Record<string, unknown>): BaseTenantProject & Record<string, unknown> {
21
+ if (!extra) return { ...project } as BaseTenantProject & Record<string, unknown>;
22
+
23
+ const protectedFields = new Set(["id", "tenant_id", "code", "name", "status", "sort", "remark", "created_at", "updated_at"]);
24
+ const safeExtra = Object.fromEntries(Object.entries(extra).filter(([key]) => !protectedFields.has(key)));
25
+ return { ...project, ...safeExtra };
26
+ }
@@ -0,0 +1,48 @@
1
+ import type { BaseTenantProject, PageBaseTenantProjectRequest } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_tenant_project";
2
+ import type { ColumnProps, TableActionProps } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
3
+ import type { TenantProjectExtraData, TenantProjectKey } from "./tenant-project-manager-data";
4
+
5
+ export { mergeTenantProjectExtraData, tenantProjectKey, type TenantProjectExtraData, type TenantProjectKey } from "./tenant-project-manager-data";
6
+
7
+ /** 租户项目单条业务上下文。 */
8
+ export interface TenantProjectContext<TData extends Record<string, unknown> = Record<string, unknown>> extends TenantProjectKey {
9
+ /** 公共项目基础数据。 */
10
+ project: BaseTenantProject;
11
+ /** 外部业务模块返回的当前项目数据。 */
12
+ data: TData;
13
+ }
14
+
15
+ /** 租户项目扩展字段批量加载上下文。 */
16
+ export interface TenantProjectExtraDataLoadContext {
17
+ /** 当前页全部项目键。 */
18
+ projects: TenantProjectKey[];
19
+ /** 当前项目列表查询参数。 */
20
+ query: PageBaseTenantProjectRequest;
21
+ }
22
+
23
+ /** 租户项目扩展数据加载器。 */
24
+ export type TenantProjectExtraDataLoader = (
25
+ context: TenantProjectExtraDataLoadContext
26
+ ) => Promise<TenantProjectExtraData | undefined>;
27
+
28
+ /** 租户项目扩展操作按钮。 */
29
+ export type TenantProjectAction = Omit<TableActionProps, "disabled" | "hidden" | "params" | "onClick"> & {
30
+ /** 按项目上下文控制按钮显隐。 */
31
+ hidden?: boolean | ((context: TenantProjectContext) => boolean);
32
+ /** 按项目上下文控制按钮禁用。 */
33
+ disabled?: boolean | ((context: TenantProjectContext) => boolean);
34
+ /** 根据项目上下文生成按钮附加参数。 */
35
+ params?: (context: TenantProjectContext) => Record<string, any>;
36
+ /** 执行项目扩展操作。 */
37
+ onClick: (context: TenantProjectContext, params?: Record<string, any>) => void | Promise<void>;
38
+ };
39
+
40
+ /** 租户项目管理组件属性。 */
41
+ export interface TenantProjectManagerProps {
42
+ /** 追加到基础列表的表格列。 */
43
+ extraColumns?: ColumnProps[];
44
+ /** 追加到基础操作列的业务操作。 */
45
+ extraActions?: TenantProjectAction[];
46
+ /** 加载当前页外部业务字段。 */
47
+ loadExtraData?: TenantProjectExtraDataLoader;
48
+ }
@@ -1,3 +1,15 @@
1
1
  export { ADMIN_AI_EXTENSION, getAdminAiExtension } from "./ai";
2
2
  export type { AdminAiExtension } from "./ai";
3
+ export { default as TenantProjectManager } from "./components/tenant-project/TenantProjectManager.vue";
4
+ export {
5
+ mergeTenantProjectExtraData,
6
+ tenantProjectKey,
7
+ type TenantProjectAction,
8
+ type TenantProjectContext,
9
+ type TenantProjectExtraData,
10
+ type TenantProjectExtraDataLoadContext,
11
+ type TenantProjectExtraDataLoader,
12
+ type TenantProjectKey,
13
+ type TenantProjectManagerProps
14
+ } from "./components/tenant-project/tenant-project-manager";
3
15
  export { systemAdminModule } from "./module";
@@ -20,7 +20,7 @@
20
20
  | `system.base.oauth_client.*` | 开放授权客户端字段、凭据和 API 选择。 | `src/views/base/oauth-client/**`。 |
21
21
  | `system.code.gen.*` | 代码生成配置、预览、列配置和多语言编辑。 | `src/views/tool/code-gen/**`。 |
22
22
  | `system.cache.*` | 运行时缓存查询、分页结果和条目详情。 | `src/views/tool/cache/**`。 |
23
- | `system.i18n.*` | 动态翻译编辑、草稿生成和语言包状态。 | `src/components/DynamicI18nEditor.vue`、代码生成语言编辑组件。 |
23
+ | `system.i18n.*` | 动态翻译编辑、草稿生成和语言包状态。 | `src/components/i18n/DynamicI18nEditor.vue`、代码生成语言编辑组件。 |
24
24
 
25
25
  语言包由生成的 `generated.ts` 传入 `systemAdminModule.messages`,由 core 的 `registerLocaleMessages` 校验语言键集合、命名空间和占位符后注册到 Vue I18n;业务代码统一使用 `t('system....')` 或 `useLocaleStore()` 读取。
26
26
 
@@ -494,6 +494,7 @@
494
494
  "system.base.login_policy.field.device_blacklist": "Device blacklist",
495
495
  "system.base.login_policy.field.device_whitelist": "Device whitelist",
496
496
  "system.base.login_policy.field.initial_password": "Initial password",
497
+ "system.base.login_policy.field.password_strength": "Password strength",
497
498
  "system.base.login_policy.field.ip_blacklist": "IP blacklist",
498
499
  "system.base.login_policy.field.ip_whitelist": "IP whitelist",
499
500
  "system.base.login_policy.field.lock_duration_minutes": "Lock duration (minutes)",
@@ -892,8 +893,14 @@
892
893
  "system.base.tenant.field.contact_phone": "Contact phone",
893
894
  "system.base.tenant.field.name": "Tenant name",
894
895
  "system.base.tenant.message.phone_invalid": "Enter a valid contact phone number",
896
+ "system.base.tenant.message.initial_credentials": "Tenant created. Admin username: {userName}\nInitial password: {password}\nSave it securely; it cannot be viewed again after closing this dialog.",
897
+ "system.base.tenant.message.initial_credentials_warning": "Save these credentials securely; they cannot be viewed again after closing this dialog.",
895
898
  "system.base.tenant.message.protected_delete": "The default tenant cannot be deleted",
896
899
  "system.base.tenant.message.protected_status": "The default tenant status cannot be changed",
900
+ "system.base.tenant.title.initial_credentials": "Tenant administrator initial credentials",
901
+ "system.base.tenant.tooltip.copy_credentials": "Copy the tenant code, username, and password",
902
+ "system.base.tenant.tooltip.hide_password": "Hide password",
903
+ "system.base.tenant.tooltip.show_password": "Show password",
897
904
  "system.base.user.action.create": "Create user",
898
905
  "system.base.user.action.edit": "Edit user",
899
906
  "system.base.user.action.reset_password": "Reset password",
@@ -1387,7 +1394,7 @@
1387
1394
  "system.profile.login_log.field.client_ip": "Client IP",
1388
1395
  "system.profile.login_log.field.device_id": "Device ID",
1389
1396
  "system.profile.login_log.field.login_type": "Event type",
1390
- "system.profile.login_log.field.occurred_at": "Occurred at",
1397
+ "system.profile.login_log.field.occurred_at": "Login time",
1391
1398
  "system.profile.login_log.field.reason": "Description",
1392
1399
  "system.profile.login_log.field.result": "Result",
1393
1400
  "system.profile.login_log.nav_description": "View account login and logout records",
@@ -1519,5 +1526,41 @@
1519
1526
  "system.runtime.log.value.live_console": "Live console",
1520
1527
  "system.sse.error.auth_expired": "SSE authentication has expired",
1521
1528
  "system.sse.error.connection_closed": "SSE connection closed",
1522
- "system.sse.error.connection_failed": "SSE connection failed: {status}"
1529
+ "system.sse.error.connection_failed": "SSE connection failed: {status}",
1530
+ "system.base.tenant_project.field.name": "Project name",
1531
+ "system.base.tenant_project.field.code": "Project number",
1532
+ "system.base.tenant_project.grant": "Project access",
1533
+ "system.base.tenant_project.all": "All projects",
1534
+ "system.base.tenant_project.projects": "Selected projects",
1535
+ "system.base.tenant_project_grant.title": "Project authorization",
1536
+ "system.base.tenant_project_grant.field.subject_type": "Subject type",
1537
+ "system.base.tenant_project_grant.field.subject": "Subject",
1538
+ "system.base.tenant_project_grant.field.scope": "Authorization scope",
1539
+ "system.base.tenant_project_grant.tooltip.scope": "On: grant this subject access to all projects in the tenant. Off: grant access only to the projects selected below.",
1540
+ "system.base.tenant_project_grant.field.projects": "Projects",
1541
+ "system.base.tenant_project_grant.all_projects": "All projects",
1542
+ "system.base.tenant_project_grant.subject_type.post": "Post",
1543
+ "system.base.tenant_project_grant.subject_type.role": "Role",
1544
+ "system.base.tenant_project_grant.subject_type.dept": "Department",
1545
+ "system.base.tenant_project_grant.subject_type.user": "User",
1546
+ "system.base.i18n_custom.resource": "custom translation",
1547
+ "system.base.i18n_custom.action.create": "Add custom translation",
1548
+ "system.base.i18n_custom.action.edit": "Edit custom translation",
1549
+ "system.base.i18n_custom.field.site": "Site",
1550
+ "system.base.i18n_custom.field.key": "Locale key",
1551
+ "system.base.i18n_custom.field.locale": "Locale",
1552
+ "system.base.i18n_custom.field.default_value": "Default text",
1553
+ "system.base.i18n_custom.field.value": "Custom text",
1554
+ "system.base.i18n_custom.field.status": "Status",
1555
+ "system.base.i18n_custom.field.remark": "Remark",
1556
+ "system.base.i18n_custom.site.system": "System",
1557
+ "system.base.i18n_custom.site.admin": "Admin",
1558
+ "system.base.i18n_custom.site.app": "App",
1559
+ "system.base.i18n_custom.placeholder.site": "Select a site",
1560
+ "system.base.i18n_custom.placeholder.key": "Enter a locale key, such as common.field.project",
1561
+ "system.base.i18n_custom.placeholder.locale": "Select a locale",
1562
+ "system.base.i18n_custom.placeholder.value": "Enter custom text",
1563
+ "system.base.i18n_custom.placeholder.remark": "Enter a remark",
1564
+ "system.base.i18n_custom.message.confirm_status": "Are you sure you want to {action} \"{name}\"?",
1565
+ "system.base.i18n_custom.message.confirm_delete": "Are you sure you want to delete custom translation \"{name}\"?"
1523
1566
  }
@@ -494,6 +494,7 @@
494
494
  "system.base.login_policy.field.device_blacklist": "端末ブラックリスト",
495
495
  "system.base.login_policy.field.device_whitelist": "端末ホワイトリスト",
496
496
  "system.base.login_policy.field.initial_password": "初期パスワード",
497
+ "system.base.login_policy.field.password_strength": "強度のヒント",
497
498
  "system.base.login_policy.field.ip_blacklist": "IP ブラックリスト",
498
499
  "system.base.login_policy.field.ip_whitelist": "IP ホワイトリスト",
499
500
  "system.base.login_policy.field.lock_duration_minutes": "ロック時間(分)",
@@ -892,8 +893,14 @@
892
893
  "system.base.tenant.field.contact_phone": "連絡先番号",
893
894
  "system.base.tenant.field.name": "テナント名",
894
895
  "system.base.tenant.message.phone_invalid": "正しい連絡先番号を入力してください",
896
+ "system.base.tenant.message.initial_credentials": "テナントを作成しました。管理者アカウント: {userName}\n初期パスワード: {password}\n安全に保存してください。このダイアログを閉じると再表示できません。",
897
+ "system.base.tenant.message.initial_credentials_warning": "安全に保存してください。このダイアログを閉じると再表示できません。",
895
898
  "system.base.tenant.message.protected_delete": "デフォルトのテナントは削除できません",
896
899
  "system.base.tenant.message.protected_status": "デフォルトのテナントはステータスを変更できません",
900
+ "system.base.tenant.title.initial_credentials": "テナント管理者の初期認証情報",
901
+ "system.base.tenant.tooltip.copy_credentials": "テナントコード、アカウント、パスワードをコピー",
902
+ "system.base.tenant.tooltip.hide_password": "パスワードを非表示",
903
+ "system.base.tenant.tooltip.show_password": "パスワードを表示",
897
904
  "system.base.user.action.create": "新しいユーザーを追加",
898
905
  "system.base.user.action.edit": "ユーザーの変更",
899
906
  "system.base.user.action.reset_password": "パスワードをリセット",
@@ -1387,7 +1394,7 @@
1387
1394
  "system.profile.login_log.field.client_ip": "クライアントIP",
1388
1395
  "system.profile.login_log.field.device_id": "デバイス識別子",
1389
1396
  "system.profile.login_log.field.login_type": "イベント種別",
1390
- "system.profile.login_log.field.occurred_at": "発生日時",
1397
+ "system.profile.login_log.field.occurred_at": "ログイン日時",
1391
1398
  "system.profile.login_log.field.reason": "説明",
1392
1399
  "system.profile.login_log.field.result": "結果",
1393
1400
  "system.profile.login_log.nav_description": "アカウントのログインとログアウト記録を確認",
@@ -1519,5 +1526,41 @@
1519
1526
  "system.runtime.log.value.live_console": "リアルタイムコンソール",
1520
1527
  "system.sse.error.auth_expired": "SSE 認証の有効期限が切れました",
1521
1528
  "system.sse.error.connection_closed": "SSE 接続が閉じられました",
1522
- "system.sse.error.connection_failed": "SSE 接続に失敗しました: {status}"
1529
+ "system.sse.error.connection_failed": "SSE 接続に失敗しました: {status}",
1530
+ "system.base.tenant_project.field.name": "プロジェクト名",
1531
+ "system.base.tenant_project.field.code": "プロジェクト番号",
1532
+ "system.base.tenant_project.grant": "プロジェクト権限",
1533
+ "system.base.tenant_project.all": "すべてのプロジェクト",
1534
+ "system.base.tenant_project.projects": "指定プロジェクト",
1535
+ "system.base.tenant_project_grant.title": "プロジェクト権限",
1536
+ "system.base.tenant_project_grant.field.subject_type": "権限対象種別",
1537
+ "system.base.tenant_project_grant.field.subject": "権限対象",
1538
+ "system.base.tenant_project_grant.field.scope": "権限範囲",
1539
+ "system.base.tenant_project_grant.tooltip.scope": "オン:この主体に対象テナントの全プロジェクトへのアクセスを付与します。オフ:下で選択したプロジェクトだけにアクセスを付与します。",
1540
+ "system.base.tenant_project_grant.field.projects": "プロジェクト",
1541
+ "system.base.tenant_project_grant.all_projects": "すべてのプロジェクト",
1542
+ "system.base.tenant_project_grant.subject_type.post": "職位",
1543
+ "system.base.tenant_project_grant.subject_type.role": "ロール",
1544
+ "system.base.tenant_project_grant.subject_type.dept": "部門",
1545
+ "system.base.tenant_project_grant.subject_type.user": "ユーザー",
1546
+ "system.base.i18n_custom.resource": "カスタム翻訳",
1547
+ "system.base.i18n_custom.action.create": "カスタム翻訳を追加",
1548
+ "system.base.i18n_custom.action.edit": "カスタム翻訳を編集",
1549
+ "system.base.i18n_custom.field.site": "位置",
1550
+ "system.base.i18n_custom.field.key": "言語キー",
1551
+ "system.base.i18n_custom.field.locale": "言語地域",
1552
+ "system.base.i18n_custom.field.default_value": "既定文言",
1553
+ "system.base.i18n_custom.field.value": "カスタム文言",
1554
+ "system.base.i18n_custom.field.status": "状態",
1555
+ "system.base.i18n_custom.field.remark": "備考",
1556
+ "system.base.i18n_custom.site.system": "システム",
1557
+ "system.base.i18n_custom.site.admin": "管理画面",
1558
+ "system.base.i18n_custom.site.app": "アプリ",
1559
+ "system.base.i18n_custom.placeholder.site": "位置を選択してください",
1560
+ "system.base.i18n_custom.placeholder.key": "言語キーを入力してください。例: common.field.project",
1561
+ "system.base.i18n_custom.placeholder.locale": "言語地域を選択してください",
1562
+ "system.base.i18n_custom.placeholder.value": "カスタム文言を入力してください",
1563
+ "system.base.i18n_custom.placeholder.remark": "備考を入力してください",
1564
+ "system.base.i18n_custom.message.confirm_status": "「{name}」を{action}しますか?",
1565
+ "system.base.i18n_custom.message.confirm_delete": "カスタム翻訳「{name}」を削除しますか?"
1523
1566
  }
@@ -494,6 +494,7 @@
494
494
  "system.base.login_policy.field.device_blacklist": "设备黑名单",
495
495
  "system.base.login_policy.field.device_whitelist": "设备白名单",
496
496
  "system.base.login_policy.field.initial_password": "初始化密码",
497
+ "system.base.login_policy.field.password_strength": "强度提示",
497
498
  "system.base.login_policy.field.ip_blacklist": "IP 黑名单",
498
499
  "system.base.login_policy.field.ip_whitelist": "IP 白名单",
499
500
  "system.base.login_policy.field.lock_duration_minutes": "锁定时长(分钟)",
@@ -892,8 +893,14 @@
892
893
  "system.base.tenant.field.contact_phone": "联系电话",
893
894
  "system.base.tenant.field.name": "租户名称",
894
895
  "system.base.tenant.message.phone_invalid": "请输入正确的联系电话",
896
+ "system.base.tenant.message.initial_credentials": "租户已创建,管理员账号:{userName}\n初始密码:{password}\n请妥善保存,关闭后将无法再次查看。",
897
+ "system.base.tenant.message.initial_credentials_warning": "请妥善保存,关闭后将无法再次查看。",
895
898
  "system.base.tenant.message.protected_delete": "默认租户不能删除",
896
899
  "system.base.tenant.message.protected_status": "默认租户不能修改状态",
900
+ "system.base.tenant.title.initial_credentials": "租户管理员初始凭据",
901
+ "system.base.tenant.tooltip.copy_credentials": "复制租户编号、账号和密码",
902
+ "system.base.tenant.tooltip.hide_password": "隐藏密码",
903
+ "system.base.tenant.tooltip.show_password": "显示密码",
897
904
  "system.base.user.action.create": "新增用户",
898
905
  "system.base.user.action.edit": "修改用户",
899
906
  "system.base.user.action.reset_password": "重置密码",
@@ -1387,7 +1394,7 @@
1387
1394
  "system.profile.login_log.field.client_ip": "客户端IP",
1388
1395
  "system.profile.login_log.field.device_id": "设备标识",
1389
1396
  "system.profile.login_log.field.login_type": "事件类型",
1390
- "system.profile.login_log.field.occurred_at": "发生时间",
1397
+ "system.profile.login_log.field.occurred_at": "登录时间",
1391
1398
  "system.profile.login_log.field.reason": "说明",
1392
1399
  "system.profile.login_log.field.result": "结果",
1393
1400
  "system.profile.login_log.nav_description": "查看账号登录和退出记录",
@@ -1519,5 +1526,41 @@
1519
1526
  "system.runtime.log.value.live_console": "实时控制台",
1520
1527
  "system.sse.error.auth_expired": "SSE 认证已失效",
1521
1528
  "system.sse.error.connection_closed": "SSE 连接已关闭",
1522
- "system.sse.error.connection_failed": "SSE 连接失败:{status}"
1529
+ "system.sse.error.connection_failed": "SSE 连接失败:{status}",
1530
+ "system.base.tenant_project.field.name": "项目名称",
1531
+ "system.base.tenant_project.field.code": "项目编号",
1532
+ "system.base.tenant_project.grant": "项目授权",
1533
+ "system.base.tenant_project.all": "全部项目",
1534
+ "system.base.tenant_project.projects": "指定项目",
1535
+ "system.base.tenant_project_grant.title": "项目授权",
1536
+ "system.base.tenant_project_grant.field.subject_type": "授权类型",
1537
+ "system.base.tenant_project_grant.field.subject": "授权主体",
1538
+ "system.base.tenant_project_grant.field.scope": "授权范围",
1539
+ "system.base.tenant_project_grant.tooltip.scope": "开启:授权该主体访问当前租户的全部项目;关闭:仅授权下方选择的项目。",
1540
+ "system.base.tenant_project_grant.field.projects": "授权项目",
1541
+ "system.base.tenant_project_grant.all_projects": "全部项目",
1542
+ "system.base.tenant_project_grant.subject_type.post": "岗位",
1543
+ "system.base.tenant_project_grant.subject_type.role": "角色",
1544
+ "system.base.tenant_project_grant.subject_type.dept": "部门",
1545
+ "system.base.tenant_project_grant.subject_type.user": "用户",
1546
+ "system.base.i18n_custom.resource": "国际化自定义翻译",
1547
+ "system.base.i18n_custom.action.create": "新增自定义翻译",
1548
+ "system.base.i18n_custom.action.edit": "编辑自定义翻译",
1549
+ "system.base.i18n_custom.field.site": "位置",
1550
+ "system.base.i18n_custom.field.key": "语言键",
1551
+ "system.base.i18n_custom.field.locale": "语言区域",
1552
+ "system.base.i18n_custom.field.default_value": "默认文案",
1553
+ "system.base.i18n_custom.field.value": "自定义文案",
1554
+ "system.base.i18n_custom.field.status": "状态",
1555
+ "system.base.i18n_custom.field.remark": "备注",
1556
+ "system.base.i18n_custom.site.system": "系统端",
1557
+ "system.base.i18n_custom.site.admin": "管理端",
1558
+ "system.base.i18n_custom.site.app": "应用端",
1559
+ "system.base.i18n_custom.placeholder.site": "请选择位置",
1560
+ "system.base.i18n_custom.placeholder.key": "请输入语言键,例如 common.field.project",
1561
+ "system.base.i18n_custom.placeholder.locale": "请选择语言区域",
1562
+ "system.base.i18n_custom.placeholder.value": "请输入自定义文案",
1563
+ "system.base.i18n_custom.placeholder.remark": "请输入备注",
1564
+ "system.base.i18n_custom.message.confirm_status": "确定将“{name}”{action}吗?",
1565
+ "system.base.i18n_custom.message.confirm_delete": "确定删除自定义翻译“{name}”吗?"
1523
1566
  }
@@ -494,6 +494,7 @@
494
494
  "system.base.login_policy.field.device_blacklist": "裝置黑名單",
495
495
  "system.base.login_policy.field.device_whitelist": "裝置白名單",
496
496
  "system.base.login_policy.field.initial_password": "初始化密碼",
497
+ "system.base.login_policy.field.password_strength": "強度提示",
497
498
  "system.base.login_policy.field.ip_blacklist": "IP 黑名單",
498
499
  "system.base.login_policy.field.ip_whitelist": "IP 白名單",
499
500
  "system.base.login_policy.field.lock_duration_minutes": "鎖定時長(分鐘)",
@@ -892,8 +893,14 @@
892
893
  "system.base.tenant.field.contact_phone": "聯絡電話",
893
894
  "system.base.tenant.field.name": "租戶名稱",
894
895
  "system.base.tenant.message.phone_invalid": "請輸入正確的聯絡電話",
896
+ "system.base.tenant.message.initial_credentials": "租戶已建立,管理員賬號:{userName}\n初始密碼:{password}\n請妥善保存,關閉後將無法再次查看。",
897
+ "system.base.tenant.message.initial_credentials_warning": "請妥善保存,關閉後將無法再次查看。",
895
898
  "system.base.tenant.message.protected_delete": "預設租戶不能刪除",
896
899
  "system.base.tenant.message.protected_status": "預設租戶不能修改狀態",
900
+ "system.base.tenant.title.initial_credentials": "租戶管理員初始憑據",
901
+ "system.base.tenant.tooltip.copy_credentials": "複製租戶編號、賬號和密碼",
902
+ "system.base.tenant.tooltip.hide_password": "隱藏密碼",
903
+ "system.base.tenant.tooltip.show_password": "顯示密碼",
897
904
  "system.base.user.action.create": "新增使用者",
898
905
  "system.base.user.action.edit": "修改使用者",
899
906
  "system.base.user.action.reset_password": "重置密碼",
@@ -1387,7 +1394,7 @@
1387
1394
  "system.profile.login_log.field.client_ip": "用戶端 IP",
1388
1395
  "system.profile.login_log.field.device_id": "裝置識別碼",
1389
1396
  "system.profile.login_log.field.login_type": "事件類型",
1390
- "system.profile.login_log.field.occurred_at": "發生時間",
1397
+ "system.profile.login_log.field.occurred_at": "登入時間",
1391
1398
  "system.profile.login_log.field.reason": "說明",
1392
1399
  "system.profile.login_log.field.result": "結果",
1393
1400
  "system.profile.login_log.nav_description": "查看帳號登入與登出記錄",
@@ -1519,5 +1526,41 @@
1519
1526
  "system.runtime.log.value.live_console": "即時主控台",
1520
1527
  "system.sse.error.auth_expired": "SSE 驗證已失效",
1521
1528
  "system.sse.error.connection_closed": "SSE 連線已關閉",
1522
- "system.sse.error.connection_failed": "SSE 連線失敗:{status}"
1529
+ "system.sse.error.connection_failed": "SSE 連線失敗:{status}",
1530
+ "system.base.tenant_project.field.name": "專案名稱",
1531
+ "system.base.tenant_project.field.code": "專案編號",
1532
+ "system.base.tenant_project.grant": "專案授權",
1533
+ "system.base.tenant_project.all": "全部專案",
1534
+ "system.base.tenant_project.projects": "指定專案",
1535
+ "system.base.tenant_project_grant.title": "專案授權",
1536
+ "system.base.tenant_project_grant.field.subject_type": "授權類型",
1537
+ "system.base.tenant_project_grant.field.subject": "授權主體",
1538
+ "system.base.tenant_project_grant.field.scope": "授權範圍",
1539
+ "system.base.tenant_project_grant.tooltip.scope": "開啟:授予此主體目前租戶的全部專案權限;關閉:僅授予下方選取的專案權限。",
1540
+ "system.base.tenant_project_grant.field.projects": "授權專案",
1541
+ "system.base.tenant_project_grant.all_projects": "全部專案",
1542
+ "system.base.tenant_project_grant.subject_type.post": "職位",
1543
+ "system.base.tenant_project_grant.subject_type.role": "角色",
1544
+ "system.base.tenant_project_grant.subject_type.dept": "部門",
1545
+ "system.base.tenant_project_grant.subject_type.user": "使用者",
1546
+ "system.base.i18n_custom.resource": "自訂翻譯",
1547
+ "system.base.i18n_custom.action.create": "新增自訂翻譯",
1548
+ "system.base.i18n_custom.action.edit": "編輯自訂翻譯",
1549
+ "system.base.i18n_custom.field.site": "位置",
1550
+ "system.base.i18n_custom.field.key": "語言鍵",
1551
+ "system.base.i18n_custom.field.locale": "語言區域",
1552
+ "system.base.i18n_custom.field.default_value": "預設文案",
1553
+ "system.base.i18n_custom.field.value": "自訂文案",
1554
+ "system.base.i18n_custom.field.status": "狀態",
1555
+ "system.base.i18n_custom.field.remark": "備註",
1556
+ "system.base.i18n_custom.site.system": "系統端",
1557
+ "system.base.i18n_custom.site.admin": "管理端",
1558
+ "system.base.i18n_custom.site.app": "應用端",
1559
+ "system.base.i18n_custom.placeholder.site": "請選擇位置",
1560
+ "system.base.i18n_custom.placeholder.key": "請輸入語言鍵,例如 common.field.project",
1561
+ "system.base.i18n_custom.placeholder.locale": "請選擇語言區域",
1562
+ "system.base.i18n_custom.placeholder.value": "請輸入自訂文案",
1563
+ "system.base.i18n_custom.placeholder.remark": "請輸入備註",
1564
+ "system.base.i18n_custom.message.confirm_status": "確定要將「{name}」{action}嗎?",
1565
+ "system.base.i18n_custom.message.confirm_delete": "確定要刪除自訂翻譯「{name}」嗎?"
1523
1566
  }
@@ -1,8 +1,8 @@
1
1
  import type { Component } from "vue";
2
2
  import { defineAdminModule } from "@liujitcn/kratos-admin-core";
3
- import Ai from "./components/Ai.vue";
4
- import ForcedPasswordDialog from "./components/ForcedPasswordDialog.vue";
5
- import Notification from "./components/Notification.vue";
3
+ import Ai from "./components/ai/Ai.vue";
4
+ import ForcedPasswordDialog from "./components/account/ForcedPasswordDialog.vue";
5
+ import Notification from "./components/notification/Notification.vue";
6
6
 
7
7
  // 语言包由同步脚本生成并注册,供 System 页面、组件和代码生成页面使用。
8
8
  import { LOCALE_MESSAGES } from "./locales/generated";
@@ -40,6 +40,18 @@ export interface GetConfigResponse {
40
40
  configs: ConfigItem[];
41
41
  /** AI 助手是否可用 */
42
42
  ai_enabled: boolean;
43
+ /** 全部语言的自定义国际化覆盖项 */
44
+ i18n_customs: I18nCustomItem[];
45
+ }
46
+
47
+ /** 全部语言的自定义国际化覆盖项。 */
48
+ export interface I18nCustomItem {
49
+ /** 语言区域 */
50
+ locale: string;
51
+ /** 国际化语言键 */
52
+ key: string;
53
+ /** 自定义翻译内容 */
54
+ value: string;
43
55
  }
44
56
 
45
57
  /** Base系统配置公共服务 */
@@ -0,0 +1,126 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc unknown
5
+ // source: system/admin/v1/base_i18n_custom.proto
6
+
7
+ /* eslint-disable */
8
+ import type { BaseConfigSite } from "../../../base/v1/config";
9
+ import type { Status } from "../../../common/v1/enum";
10
+ import type { Empty } from "../../../google/protobuf/empty";
11
+
12
+ /** 国际化自定义翻译分页查询条件。 */
13
+ export interface PageBaseI18nCustomRequest {
14
+ /** 位置:枚举【BaseConfigSite】 */
15
+ site?:
16
+ | BaseConfigSite
17
+ | undefined;
18
+ /** 国际化语言键 */
19
+ key: string;
20
+ /** 语言区域 */
21
+ locale: string;
22
+ /** 状态:枚举【Status】 */
23
+ status?:
24
+ | Status
25
+ | undefined;
26
+ /** 当前页码 */
27
+ page_num: number;
28
+ /** 每页数量 */
29
+ page_size: number;
30
+ }
31
+
32
+ /** 国际化自定义翻译分页响应。 */
33
+ export interface PageBaseI18nCustomResponse {
34
+ /** 国际化自定义翻译列表 */
35
+ items: BaseI18nCustom[];
36
+ /** 总数 */
37
+ total: number;
38
+ }
39
+
40
+ /** 国际化自定义翻译详情查询条件。 */
41
+ export interface GetBaseI18nCustomRequest {
42
+ /** 国际化自定义翻译ID */
43
+ id: number;
44
+ }
45
+
46
+ /** 国际化自定义翻译表单。 */
47
+ export interface BaseI18nCustomForm {
48
+ /** 国际化自定义翻译ID */
49
+ id: number;
50
+ /** 位置:枚举【BaseConfigSite】 */
51
+ site: BaseConfigSite;
52
+ /** 国际化语言键 */
53
+ key: string;
54
+ /** 语言区域 */
55
+ locale: string;
56
+ /** 自定义翻译内容 */
57
+ value: string;
58
+ /** 状态 */
59
+ status: Status;
60
+ /** 备注 */
61
+ remark: string;
62
+ }
63
+
64
+ /** 创建国际化自定义翻译请求。 */
65
+ export interface CreateBaseI18nCustomRequest {
66
+ /** 国际化自定义翻译表单 */
67
+ i18n_custom: BaseI18nCustomForm | undefined;
68
+ }
69
+
70
+ /** 更新国际化自定义翻译请求。 */
71
+ export interface UpdateBaseI18nCustomRequest {
72
+ /** 国际化自定义翻译表单 */
73
+ i18n_custom: BaseI18nCustomForm | undefined;
74
+ }
75
+
76
+ /** 删除国际化自定义翻译请求。 */
77
+ export interface DeleteBaseI18nCustomRequest {
78
+ /** 国际化自定义翻译ID列表 */
79
+ id: string;
80
+ }
81
+
82
+ /** 设置国际化自定义翻译状态请求。 */
83
+ export interface SetBaseI18nCustomStatusRequest {
84
+ /** 国际化自定义翻译ID */
85
+ id: number;
86
+ /** 状态 */
87
+ status: Status;
88
+ }
89
+
90
+ /** 国际化自定义翻译信息。 */
91
+ export interface BaseI18nCustom {
92
+ /** 国际化自定义翻译ID */
93
+ id: number;
94
+ /** 位置:枚举【BaseConfigSite】 */
95
+ site: BaseConfigSite;
96
+ /** 国际化语言键 */
97
+ key: string;
98
+ /** 语言区域 */
99
+ locale: string;
100
+ /** 自定义翻译内容 */
101
+ value: string;
102
+ /** 状态 */
103
+ status: Status;
104
+ /** 备注 */
105
+ remark: string;
106
+ /** 创建时间 */
107
+ created_at: string;
108
+ /** 更新时间 */
109
+ updated_at: string;
110
+ }
111
+
112
+ /** Admin国际化自定义翻译信息服务。 */
113
+ export interface BaseI18nCustomService {
114
+ /** 查询国际化自定义翻译分页列表。 */
115
+ PageBaseI18nCustom(request: PageBaseI18nCustomRequest): Promise<PageBaseI18nCustomResponse>;
116
+ /** 查询国际化自定义翻译详情。 */
117
+ GetBaseI18nCustom(request: GetBaseI18nCustomRequest): Promise<BaseI18nCustomForm>;
118
+ /** 创建国际化自定义翻译。 */
119
+ CreateBaseI18nCustom(request: CreateBaseI18nCustomRequest): Promise<Empty>;
120
+ /** 更新国际化自定义翻译。 */
121
+ UpdateBaseI18nCustom(request: UpdateBaseI18nCustomRequest): Promise<Empty>;
122
+ /** 删除国际化自定义翻译。 */
123
+ DeleteBaseI18nCustom(request: DeleteBaseI18nCustomRequest): Promise<Empty>;
124
+ /** 设置国际化自定义翻译状态。 */
125
+ SetBaseI18nCustomStatus(request: SetBaseI18nCustomStatusRequest): Promise<Empty>;
126
+ }
@@ -51,6 +51,16 @@ export interface CreateBaseTenantRequest {
51
51
  base_tenant: BaseTenantForm | undefined;
52
52
  }
53
53
 
54
+ /** 创建租户响应参数 */
55
+ export interface CreateBaseTenantResponse {
56
+ /** 租户编号 */
57
+ tenant_code: string;
58
+ /** 租户管理员账号 */
59
+ admin_user_name: string;
60
+ /** 租户管理员初始密码,仅在随机生成时返回 */
61
+ initial_password: string;
62
+ }
63
+
54
64
  /** 更新租户请求参数 */
55
65
  export interface UpdateBaseTenantRequest {
56
66
  /** 租户表单 */
@@ -124,7 +134,7 @@ export interface BaseTenantService {
124
134
  /** 查询租户 */
125
135
  GetBaseTenant(request: GetBaseTenantRequest): Promise<BaseTenantForm>;
126
136
  /** 创建租户 */
127
- CreateBaseTenant(request: CreateBaseTenantRequest): Promise<Empty>;
137
+ CreateBaseTenant(request: CreateBaseTenantRequest): Promise<CreateBaseTenantResponse>;
128
138
  /** 更新租户 */
129
139
  UpdateBaseTenant(request: UpdateBaseTenantRequest): Promise<Empty>;
130
140
  /** 删除租户 */