@kevairy/template 0.1.2 → 0.1.4

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 (95) hide show
  1. package/package.json +1 -1
  2. package/template/.env +4 -0
  3. package/template/.env.production +6 -0
  4. package/template/.prettierignore +2 -0
  5. package/template/_gitignore +4 -1
  6. package/template/package.json +10 -0
  7. package/template/scripts/gen-offline-icons.mjs +84 -0
  8. package/template/src/adapters/auth/index.ts +1 -1
  9. package/template/src/adapters/auth/types.ts +6 -1
  10. package/template/src/api/auth.ts +3 -2
  11. package/template/src/components/core/forms/art-wang-editor/index.vue +0 -5
  12. package/template/src/components/core/layouts/art-guide/index.vue +131 -0
  13. package/template/src/components/core/layouts/art-header-bar/index.vue +26 -26
  14. package/template/src/components/core/layouts/art-header-bar/widget/ArtUserMenu.vue +17 -1
  15. package/template/src/components/core/layouts/art-page-content/index.vue +8 -1
  16. package/template/src/components/core/layouts/art-screen-lock/index.vue +325 -0
  17. package/template/src/components/core/layouts/art-settings-panel/widget/SettingActions.vue +0 -1
  18. package/template/src/components/core/media/art-cutter-img/index.vue +0 -1
  19. package/template/src/components/core/media/art-video-player/index.vue +0 -10
  20. package/template/src/config/index.ts +8 -1
  21. package/template/src/config/modules/component.ts +14 -0
  22. package/template/src/config/modules/guide.ts +122 -0
  23. package/template/src/config/modules/headerBar.ts +4 -0
  24. package/template/src/config/setting.ts +2 -2
  25. package/template/src/directives/core/access.ts +125 -0
  26. package/template/src/directives/core/auth.ts +7 -62
  27. package/template/src/directives/core/roles.ts +5 -83
  28. package/template/src/env.d.ts +1 -0
  29. package/template/src/hooks/core/useAuth.ts +2 -74
  30. package/template/src/hooks/core/useGuide.ts +122 -0
  31. package/template/src/hooks/core/useHeaderBar.ts +6 -0
  32. package/template/src/hooks/core/usePermission.ts +41 -0
  33. package/template/src/hooks/index.ts +1 -0
  34. package/template/src/locales/index.ts +0 -1
  35. package/template/src/locales/langs/en.json +77 -6
  36. package/template/src/locales/langs/zh.json +77 -6
  37. package/template/src/main.ts +19 -9
  38. package/template/src/router/core/IframeRouteManager.ts +4 -2
  39. package/template/src/router/core/MenuProcessor.ts +5 -40
  40. package/template/src/router/core/RoutePermissionValidator.ts +6 -149
  41. package/template/src/router/core/access.ts +79 -0
  42. package/template/src/router/guards/afterEach.ts +6 -10
  43. package/template/src/router/guards/beforeEach.ts +143 -100
  44. package/template/src/router/guards/error.ts +42 -0
  45. package/template/src/router/index.ts +2 -0
  46. package/template/src/router/modules/examples.ts +4 -3
  47. package/template/src/router/routes/staticRoutes.ts +5 -3
  48. package/template/src/services/auth.ts +32 -10
  49. package/template/src/services/permission.ts +21 -0
  50. package/template/src/store/modules/lock.ts +125 -0
  51. package/template/src/store/modules/menu.ts +28 -8
  52. package/template/src/store/modules/setting.ts +8 -15
  53. package/template/src/store/modules/user.ts +73 -33
  54. package/template/src/store/modules/worktab.ts +1 -1
  55. package/template/src/types/api/api.d.ts +4 -1
  56. package/template/src/types/config/index.ts +9 -0
  57. package/template/src/types/directive/directive.d.ts +1 -0
  58. package/template/src/types/import/components.d.ts +2 -0
  59. package/template/src/types/router/index.ts +6 -0
  60. package/template/src/utils/http/contract.ts +51 -19
  61. package/template/src/utils/http/error.ts +73 -26
  62. package/template/src/utils/http/index.ts +160 -165
  63. package/template/src/utils/http/request-manager.ts +124 -0
  64. package/template/src/utils/http/status.ts +1 -0
  65. package/template/src/utils/permission/index.ts +66 -0
  66. package/template/src/utils/session.ts +24 -0
  67. package/template/src/utils/socket/index.ts +27 -2
  68. package/template/src/utils/storage/storage-config.ts +15 -0
  69. package/template/src/utils/storage/storage.ts +5 -3
  70. package/template/src/utils/sys/diagnostics.ts +180 -0
  71. package/template/src/utils/sys/error-handle.ts +56 -126
  72. package/template/src/utils/sys/mittBus.ts +5 -0
  73. package/template/src/utils/sys/recovery.ts +31 -0
  74. package/template/src/utils/ui/iconify-loader.ts +32 -18
  75. package/template/src/utils/ui/offline-icons.json +77 -0
  76. package/template/src/views/examples/permissions/index.vue +69 -13
  77. package/template/src/views/examples/search-table/index.vue +2 -3
  78. package/template/src/views/exception/403/index.vue +33 -0
  79. package/template/src/views/exception/500/index.vue +52 -10
  80. package/template/tests/e2e/auth.spec.ts +24 -6
  81. package/template/tests/e2e/helpers/guide.ts +9 -0
  82. package/template/tests/e2e/permissions.spec.ts +53 -0
  83. package/template/tests/e2e/search-table.spec.ts +2 -0
  84. package/template/tests/e2e/session-recovery.spec.ts +49 -0
  85. package/template/tests/unit/diagnostics/diagnostics.spec.ts +132 -0
  86. package/template/tests/unit/diagnostics/router.spec.ts +84 -0
  87. package/template/tests/unit/http/auth-lifecycle.spec.ts +203 -0
  88. package/template/tests/unit/http/contract.spec.ts +46 -0
  89. package/template/tests/unit/http/request.spec.ts +487 -0
  90. package/template/tests/unit/permissions/guard.spec.ts +261 -0
  91. package/template/tests/unit/permissions/guide.spec.ts +30 -0
  92. package/template/tests/unit/permissions/rules.spec.ts +106 -0
  93. package/template/tests/unit/permissions/state-and-directives.spec.ts +176 -0
  94. package/template/tests/unit/router/examples.spec.ts +5 -1
  95. package/template/vite.config.ts +8 -2
@@ -1,66 +1,11 @@
1
- /**
2
- * v-auth 权限指令
3
- *
4
- * 适用于后端权限控制模式,基于权限标识控制 DOM 元素的显示和隐藏。
5
- * 如果用户没有对应权限,元素将从 DOM 中移除。
6
- *
7
- * ## 主要功能
8
- *
9
- * - 权限验证 - 根据路由 meta 中的权限列表验证用户权限
10
- * - DOM 控制 - 无权限时自动移除元素,而非隐藏
11
- * - 响应式更新 - 权限变化时自动更新元素状态
12
- *
13
- * ## 使用示例
14
- *
15
- * ```vue
16
- * <!-- 只有拥有 'add' 权限的用户才能看到新增按钮 -->
17
- * <el-button v-auth="'add'">新增</el-button>
18
- *
19
- * <!-- 只有拥有 'edit' 权限的用户才能看到编辑按钮 -->
20
- * <el-button v-auth="'edit'">编辑</el-button>
21
- *
22
- * <!-- 只有拥有 'delete' 权限的用户才能看到删除按钮 -->
23
- * <el-button v-auth="'delete'">删除</el-button>
24
- * ```
25
- *
26
- * ## 注意事项
27
- *
28
- * - 该指令会直接移除 DOM 元素,而不是使用 v-if 隐藏
29
- * - 权限列表从当前路由的 meta.authList 中获取
30
- *
31
- * @module directives/auth
32
- * @author Art Design Pro Team
33
- */
1
+ import type { App, Directive } from 'vue'
2
+ import type { PermissionRequirement } from '@/utils/permission'
3
+ import { createAccessDirective } from './access'
34
4
 
35
- import { router } from '@/router'
36
- import { App, Directive, DirectiveBinding } from 'vue'
37
-
38
- export type AuthDirective = Directive<HTMLElement, string>
39
-
40
- function checkAuthPermission(el: HTMLElement, binding: DirectiveBinding<string>): void {
41
- // 获取当前路由的权限列表
42
- const authList = (router.currentRoute.value.meta.authList as Array<{ authMark: string }>) || []
43
-
44
- // 检查是否有对应的权限标识
45
- const hasPermission = authList.some((item) => item.authMark === binding.value)
46
-
47
- // 如果没有权限,移除元素
48
- if (!hasPermission) {
49
- removeElement(el)
50
- }
51
- }
52
-
53
- function removeElement(el: HTMLElement): void {
54
- if (el.parentNode) {
55
- el.parentNode.removeChild(el)
56
- }
57
- }
58
-
59
- const authDirective: AuthDirective = {
60
- mounted: checkAuthPermission,
61
- updated: checkAuthPermission
62
- }
5
+ export type AuthDirective = Directive<HTMLElement, PermissionRequirement>
63
6
 
7
+ /** v-permission 为标准入口,v-auth 保留兼容;支持 .all 与 .disabled。 */
64
8
  export function setupAuthDirective(app: App): void {
65
- app.directive('auth', authDirective)
9
+ app.directive('permission', createAccessDirective())
10
+ app.directive('auth', createAccessDirective())
66
11
  }
@@ -1,87 +1,9 @@
1
- /**
2
- * v-roles 角色权限指令
3
- *
4
- * 基于用户角色控制 DOM 元素的显示和隐藏。
5
- * 只要用户拥有指定角色中的任意一个,元素就会显示,否则从 DOM 中移除。
6
- *
7
- * ## 主要功能
8
- *
9
- * - 角色验证 - 检查用户是否拥有指定角色
10
- * - 多角色支持 - 支持单个角色或多个角色(满足其一即可)
11
- * - DOM 控制 - 无权限时自动移除元素,而非隐藏
12
- * - 响应式更新 - 角色变化时自动更新元素状态
13
- *
14
- * ## 使用示例
15
- *
16
- * ```vue
17
- * <template>
18
- * <!-- 单个角色 - 只有超级管理员可见 -->
19
- * <el-button v-roles="'R_SUPER'">超级管理员功能</el-button>
20
- *
21
- * <!-- 多个角色 - 超级管理员或普通管理员可见 -->
22
- * <el-button v-roles="['R_SUPER', 'R_ADMIN']">管理员功能</el-button>
23
- *
24
- * <!-- 应用到任意元素 -->
25
- * <div v-roles="['R_SUPER', 'R_ADMIN', 'R_USER']">
26
- * 所有登录用户可见的内容
27
- * </div>
28
- * </template>
29
- * ```
30
- *
31
- * ## 权限逻辑
32
- *
33
- * - 用户角色从 userStore.getUserInfo.roles 获取
34
- * - 只要用户拥有指定角色中的任意一个,元素就会显示
35
- * - 如果用户没有任何角色或不满足条件,元素将被移除
36
- *
37
- * ## 注意事项
38
- *
39
- * - 该指令会直接移除 DOM 元素,而不是使用 v-if 隐藏
40
- * - 适用于基于角色的粗粒度权限控制
41
- * - 如需基于具体操作的细粒度权限控制,请使用 v-auth 指令
42
- *
43
- * @module directives/roles
44
- * @author Art Design Pro Team
45
- */
1
+ import type { App, Directive } from 'vue'
2
+ import type { PermissionRequirement } from '@/utils/permission'
3
+ import { createAccessDirective } from './access'
46
4
 
47
- import { useUserStore } from '@/store/modules/user'
48
- import { App, Directive, DirectiveBinding } from 'vue'
49
-
50
- export type RolesDirective = Directive<HTMLElement, string | string[]>
51
-
52
- function checkRolePermission(el: HTMLElement, binding: DirectiveBinding<string | string[]>): void {
53
- const userStore = useUserStore()
54
- const userRoles = userStore.getUserInfo.roles
55
-
56
- // 如果用户角色为空或未定义,移除元素
57
- if (!userRoles?.length) {
58
- removeElement(el)
59
- return
60
- }
61
-
62
- // 确保指令值为数组格式
63
- const requiredRoles = Array.isArray(binding.value) ? binding.value : [binding.value]
64
-
65
- // 检查用户是否具有所需角色之一
66
- const hasPermission = requiredRoles.some((role: string) => userRoles.includes(role))
67
-
68
- // 如果没有权限,安全地移除元素
69
- if (!hasPermission) {
70
- removeElement(el)
71
- }
72
- }
73
-
74
- function removeElement(el: HTMLElement): void {
75
- if (el.parentNode) {
76
- el.parentNode.removeChild(el)
77
- }
78
- }
79
-
80
- const rolesDirective: RolesDirective = {
81
- mounted: checkRolePermission,
82
- updated: checkRolePermission
83
- }
5
+ export type RolesDirective = Directive<HTMLElement, PermissionRequirement>
84
6
 
85
7
  export function setupRolesDirective(app: App): void {
86
- app.directive('roles', rolesDirective)
8
+ app.directive('roles', createAccessDirective(true))
87
9
  }
@@ -30,3 +30,4 @@ declare module 'qrcode.vue' {
30
30
 
31
31
  // 全局变量声明
32
32
  declare const __APP_VERSION__: string // 版本号
33
+ declare const __BUILD_ID__: string // 每次构建的唯一标识,可由 CI 注入
@@ -1,74 +1,2 @@
1
- /**
2
- * useAuth - 权限验证管理
3
- *
4
- * 提供统一的权限验证功能,支持前端和后端两种权限模式。
5
- * 用于控制页面按钮、操作等功能的显示和访问权限。
6
- *
7
- * ## 主要功能
8
- *
9
- * 1. 权限检查 - 检查用户是否拥有指定的权限标识
10
- * 2. 双模式支持 - 自动适配前端模式和后端模式的权限验证
11
- * 3. 前端模式 - 从用户信息中获取按钮权限列表(如 ['add', 'edit', 'delete'])
12
- * 4. 后端模式 - 从路由 meta 配置中获取权限列表(如 [{ authMark: 'add' }])
13
- *
14
- * ## 使用示例
15
- *
16
- * ```typescript
17
- * const { hasAuth } = useAuth()
18
- *
19
- * // 检查是否有新增权限
20
- * if (hasAuth('add')) {
21
- * // 显示新增按钮
22
- * }
23
- *
24
- * // 在模板中使用
25
- * <el-button v-if="hasAuth('edit')">编辑</el-button>
26
- * <el-button v-if="hasAuth('delete')">删除</el-button>
27
- * ```
28
- *
29
- * @module useAuth
30
- * @author Art Design Pro Team
31
- */
32
-
33
- import { useRoute } from 'vue-router'
34
- import { storeToRefs } from 'pinia'
35
- import { useUserStore } from '@/store/modules/user'
36
- import { useAppMode } from '@/hooks/core/useAppMode'
37
- import type { AppRouteRecord } from '@/types/router'
38
-
39
- type AuthItem = NonNullable<AppRouteRecord['meta']['authList']>[number]
40
-
41
- const userStore = useUserStore()
42
-
43
- export const useAuth = () => {
44
- const route = useRoute()
45
- const { isFrontendMode } = useAppMode()
46
- const { info } = storeToRefs(userStore)
47
-
48
- // 前端按钮权限(例如:['add', 'edit'])
49
- const frontendAuthList = info.value?.buttons ?? []
50
-
51
- // 后端路由 meta 配置的权限列表(例如:[{ authMark: 'add' }])
52
- const backendAuthList: AuthItem[] = Array.isArray(route.meta.authList)
53
- ? (route.meta.authList as AuthItem[])
54
- : []
55
-
56
- /**
57
- * 检查是否拥有某权限标识(前后端模式通用)
58
- * @param auth 权限标识
59
- * @returns 是否有权限
60
- */
61
- const hasAuth = (auth: string): boolean => {
62
- // 前端模式
63
- if (isFrontendMode.value) {
64
- return frontendAuthList.includes(auth)
65
- }
66
-
67
- // 后端模式
68
- return backendAuthList.some((item) => item?.authMark === auth)
69
- }
70
-
71
- return {
72
- hasAuth
73
- }
74
- }
1
+ /** 兼容原有 hasAuth 调用;新页面优先使用 usePermission。 */
2
+ export { usePermission as useAuth } from './usePermission'
@@ -0,0 +1,122 @@
1
+ /**
2
+ * useGuide - 新手引导逻辑
3
+ *
4
+ * 基于 driver.js 封装新手引导的启动与销毁,步骤内容集中来自 config/modules/guide。
5
+ *
6
+ * ## 主要功能
7
+ *
8
+ * 1. 步骤构建 - 依据功能开关与锚点元素存在性动态过滤步骤
9
+ * 2. 国际化 - 标题/描述/按钮文案结合当前语言实时渲染
10
+ * 3. 生命周期 - 启动时创建实例,销毁时标记引导已完成
11
+ * 4. 单例保护 - 重复启动前销毁旧实例,避免遮罩叠加
12
+ *
13
+ * ## 使用示例
14
+ *
15
+ * ```typescript
16
+ * const { start, destroy } = useGuide()
17
+ *
18
+ * // 启动引导(首次自动或用户手动触发)
19
+ * start()
20
+ *
21
+ * // 组件卸载时销毁
22
+ * destroy()
23
+ * ```
24
+ *
25
+ * @module useGuide
26
+ * @author Art Design Pro Team
27
+ */
28
+
29
+ import { driver } from 'driver.js'
30
+ import type { DriveStep, Driver, Popover } from 'driver.js'
31
+ import { useI18n } from 'vue-i18n'
32
+ import { guideSteps } from '@/config/modules/guide'
33
+ import { useSettingStore } from '@/store/modules/setting'
34
+ import AppConfig from '@/config'
35
+
36
+ export function useGuide() {
37
+ const { t } = useI18n()
38
+ const settingStore = useSettingStore()
39
+
40
+ /** driver.js 实例,未启动时为 null */
41
+ let driverInstance: Driver | null = null
42
+
43
+ /**
44
+ * 构建实际播放的步骤
45
+ *
46
+ * 过滤规则:
47
+ * - 关联了 feature 但该功能未启用 -> 跳过
48
+ * - 声明了 element 但页面上找不到该锚点 -> 跳过
49
+ * 居中欢迎弹窗(无 element、无 feature)始终保留。
50
+ */
51
+ const buildSteps = (): DriveStep[] => {
52
+ return guideSteps
53
+ .filter((step) => !step.feature || AppConfig.features[step.feature])
54
+ .filter((step) => !step.element || document.querySelector(step.element))
55
+ .map((step) => {
56
+ const popover: Popover = {
57
+ title: t(step.titleKey),
58
+ description: t(step.descKey)
59
+ }
60
+ if (step.side) popover.side = step.side
61
+ if (step.align) popover.align = step.align
62
+
63
+ const driveStep: DriveStep = { popover }
64
+ if (step.element) driveStep.element = step.element
65
+ return driveStep
66
+ })
67
+ }
68
+
69
+ /**
70
+ * 销毁当前引导实例(若存在)
71
+ */
72
+ const destroy = (): void => {
73
+ if (driverInstance) {
74
+ driverInstance.destroy()
75
+ driverInstance = null
76
+ }
77
+ }
78
+
79
+ /**
80
+ * 启动新手引导
81
+ *
82
+ * 每次启动都会重新构建步骤,确保功能开关、锚点与语言为最新状态。
83
+ * 引导结束(完成或跳过)时通过 onDestroyed 标记 hasCompletedGuide。
84
+ */
85
+ const start = (): void => {
86
+ // 避免重复实例叠加遮罩
87
+ destroy()
88
+
89
+ const steps = buildSteps()
90
+ if (steps.length === 0) return
91
+
92
+ driverInstance = driver({
93
+ steps,
94
+ showProgress: true,
95
+ allowClose: true,
96
+ stagePadding: 6,
97
+ stageRadius: 8,
98
+ popoverClass: 'art-guide-popover',
99
+ nextBtnText: t('guide.buttons.next'),
100
+ prevBtnText: t('guide.buttons.prev'),
101
+ doneBtnText: t('guide.buttons.done'),
102
+ closeBtnLabel: t('guide.buttons.close'),
103
+ // 欢迎步骤尚在动画中时,driver.js 可能不触发 onDestroyed。
104
+ // 用户主动结束引导时先记录完成,再执行无拦截的实例销毁。
105
+ onDestroyStarted: () => {
106
+ settingStore.completeGuide()
107
+ destroy()
108
+ },
109
+ onDestroyed: () => {
110
+ settingStore.completeGuide()
111
+ driverInstance = null
112
+ }
113
+ })
114
+
115
+ driverInstance.drive()
116
+ }
117
+
118
+ return {
119
+ start, // 启动引导
120
+ destroy // 销毁引导
121
+ }
122
+ }
@@ -108,6 +108,11 @@ export function useHeaderBar() {
108
108
  return isFeatureEnabled('themeToggle')
109
109
  })
110
110
 
111
+ // 检查锁屏按钮是否显示
112
+ const shouldShowScreenLock = computed(() => {
113
+ return isFeatureEnabled('screenLock')
114
+ })
115
+
111
116
  // 获取快速入口的最小宽度
112
117
  const fastEnterMinWidth = computed(() => {
113
118
  const config = getFeatureConfig('fastEnter')
@@ -184,6 +189,7 @@ export function useHeaderBar() {
184
189
  shouldShowLanguage, // 是否显示语言切换
185
190
  shouldShowSettings, // 是否显示设置面板
186
191
  shouldShowThemeToggle, // 是否显示主题切换
192
+ shouldShowScreenLock, // 是否显示锁屏按钮
187
193
 
188
194
  // 配置相关
189
195
  fastEnterMinWidth, // 快速入口最小宽度
@@ -0,0 +1,41 @@
1
+ import { computed } from 'vue'
2
+ import { useUserStore } from '@/store/modules/user'
3
+ import AppConfig from '@/config'
4
+ import {
5
+ matchesGrants,
6
+ warnInvalidRequirement,
7
+ type PermissionRequirement,
8
+ type PermissionMode
9
+ } from '@/utils/permission'
10
+
11
+ /** 所有 UI 权限入口共用此处,与菜单数据来源无关。 */
12
+ export function usePermission() {
13
+ const userStore = useUserStore()
14
+ const permissions = computed(() => userStore.permissions)
15
+ const roles = computed(() => userStore.roles)
16
+ const ready = computed(() => userStore.permissionsReady)
17
+ const check = (required: PermissionRequirement, mode: PermissionMode, role = false) => {
18
+ warnInvalidRequirement(required)
19
+ return (
20
+ ready.value &&
21
+ matchesGrants(
22
+ role ? roles.value : permissions.value,
23
+ required,
24
+ mode,
25
+ role ? false : AppConfig.accessControl.wildcardPermission
26
+ )
27
+ )
28
+ }
29
+
30
+ const hasPermission = (required: PermissionRequirement) => check(required, 'any')
31
+ return {
32
+ ready,
33
+ permissions,
34
+ roles,
35
+ hasPermission,
36
+ hasAuth: hasPermission,
37
+ hasAllPermissions: (required: PermissionRequirement) => check(required, 'all'),
38
+ hasRole: (required: PermissionRequirement) => check(required, 'any', true),
39
+ hasAllRoles: (required: PermissionRequirement) => check(required, 'all', true)
40
+ }
41
+ }
@@ -6,6 +6,7 @@ export { useAppMode } from './core/useAppMode'
6
6
 
7
7
  // 权限控制
8
8
  export { useAuth } from './core/useAuth'
9
+ export { usePermission } from './core/usePermission'
9
10
 
10
11
  // 表格列配置管理
11
12
  export { useTableColumns } from './core/useTableColumns'
@@ -87,7 +87,6 @@ const getDefaultLanguage = (): LanguageEnum => {
87
87
  }
88
88
 
89
89
  // 返回默认语言
90
- console.debug('[i18n] 使用默认语言:', LanguageEnum.ZH)
91
90
  return LanguageEnum.ZH
92
91
  }
93
92
 
@@ -22,13 +22,74 @@
22
22
  "userCenter": "User center",
23
23
  "docs": "Document",
24
24
  "github": "Github",
25
+ "lockScreen": "Lock screen",
26
+ "guide": "Guide",
25
27
  "logout": "Log out"
28
+ }
29
+ },
30
+ "lockScreen": {
31
+ "locked": "Screen Locked",
32
+ "setPasswordTitle": "Set Lock Password",
33
+ "setPasswordTip": "First time using screen lock, please set an independent unlock password",
34
+ "passwordPlaceholder": "Enter lock password",
35
+ "newPasswordPlaceholder": "Set lock password",
36
+ "confirmPasswordPlaceholder": "Re-enter password",
37
+ "unlock": "Unlock",
38
+ "confirm": "Confirm",
39
+ "passwordRequired": "Please enter password",
40
+ "passwordMismatch": "Passwords do not match",
41
+ "wrongPassword": "Incorrect password, please try again",
42
+ "setSuccess": "Lock password set successfully",
43
+ "unlockSuccess": "Unlocked",
44
+ "switchAccount": "Switch account",
45
+ "enterToUnlock": "Press Enter to unlock"
46
+ },
47
+ "guide": {
48
+ "buttons": {
49
+ "prev": "Previous",
50
+ "next": "Next",
51
+ "done": "Get Started",
52
+ "close": "Skip"
53
+ },
54
+ "welcome": {
55
+ "title": "Welcome",
56
+ "desc": "Take a minute to learn the core features in the top bar. You can replay this guide anytime from the avatar menu."
57
+ },
58
+ "search": {
59
+ "title": "Global Search",
60
+ "desc": "Quickly search menus and pages. Shortcut: Ctrl/Cmd + K."
61
+ },
62
+ "fullscreen": {
63
+ "title": "Fullscreen",
64
+ "desc": "Enter or exit browser fullscreen for more workspace."
26
65
  },
27
- "guide": {
28
- "title": "Click here to view",
29
- "theme": "Theme style",
30
- "menu": "Open top menu",
31
- "description": "More configurations"
66
+ "language": {
67
+ "title": "Language",
68
+ "desc": "Switch between interface languages."
69
+ },
70
+ "notification": {
71
+ "title": "Notifications",
72
+ "desc": "View system notifications and messages."
73
+ },
74
+ "chat": {
75
+ "title": "Chat",
76
+ "desc": "Open the chat window for real-time communication."
77
+ },
78
+ "settings": {
79
+ "title": "Settings",
80
+ "desc": "Customize theme, menu layout and interface preferences."
81
+ },
82
+ "theme": {
83
+ "title": "Theme Toggle",
84
+ "desc": "Quickly switch between light and dark themes."
85
+ },
86
+ "lock": {
87
+ "title": "Screen Lock",
88
+ "desc": "Lock the screen for privacy, unlock with an independent password."
89
+ },
90
+ "userMenu": {
91
+ "title": "User Menu",
92
+ "desc": "View your profile, replay the guide, or log out."
32
93
  }
33
94
  },
34
95
  "common": {
@@ -194,7 +255,11 @@
194
255
  "403": "Sorry, you do not have permission to access this page",
195
256
  "404": "Sorry, the page you are trying to access does not exist",
196
257
  "500": "Sorry, there was an error on the server",
197
- "gohome": "Go Home"
258
+ "gohome": "Go Home",
259
+ "retryDescription": "The page could not be loaded. Retry initialization, or contact your administrator if the problem continues.",
260
+ "retry": "Retry loading",
261
+ "resourceFailure": "Page resources could not be loaded. A new version may have been deployed. Reload to fetch the latest resources.",
262
+ "reload": "Reload and retry"
198
263
  },
199
264
  "menus": {
200
265
  "login": {
@@ -279,5 +344,11 @@
279
344
  "zebra": "Zebra",
280
345
  "border": "Border",
281
346
  "headerBackground": "Header BG"
347
+ },
348
+ "access": {
349
+ "noAccessTitle": "No access assigned",
350
+ "noAccessDescription": "You are signed in. Ask an administrator to assign access, then check again.",
351
+ "checkAgain": "Check again",
352
+ "checking": "Checking…"
282
353
  }
283
354
  }
@@ -22,13 +22,74 @@
22
22
  "userCenter": "个人中心",
23
23
  "docs": "使用文档",
24
24
  "github": "Github",
25
+ "lockScreen": "锁屏",
26
+ "guide": "新手引导",
25
27
  "logout": "退出登录"
28
+ }
29
+ },
30
+ "lockScreen": {
31
+ "locked": "屏幕已锁定",
32
+ "setPasswordTitle": "设置锁屏密码",
33
+ "setPasswordTip": "首次使用锁屏,请设置一个独立的解锁密码",
34
+ "passwordPlaceholder": "请输入锁屏密码",
35
+ "newPasswordPlaceholder": "请设置锁屏密码",
36
+ "confirmPasswordPlaceholder": "请再次输入密码",
37
+ "unlock": "解锁",
38
+ "confirm": "确认设置",
39
+ "passwordRequired": "请输入密码",
40
+ "passwordMismatch": "两次输入的密码不一致",
41
+ "wrongPassword": "密码错误,请重新输入",
42
+ "setSuccess": "锁屏密码设置成功",
43
+ "unlockSuccess": "已解锁",
44
+ "switchAccount": "切换账号",
45
+ "enterToUnlock": "按 Enter 键解锁"
46
+ },
47
+ "guide": {
48
+ "buttons": {
49
+ "prev": "上一步",
50
+ "next": "下一步",
51
+ "done": "开始使用",
52
+ "close": "跳过"
53
+ },
54
+ "welcome": {
55
+ "title": "欢迎使用",
56
+ "desc": "花一分钟了解顶栏的核心功能,随时可从右上角头像菜单重新查看。"
57
+ },
58
+ "search": {
59
+ "title": "全局搜索",
60
+ "desc": "快速搜索菜单与页面,支持快捷键 Ctrl/Cmd + K。"
61
+ },
62
+ "fullscreen": {
63
+ "title": "全屏模式",
64
+ "desc": "一键进入或退出浏览器全屏,获得更大的操作空间。"
65
+ },
66
+ "language": {
67
+ "title": "语言切换",
68
+ "desc": "在多种界面语言之间切换。"
26
69
  },
27
- "guide": {
28
- "title": "点击这里查看",
29
- "theme": "主题风格",
30
- "menu": "开启顶栏菜单",
31
- "description": "等更多配置"
70
+ "notification": {
71
+ "title": "通知中心",
72
+ "desc": "查看系统通知与消息提醒。"
73
+ },
74
+ "chat": {
75
+ "title": "消息聊天",
76
+ "desc": "打开聊天窗口,进行实时沟通。"
77
+ },
78
+ "settings": {
79
+ "title": "系统设置",
80
+ "desc": "自定义主题、菜单布局与界面显示等偏好。"
81
+ },
82
+ "theme": {
83
+ "title": "主题切换",
84
+ "desc": "在明亮与暗色主题之间快速切换。"
85
+ },
86
+ "lock": {
87
+ "title": "锁屏",
88
+ "desc": "锁定屏幕保护隐私,使用独立密码解锁。"
89
+ },
90
+ "userMenu": {
91
+ "title": "用户菜单",
92
+ "desc": "查看个人信息、重新观看引导或退出登录。"
32
93
  }
33
94
  },
34
95
  "common": {
@@ -194,7 +255,11 @@
194
255
  "403": "抱歉,您无权访问该页面",
195
256
  "404": "抱歉,您访问的页面不存在",
196
257
  "500": "抱歉,服务器出错了",
197
- "gohome": "返回首页"
258
+ "gohome": "返回首页",
259
+ "retryDescription": "页面加载失败,可以重试初始化。若仍无法恢复,请联系管理员。",
260
+ "retry": "重新加载页面",
261
+ "resourceFailure": "页面资源加载失败,可能刚刚发布了新版本。刷新后将重新加载资源。",
262
+ "reload": "刷新并重试"
198
263
  },
199
264
  "menus": {
200
265
  "login": {
@@ -279,5 +344,11 @@
279
344
  "zebra": "斑马纹",
280
345
  "border": "边框",
281
346
  "headerBackground": "表头背景"
347
+ },
348
+ "access": {
349
+ "noAccessTitle": "尚未分配访问权限",
350
+ "noAccessDescription": "当前账号已登录,请联系管理员分配访问权限后重新检查。",
351
+ "checkAgain": "重新检查",
352
+ "checking": "正在检查…"
282
353
  }
283
354
  }