@liujitcn/kratos-admin-core 0.0.29 → 0.0.32
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.
- package/README.md +15 -8
- package/build/auto-imports.json +73 -0
- package/build/plugins.ts +2 -58
- package/dist/package/declarations/src/api/base/{config.d.ts → v1/config.d.ts} +1 -1
- package/dist/package/declarations/src/api/base/{file.d.ts → v1/file.d.ts} +3 -1
- package/dist/package/declarations/src/api/base/{language.d.ts → v1/language.d.ts} +1 -1
- package/dist/package/declarations/src/api/base/{login.d.ts → v1/login.d.ts} +2 -2
- package/dist/package/declarations/src/api/base/v1/mfa.d.ts +26 -0
- package/dist/package/declarations/src/api/base/{oauth.d.ts → v1/oauth.d.ts} +1 -1
- package/dist/package/declarations/src/api/system/{auth.d.ts → admin/v1/auth.d.ts} +2 -2
- package/dist/package/declarations/src/api/system/{base_dict.d.ts → admin/v1/base_dict.d.ts} +1 -1
- package/dist/package/declarations/src/api/system/{base_tenant.d.ts → admin/v1/base_tenant.d.ts} +2 -2
- package/dist/package/declarations/src/components/Dialog/FormDialog.vue.d.ts +3 -3
- package/dist/package/declarations/src/components/Dialog/PasswordVerifyDialog.vue.d.ts +65 -0
- package/dist/package/declarations/src/components/Dialog/ProDialog.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Grid/components/GridItem.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Mfa/MfaRecoveryCodesDialog.vue.d.ts +19 -0
- package/dist/package/declarations/src/components/Mfa/MfaSetupPanel.vue.d.ts +8 -0
- package/dist/package/declarations/src/components/ProForm/components/ProFormItem.vue.d.ts +4 -4
- package/dist/package/declarations/src/components/ProForm/index.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/ProForm/interface/index.d.ts +4 -1
- package/dist/package/declarations/src/components/ProTable/index.vue.d.ts +114 -0
- package/dist/package/declarations/src/components/RichTextPreview/index.vue.d.ts +8 -0
- package/dist/package/declarations/src/components/TreeFilter/index.vue.d.ts +84 -76
- package/dist/package/declarations/src/components/Upload/File.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Files.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Img.vue.d.ts +2 -2
- package/dist/package/declarations/src/components/Upload/Imgs.vue.d.ts +2 -2
- package/dist/package/declarations/src/components/WangEditor/index.vue.d.ts +2 -0
- package/dist/package/declarations/src/documentTitle.d.ts +2 -0
- package/dist/package/declarations/src/format.d.ts +1 -1
- package/dist/package/declarations/src/index.d.ts +2 -1
- package/dist/package/declarations/src/layouts/components/LockScreen.vue.d.ts +3 -0
- package/dist/package/declarations/src/locales/generated.d.ts +208 -0
- package/dist/package/declarations/src/locales/index.d.ts +2 -0
- package/dist/package/declarations/src/modules/index.d.ts +1 -3
- package/dist/package/declarations/src/request.d.ts +1 -1
- package/dist/package/declarations/src/routers/index.d.ts +1 -1
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +37 -5
- package/dist/package/declarations/src/rpc/base/v1/mfa.d.ts +152 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +25 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth_client.d.ts +23 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +13 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +0 -101
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n.d.ts +10 -6
- package/dist/package/declarations/src/rpc/system/common/v1/common.d.ts +26 -0
- package/dist/package/declarations/src/security.d.ts +2 -0
- package/dist/package/declarations/src/stores/interface/index.d.ts +19 -1
- package/dist/package/declarations/src/stores/modules/lockScreen.d.ts +20 -0
- package/dist/package/declarations/src/stores/modules/user.d.ts +7 -6
- package/dist/package/declarations/src/stores/runtime.d.ts +1 -0
- package/dist/package/declarations/src/utils/clipboard.d.ts +2 -0
- package/dist/package/declarations/src/utils/passwordStrength.d.ts +1 -12
- package/dist/package/declarations/src/utils/request.d.ts +13 -2
- package/dist/package/declarations/src/utils/utils.d.ts +4 -0
- package/dist/package/declarations/src/utils/webauthn.d.ts +4 -0
- package/dist/package/declarations/vite.config.d.ts +2 -0
- package/dist/package/src/api/base/{config.ts → v1/config.ts} +2 -2
- package/dist/package/src/api/base/{file.ts → v1/file.ts} +20 -24
- package/dist/package/src/api/base/{language.ts → v1/language.ts} +2 -2
- package/dist/package/src/api/base/{login.ts → v1/login.ts} +3 -3
- package/dist/package/src/api/base/v1/mfa.ts +114 -0
- package/dist/package/src/api/base/{oauth.ts → v1/oauth.ts} +2 -2
- package/dist/package/src/api/system/{auth.ts → admin/v1/auth.ts} +3 -3
- package/dist/package/src/api/system/{base_dict.ts → admin/v1/base_dict.ts} +2 -2
- package/dist/package/src/api/system/{base_tenant.ts → admin/v1/base_tenant.ts} +3 -3
- package/dist/package/src/bootstrap.ts +6 -5
- package/dist/package/src/components/CronExpression/index.vue +4 -3
- package/dist/package/src/components/Dialog/PasswordVerifyDialog.vue +176 -0
- package/dist/package/src/components/Dialog/ProDialog.vue +1 -0
- package/dist/package/src/components/ImportExcel/index.vue +4 -2
- package/dist/package/src/components/Loading/fullScreen.ts +2 -1
- package/dist/package/src/components/MarkdownPreview/index.vue +22 -2
- package/dist/package/src/components/Mfa/MfaRecoveryCodesDialog.vue +91 -0
- package/dist/package/src/components/Mfa/MfaSetupPanel.vue +81 -0
- package/dist/package/src/components/PasswordStrength/index.vue +1 -1
- package/dist/package/src/components/ProForm/components/ProFormItem.vue +16 -1
- package/dist/package/src/components/ProForm/interface/index.ts +4 -0
- package/dist/package/src/components/ProTable/components/ColSetting.vue +1 -1
- package/dist/package/src/components/ProTable/components/TableColumn.vue +14 -6
- package/dist/package/src/components/ProTable/index.vue +9 -5
- package/dist/package/src/components/RichTextPreview/index.vue +56 -0
- package/dist/package/src/components/SelectIcon/index.vue +3 -2
- package/dist/package/src/components/Upload/File.vue +2 -2
- package/dist/package/src/components/Upload/Files.vue +2 -2
- package/dist/package/src/components/Upload/Img.vue +7 -5
- package/dist/package/src/components/Upload/Imgs.vue +6 -5
- package/dist/package/src/components/WangEditor/index.vue +10 -7
- package/dist/package/src/config/index.ts +1 -1
- package/dist/package/src/documentTitle.ts +8 -0
- package/dist/package/src/format.ts +1 -1
- package/dist/package/src/index.ts +2 -1
- package/dist/package/src/layouts/LayoutClassic/index.vue +3 -1
- package/dist/package/src/layouts/LayoutColumns/index.vue +3 -1
- package/dist/package/src/layouts/LayoutTransverse/index.vue +3 -1
- package/dist/package/src/layouts/LayoutVertical/index.vue +9 -1
- package/dist/package/src/layouts/components/Header/components/Avatar.vue +26 -6
- package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +4 -3
- package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +4 -3
- package/dist/package/src/layouts/components/Header/components/SearchMenu.vue +16 -8
- package/dist/package/src/layouts/components/LockScreen.vue +573 -0
- package/dist/package/src/layouts/components/Tabs/index.vue +12 -3
- package/dist/package/src/layouts/components/ThemeDrawer/index.scss +4 -4
- package/dist/package/src/layouts/index.vue +2 -0
- package/dist/package/src/layouts/indexAsync.vue +2 -0
- package/dist/package/src/locales/README.md +2 -1
- package/dist/package/src/locales/en-US.json +51 -3
- package/dist/package/src/locales/index.ts +16 -12
- package/dist/package/src/locales/ja-JP.json +51 -3
- package/dist/package/src/locales/zh-CN.json +51 -3
- package/dist/package/src/locales/zh-TW.json +51 -3
- package/dist/package/src/modules/index.ts +2 -4
- package/dist/package/src/request.ts +3 -0
- package/dist/package/src/routers/index.ts +15 -14
- package/dist/package/src/rpc/base/v1/login.ts +37 -4
- package/dist/package/src/rpc/base/v1/mfa.ts +180 -0
- package/dist/package/src/rpc/base/v1/oauth.ts +25 -0
- package/dist/package/src/rpc/base/v1/oauth_client.ts +33 -0
- package/dist/package/src/rpc/system/admin/v1/auth.ts +13 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +0 -112
- package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +10 -6
- package/dist/package/src/rpc/system/common/v1/common.ts +35 -0
- package/dist/package/src/security.ts +2 -0
- package/dist/package/src/stores/interface/index.ts +20 -1
- package/dist/package/src/stores/modules/auth.ts +1 -1
- package/dist/package/src/stores/modules/config.ts +2 -2
- package/dist/package/src/stores/modules/dict.ts +1 -1
- package/dist/package/src/stores/modules/lockScreen.ts +78 -0
- package/dist/package/src/stores/modules/user.ts +34 -22
- package/dist/package/src/stores/runtime.ts +1 -0
- package/dist/package/src/styles/element.scss +35 -4
- package/dist/package/src/utils/clipboard.ts +22 -0
- package/dist/package/src/utils/passwordCrypto.ts +1 -1
- package/dist/package/src/utils/passwordStrength.ts +7 -24
- package/dist/package/src/utils/request.ts +175 -40
- package/dist/package/src/utils/tenant.ts +1 -1
- package/dist/package/src/utils/utils.ts +25 -6
- package/dist/package/src/utils/webauthn.ts +90 -0
- package/dist/package/src/views/login/components/LoginForm.vue +257 -24
- package/dist/package/src/views/login/index.scss +2 -2
- package/dist/package/src/views/login/index.vue +3 -1
- package/dist/package/types/generated/auto-imports.d.ts +132 -129
- package/dist/package/types/generated/components.d.ts +4 -72
- package/package.json +22 -1
- package/types/generated/auto-imports.d.ts +132 -129
- package/types/generated/components.d.ts +4 -72
- package/vite.config.ts +4 -1
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"common.validation.phone_required": "Enter a phone number",
|
|
34
34
|
"common.title.notice": "Notice",
|
|
35
35
|
"common.title.warning": "Confirmation",
|
|
36
|
+
"common.confirm.delete": "Delete this item?",
|
|
36
37
|
"common.placeholder.input": "Enter a value",
|
|
37
38
|
"common.placeholder.input_content": "Enter content",
|
|
38
39
|
"common.placeholder.select": "Select a value",
|
|
@@ -47,6 +48,15 @@
|
|
|
47
48
|
"core.auth.no_menu_permission": "This account has no menu permissions. Contact an administrator.",
|
|
48
49
|
"core.auth.no_permission": "Access denied",
|
|
49
50
|
"core.clipboard.success": "Copied",
|
|
51
|
+
"core.markdown.action.copy_code": "Copy code",
|
|
52
|
+
"core.markdown.message.copy_success": "Copied!",
|
|
53
|
+
"core.markdown.message.copy_failed": "Copy failed!",
|
|
54
|
+
"core.loading.text": "Loading",
|
|
55
|
+
"core.layout.avatar": "User avatar",
|
|
56
|
+
"core.layout.logo_alt": "System logo",
|
|
57
|
+
"core.login.background_alt": "Login background",
|
|
58
|
+
"core.layout.info_content": "View the current user's information",
|
|
59
|
+
"core.layout.password_content": "Change the current user's password",
|
|
50
60
|
"core.cron.cycle_unit.day": "days",
|
|
51
61
|
"core.cron.cycle_unit.hour": "hours",
|
|
52
62
|
"core.cron.cycle_unit.minute": "minutes",
|
|
@@ -134,7 +144,16 @@
|
|
|
134
144
|
"core.layout.home": "Home",
|
|
135
145
|
"core.layout.info": "Personal information",
|
|
136
146
|
"core.layout.password_change": "Change password",
|
|
147
|
+
"core.layout.password_change_required": "Your password has expired. Please change it before continuing.",
|
|
137
148
|
"core.layout.unnamed_menu": "Unnamed menu",
|
|
149
|
+
"core.layout.lock_screen": "Lock screen",
|
|
150
|
+
"core.layout.lock_screen_action": "Lock",
|
|
151
|
+
"core.layout.lock_screen_password_placeholder": "Enter a lock screen password",
|
|
152
|
+
"core.layout.lock_screen_password_required": "Enter a lock screen password",
|
|
153
|
+
"core.layout.lock_screen_password_invalid": "Incorrect lock screen password",
|
|
154
|
+
"core.layout.lock_screen_unlock_hint": "Click to unlock",
|
|
155
|
+
"core.layout.lock_screen_enter": "Enter system",
|
|
156
|
+
"core.layout.lock_screen_return_login": "Return to login",
|
|
138
157
|
"core.layout.logout_confirm": "Are you sure you want to log out?",
|
|
139
158
|
"core.layout.logout_success": "Logged out",
|
|
140
159
|
"core.layout.not_set": "Not set",
|
|
@@ -155,21 +174,42 @@
|
|
|
155
174
|
"core.login.tenant_code": "Enter tenant code",
|
|
156
175
|
"core.login.user_name": "Enter username",
|
|
157
176
|
"core.login.welcome": "Welcome to the admin console",
|
|
177
|
+
"core.login.mfa_title": "Multi-factor authentication",
|
|
178
|
+
"core.login.mfa_code": "Enter the authenticator code",
|
|
179
|
+
"core.login.mfa_recovery_code": "Recovery code (optional)",
|
|
180
|
+
"core.login.mfa_setup_title": "Bind multi-factor authentication",
|
|
181
|
+
"core.login.mfa_setup_qr_alt": "Multi-factor authentication binding QR code",
|
|
182
|
+
"core.login.mfa_uri_copied": "Binding address copied",
|
|
183
|
+
"core.login.mfa_show_uri": "Show backup binding address",
|
|
184
|
+
"core.login.mfa_copy_uri": "Copy binding address",
|
|
185
|
+
"core.login.mfa_recovery_codes_title": "Save MFA recovery codes",
|
|
186
|
+
"core.login.mfa_recovery_codes_warning": "Each code works once and will not be shown again after this dialog closes.",
|
|
187
|
+
"core.login.mfa_recovery_codes_copied": "Recovery codes copied",
|
|
188
|
+
"core.login.mfa_copy_recovery_codes": "Copy recovery codes",
|
|
189
|
+
"core.login.mfa_recovery_codes_confirm": "I saved them",
|
|
190
|
+
"core.login.mfa_setup_success": "Multi-factor authentication enabled. Please sign in again.",
|
|
191
|
+
"core.login.mfa_webauthn_action": "Use Passkey",
|
|
192
|
+
"core.login.mfa_webauthn_setup_unsupported": "WebAuthn is not supported on this platform. Use TOTP or a recovery code.",
|
|
193
|
+
"core.login.mfa_webauthn_setup_invalid": "WebAuthn registration did not return a valid credential.",
|
|
194
|
+
"core.login.mfa_webauthn_login_unsupported": "WebAuthn is not supported on this platform. Use a recovery code.",
|
|
195
|
+
"core.login.mfa_webauthn_login_invalid": "WebAuthn authentication did not return a valid credential.",
|
|
158
196
|
"core.oauth.dingtalk": "DingTalk",
|
|
159
197
|
"core.oauth.feishu": "Feishu",
|
|
160
198
|
"core.oauth.wechat": "WeChat",
|
|
161
199
|
"core.oauth.wechatmp": "WeChat Official Account",
|
|
162
200
|
"core.oauth.wechatwork": "WeCom",
|
|
163
201
|
"core.oauth.unknown": "Unknown provider",
|
|
164
|
-
"core.password.error": "Password
|
|
202
|
+
"core.password.error": "Password does not meet the active password policy",
|
|
165
203
|
"core.password.crypto_unsupported": "Password encryption is not supported in this environment",
|
|
166
204
|
"core.password.required": "Password is required",
|
|
205
|
+
"core.password.verify_title": "Verify password",
|
|
206
|
+
"core.password.verify_label": "Current password",
|
|
167
207
|
"core.password.strength": "Password strength",
|
|
168
208
|
"core.password.strength.empty": "Not entered",
|
|
169
209
|
"core.password.strength.high": "High",
|
|
170
210
|
"core.password.strength.low": "Low",
|
|
171
211
|
"core.password.strength.medium": "Medium",
|
|
172
|
-
"core.password.tip": "
|
|
212
|
+
"core.password.tip": "Password requirements follow the active password policy.",
|
|
173
213
|
"core.theme.accordion": "Accordion menu",
|
|
174
214
|
"core.theme.aside_inverted": "Dark sidebar",
|
|
175
215
|
"core.theme.aside_inverted_tip": "Use dark colors for the sidebar",
|
|
@@ -253,11 +293,15 @@
|
|
|
253
293
|
"common.dialog.resource_field": "{field}: {value}",
|
|
254
294
|
"common.dialog.status_change": "{action} this {resource}?\n{field}: {value}",
|
|
255
295
|
"common.field.created_at": "Created at",
|
|
296
|
+
"common.field.department": "Department",
|
|
297
|
+
"common.field.post": "Position",
|
|
256
298
|
"common.field.remark": "Remarks",
|
|
299
|
+
"common.field.role": "Role",
|
|
257
300
|
"common.field.sort": "Sort order",
|
|
258
301
|
"common.field.status": "Status",
|
|
259
302
|
"common.field.tenant": "Tenant",
|
|
260
303
|
"common.field.updated_at": "Updated at",
|
|
304
|
+
"common.field.user": "User",
|
|
261
305
|
"common.message.create_success": "{resource} created",
|
|
262
306
|
"common.message.delete_success": "{resource} deleted",
|
|
263
307
|
"common.message.load_children_failed": "Failed to load child {resource}",
|
|
@@ -276,5 +320,9 @@
|
|
|
276
320
|
"common.value.yes": "Yes",
|
|
277
321
|
"common.value.no": "No",
|
|
278
322
|
"common.value.unknown": "Unknown",
|
|
279
|
-
"common.value.none": "None"
|
|
323
|
+
"common.value.none": "None",
|
|
324
|
+
"common.value.top_level": "Top level",
|
|
325
|
+
"common.resource.default": "{resource}",
|
|
326
|
+
"common.action.delete_resource": "Delete {resource}",
|
|
327
|
+
"common.action.set_field_status": "Set {field}"
|
|
280
328
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
DAYJS_LOCALE_MAP,
|
|
12
12
|
DEFAULT_LOCALE as GENERATED_DEFAULT_LOCALE,
|
|
13
13
|
SUPPORTED_LOCALES as GENERATED_SUPPORTED_LOCALES,
|
|
14
|
-
type GeneratedLocale
|
|
14
|
+
type GeneratedLocale
|
|
15
15
|
} from "./generated";
|
|
16
16
|
|
|
17
17
|
/** 管理端已打包的语言区域;运行时可切换列表由 base_language 接口决定。 */
|
|
@@ -55,7 +55,9 @@ export function normalizeLocale(value?: string): SupportedLocale {
|
|
|
55
55
|
|
|
56
56
|
/** 将接口或系统语言代码解析为已打包的语言区域。 */
|
|
57
57
|
function parseSupportedLocale(value?: string): SupportedLocale | undefined {
|
|
58
|
-
const normalized = String(value ?? "")
|
|
58
|
+
const normalized = String(value ?? "")
|
|
59
|
+
.replace("_", "-")
|
|
60
|
+
.toLowerCase();
|
|
59
61
|
if (!normalized) return undefined;
|
|
60
62
|
const alias = normalized.startsWith("zh-hk") || normalized.startsWith("zh-mo") ? "zh-tw" : normalized;
|
|
61
63
|
const exact = SUPPORTED_LOCALES.find(locale => locale.toLowerCase() === alias);
|
|
@@ -106,10 +108,10 @@ export function initializeLocale(): SupportedLocale {
|
|
|
106
108
|
export function applyLanguageConfig(response: OptionLanguageResponse): void {
|
|
107
109
|
const options = response.languages.reduce<LocaleOption[]>((items, item) => {
|
|
108
110
|
const languageCode = parseSupportedLocale(item.language_code);
|
|
109
|
-
if (!languageCode || items.some(
|
|
111
|
+
if (!languageCode || items.some(option => option.language_code === languageCode)) return items;
|
|
110
112
|
items.push({
|
|
111
113
|
language_code: languageCode,
|
|
112
|
-
native_name: item.native_name || languageCode
|
|
114
|
+
native_name: item.native_name || languageCode
|
|
113
115
|
});
|
|
114
116
|
return items;
|
|
115
117
|
}, []);
|
|
@@ -127,7 +129,7 @@ export function getLanguageOptions(): LocaleOption[] {
|
|
|
127
129
|
|
|
128
130
|
/** 获取当前可切换的语言区域。 */
|
|
129
131
|
export function getSupportedLocales(): SupportedLocale[] {
|
|
130
|
-
return getLanguageOptions().map(
|
|
132
|
+
return getLanguageOptions().map(item => item.language_code);
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
/** 获取当前规范语言区域。 */
|
|
@@ -161,6 +163,13 @@ export function t(key: string, params: LocaleParams = {}): string {
|
|
|
161
163
|
return String(adminI18n.global.t(key, params));
|
|
162
164
|
}
|
|
163
165
|
|
|
166
|
+
/** 从指定语言包读取固定文案,供第三方组件配置和跨语言兼容判断使用。 */
|
|
167
|
+
export function getLocaleText(locale: SupportedLocale, key: string): string {
|
|
168
|
+
const messages = adminI18n.global.getLocaleMessage(locale) as LocaleMessages;
|
|
169
|
+
const fallbackMessages = adminI18n.global.getLocaleMessage(DEFAULT_LOCALE) as LocaleMessages;
|
|
170
|
+
return messages[key] ?? fallbackMessages[key] ?? "";
|
|
171
|
+
}
|
|
172
|
+
|
|
164
173
|
/** 管理端响应式语言状态。 */
|
|
165
174
|
export function useLocaleStore() {
|
|
166
175
|
return {
|
|
@@ -177,18 +186,13 @@ function getFallbackLanguageOptions(): LocaleOption[] {
|
|
|
177
186
|
return SUPPORTED_LOCALES.map(languageCode => {
|
|
178
187
|
return {
|
|
179
188
|
language_code: languageCode,
|
|
180
|
-
native_name: fallbackNativeLanguageName(languageCode)
|
|
189
|
+
native_name: fallbackNativeLanguageName(languageCode)
|
|
181
190
|
};
|
|
182
191
|
});
|
|
183
192
|
}
|
|
184
193
|
|
|
185
194
|
function fallbackNativeLanguageName(languageCode: SupportedLocale): string {
|
|
186
|
-
return {
|
|
187
|
-
"zh-CN": "简体中文",
|
|
188
|
-
"zh-TW": "繁體中文",
|
|
189
|
-
"en-US": "English",
|
|
190
|
-
"ja-JP": "日本語",
|
|
191
|
-
}[languageCode];
|
|
195
|
+
return getLocaleText(languageCode, `common.language.${languageCode}`) || languageCode;
|
|
192
196
|
}
|
|
193
197
|
|
|
194
198
|
function applyLocale(locale: SupportedLocale): void {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"common.validation.phone_required": "携帯電話番号を入力してください",
|
|
34
34
|
"common.title.notice": "ヒント",
|
|
35
35
|
"common.title.warning": "温かいリマインダー",
|
|
36
|
+
"common.confirm.delete": "削除してもよろしいですか?",
|
|
36
37
|
"common.placeholder.input": "入力してください",
|
|
37
38
|
"common.placeholder.input_content": "内容を入力してください",
|
|
38
39
|
"common.placeholder.select": "選択してください",
|
|
@@ -47,6 +48,34 @@
|
|
|
47
48
|
"core.auth.no_menu_permission": "現在のアカウントにはメニュー権限がありません。システム管理者に連絡してください。",
|
|
48
49
|
"core.auth.no_permission": "アクセス権限がありません",
|
|
49
50
|
"core.clipboard.success": "正常にコピーされました",
|
|
51
|
+
"core.markdown.action.copy_code": "コードをコピー",
|
|
52
|
+
"core.markdown.message.copy_success": "コピーしました",
|
|
53
|
+
"core.markdown.message.copy_failed": "コピーに失敗しました",
|
|
54
|
+
"core.loading.text": "読み込み中",
|
|
55
|
+
"core.layout.avatar": "ユーザーアバター",
|
|
56
|
+
"core.layout.logo_alt": "システムロゴ",
|
|
57
|
+
"core.login.background_alt": "ログイン画面の背景",
|
|
58
|
+
"core.login.mfa_title": "多要素認証",
|
|
59
|
+
"core.login.mfa_code": "認証コードを入力",
|
|
60
|
+
"core.login.mfa_recovery_code": "リカバリーコード(任意)",
|
|
61
|
+
"core.login.mfa_setup_title": "多要素認証を設定",
|
|
62
|
+
"core.login.mfa_setup_qr_alt": "多要素認証登録用 QR コード",
|
|
63
|
+
"core.login.mfa_uri_copied": "登録アドレスをコピーしました",
|
|
64
|
+
"core.login.mfa_show_uri": "予備の登録アドレスを表示",
|
|
65
|
+
"core.login.mfa_copy_uri": "登録アドレスをコピー",
|
|
66
|
+
"core.login.mfa_recovery_codes_title": "MFA リカバリーコードを保存",
|
|
67
|
+
"core.login.mfa_recovery_codes_warning": "各コードは一度だけ使用でき、ダイアログを閉じると再表示されません。",
|
|
68
|
+
"core.login.mfa_recovery_codes_copied": "リカバリーコードをコピーしました",
|
|
69
|
+
"core.login.mfa_copy_recovery_codes": "リカバリーコードをコピー",
|
|
70
|
+
"core.login.mfa_recovery_codes_confirm": "保存しました",
|
|
71
|
+
"core.login.mfa_setup_success": "多要素認証を設定しました。再度ログインしてください。",
|
|
72
|
+
"core.login.mfa_webauthn_action": "Passkey を使用",
|
|
73
|
+
"core.login.mfa_webauthn_setup_unsupported": "このプラットフォームは WebAuthn に対応していません。TOTP またはリカバリーコードを使用してください。",
|
|
74
|
+
"core.login.mfa_webauthn_setup_invalid": "WebAuthn 登録で有効なクレデンシャルが返されませんでした。",
|
|
75
|
+
"core.login.mfa_webauthn_login_unsupported": "このプラットフォームは WebAuthn に対応していません。リカバリーコードを使用してください。",
|
|
76
|
+
"core.login.mfa_webauthn_login_invalid": "WebAuthn 認証で有効なクレデンシャルが返されませんでした。",
|
|
77
|
+
"core.layout.info_content": "現在のユーザー情報を表示します",
|
|
78
|
+
"core.layout.password_content": "現在のユーザーのパスワードを変更します",
|
|
50
79
|
"core.cron.cycle_unit.day": "日",
|
|
51
80
|
"core.cron.cycle_unit.hour": "時間",
|
|
52
81
|
"core.cron.cycle_unit.minute": "分",
|
|
@@ -134,7 +163,16 @@
|
|
|
134
163
|
"core.layout.home": "ホーム",
|
|
135
164
|
"core.layout.info": "個人情報",
|
|
136
165
|
"core.layout.password_change": "パスワードを変更する",
|
|
166
|
+
"core.layout.password_change_required": "パスワードの有効期限が切れています。続行する前に変更してください。",
|
|
137
167
|
"core.layout.unnamed_menu": "名前のないメニュー",
|
|
168
|
+
"core.layout.lock_screen": "画面をロック",
|
|
169
|
+
"core.layout.lock_screen_action": "ロック",
|
|
170
|
+
"core.layout.lock_screen_password_placeholder": "ロック画面のパスワードを入力",
|
|
171
|
+
"core.layout.lock_screen_password_required": "ロック画面のパスワードを入力してください",
|
|
172
|
+
"core.layout.lock_screen_password_invalid": "ロック画面のパスワードが正しくありません",
|
|
173
|
+
"core.layout.lock_screen_unlock_hint": "クリックしてロックを解除",
|
|
174
|
+
"core.layout.lock_screen_enter": "システムに入る",
|
|
175
|
+
"core.layout.lock_screen_return_login": "ログインに戻る",
|
|
138
176
|
"core.layout.logout_confirm": "ログアウトしてもよろしいですか?",
|
|
139
177
|
"core.layout.logout_success": "正常にログアウトしました",
|
|
140
178
|
"core.layout.not_set": "が設定されていません",
|
|
@@ -161,15 +199,17 @@
|
|
|
161
199
|
"core.oauth.wechatmp": "WeChat 公開アカウント",
|
|
162
200
|
"core.oauth.wechatwork": "エンタープライズ WeChat",
|
|
163
201
|
"core.oauth.unknown": "不明な方法です",
|
|
164
|
-
"core.password.error": "
|
|
202
|
+
"core.password.error": "パスワードが現在のパスワードポリシーを満たしていません",
|
|
165
203
|
"core.password.crypto_unsupported": "現在の環境はパスワード暗号化をサポートしていません",
|
|
166
204
|
"core.password.required": "パスワードを空にすることはできません",
|
|
205
|
+
"core.password.verify_title": "パスワードの確認",
|
|
206
|
+
"core.password.verify_label": "現在のパスワード",
|
|
167
207
|
"core.password.strength": "パスワードの強度",
|
|
168
208
|
"core.password.strength.empty": "未入力",
|
|
169
209
|
"core.password.strength.high": "高",
|
|
170
210
|
"core.password.strength.low": "低",
|
|
171
211
|
"core.password.strength.medium": "中",
|
|
172
|
-
"core.password.tip": "
|
|
212
|
+
"core.password.tip": "パスワード要件は現在有効なパスワードポリシーに従います。",
|
|
173
213
|
"core.theme.accordion": "メニュー アコーディオン",
|
|
174
214
|
"core.theme.aside_inverted": "サイドバーの反転色",
|
|
175
215
|
"core.theme.aside_inverted_tip": "サイドバーの色がダークモードに変わります",
|
|
@@ -253,11 +293,15 @@
|
|
|
253
293
|
"common.dialog.resource_field": "{field}: {value}",
|
|
254
294
|
"common.dialog.status_change": "{action}{resource} でよろしいですか?\n{field}: {value}",
|
|
255
295
|
"common.field.created_at": "作成時刻",
|
|
296
|
+
"common.field.department": "部門",
|
|
297
|
+
"common.field.post": "ポジション",
|
|
256
298
|
"common.field.remark": "備考",
|
|
299
|
+
"common.field.role": "役割",
|
|
257
300
|
"common.field.sort": "並べ替え",
|
|
258
301
|
"common.field.status": "ステータス",
|
|
259
302
|
"common.field.tenant": "テナント",
|
|
260
303
|
"common.field.updated_at": "更新時間",
|
|
304
|
+
"common.field.user": "ユーザー",
|
|
261
305
|
"common.message.create_success": "{resource} が正常に追加されました",
|
|
262
306
|
"common.message.delete_success": "{resource} の削除に成功しました",
|
|
263
307
|
"common.message.load_children_failed": "は {resource} 子ノードのロードに失敗しました",
|
|
@@ -276,5 +320,9 @@
|
|
|
276
320
|
"common.value.yes": "はい",
|
|
277
321
|
"common.value.no": "いいえ",
|
|
278
322
|
"common.value.unknown": "不明",
|
|
279
|
-
"common.value.none": "なし"
|
|
323
|
+
"common.value.none": "なし",
|
|
324
|
+
"common.value.top_level": "トップレベル",
|
|
325
|
+
"common.resource.default": "{resource}",
|
|
326
|
+
"common.action.delete_resource": "{resource}を削除",
|
|
327
|
+
"common.action.set_field_status": "{field}を設定"
|
|
280
328
|
}
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"common.validation.phone_required": "请输入手机号码",
|
|
34
34
|
"common.title.notice": "提示",
|
|
35
35
|
"common.title.warning": "温馨提示",
|
|
36
|
+
"common.confirm.delete": "确定删除吗?",
|
|
36
37
|
"common.placeholder.input": "请输入",
|
|
37
38
|
"common.placeholder.input_content": "请输入内容",
|
|
38
39
|
"common.placeholder.select": "请选择",
|
|
@@ -47,6 +48,15 @@
|
|
|
47
48
|
"core.auth.no_menu_permission": "当前账号无任何菜单权限,请联系系统管理员",
|
|
48
49
|
"core.auth.no_permission": "无权限访问",
|
|
49
50
|
"core.clipboard.success": "复制成功",
|
|
51
|
+
"core.markdown.action.copy_code": "复制代码",
|
|
52
|
+
"core.markdown.message.copy_success": "复制成功!",
|
|
53
|
+
"core.markdown.message.copy_failed": "复制失败!",
|
|
54
|
+
"core.loading.text": "加载中",
|
|
55
|
+
"core.layout.avatar": "用户头像",
|
|
56
|
+
"core.layout.logo_alt": "系统标志",
|
|
57
|
+
"core.login.background_alt": "登录页背景",
|
|
58
|
+
"core.layout.info_content": "查看当前用户信息",
|
|
59
|
+
"core.layout.password_content": "修改当前用户密码",
|
|
50
60
|
"core.cron.cycle_unit.day": "天",
|
|
51
61
|
"core.cron.cycle_unit.hour": "小时",
|
|
52
62
|
"core.cron.cycle_unit.minute": "分钟",
|
|
@@ -134,7 +144,16 @@
|
|
|
134
144
|
"core.layout.home": "首页",
|
|
135
145
|
"core.layout.info": "个人信息",
|
|
136
146
|
"core.layout.password_change": "修改密码",
|
|
147
|
+
"core.layout.password_change_required": "密码已过期,请先修改密码",
|
|
137
148
|
"core.layout.unnamed_menu": "未命名菜单",
|
|
149
|
+
"core.layout.lock_screen": "锁定屏幕",
|
|
150
|
+
"core.layout.lock_screen_action": "锁定",
|
|
151
|
+
"core.layout.lock_screen_password_placeholder": "请输入锁屏密码",
|
|
152
|
+
"core.layout.lock_screen_password_required": "请输入锁屏密码",
|
|
153
|
+
"core.layout.lock_screen_password_invalid": "锁屏密码错误",
|
|
154
|
+
"core.layout.lock_screen_unlock_hint": "点击解锁",
|
|
155
|
+
"core.layout.lock_screen_enter": "进入系统",
|
|
156
|
+
"core.layout.lock_screen_return_login": "返回登录",
|
|
138
157
|
"core.layout.logout_confirm": "您是否确认退出登录?",
|
|
139
158
|
"core.layout.logout_success": "退出登录成功",
|
|
140
159
|
"core.layout.not_set": "未设置",
|
|
@@ -155,21 +174,42 @@
|
|
|
155
174
|
"core.login.tenant_code": "请输入租户编码",
|
|
156
175
|
"core.login.user_name": "请输入用户名",
|
|
157
176
|
"core.login.welcome": "欢迎登录管理后台",
|
|
177
|
+
"core.login.mfa_title": "多因素认证",
|
|
178
|
+
"core.login.mfa_code": "请输入动态口令",
|
|
179
|
+
"core.login.mfa_recovery_code": "恢复码(可选)",
|
|
180
|
+
"core.login.mfa_setup_title": "绑定多因素认证",
|
|
181
|
+
"core.login.mfa_setup_qr_alt": "多因素认证绑定二维码",
|
|
182
|
+
"core.login.mfa_uri_copied": "绑定地址已复制",
|
|
183
|
+
"core.login.mfa_show_uri": "显示备用绑定地址",
|
|
184
|
+
"core.login.mfa_copy_uri": "复制绑定地址",
|
|
185
|
+
"core.login.mfa_recovery_codes_title": "保存 MFA 恢复码",
|
|
186
|
+
"core.login.mfa_recovery_codes_warning": "每个恢复码只能使用一次,此弹窗关闭后不会再次显示。",
|
|
187
|
+
"core.login.mfa_recovery_codes_copied": "恢复码已复制",
|
|
188
|
+
"core.login.mfa_copy_recovery_codes": "复制恢复码",
|
|
189
|
+
"core.login.mfa_recovery_codes_confirm": "我已保存",
|
|
190
|
+
"core.login.mfa_setup_success": "多因素认证绑定成功,请重新登录。",
|
|
191
|
+
"core.login.mfa_webauthn_action": "使用 Passkey",
|
|
192
|
+
"core.login.mfa_webauthn_setup_unsupported": "当前平台不支持 WebAuthn,请使用 TOTP 或恢复码。",
|
|
193
|
+
"core.login.mfa_webauthn_setup_invalid": "WebAuthn 注册未返回有效凭据。",
|
|
194
|
+
"core.login.mfa_webauthn_login_unsupported": "当前平台不支持 WebAuthn,请使用恢复码。",
|
|
195
|
+
"core.login.mfa_webauthn_login_invalid": "WebAuthn 登录未返回有效凭据。",
|
|
158
196
|
"core.oauth.dingtalk": "钉钉",
|
|
159
197
|
"core.oauth.feishu": "飞书",
|
|
160
198
|
"core.oauth.wechat": "微信",
|
|
161
199
|
"core.oauth.wechatmp": "微信公众号",
|
|
162
200
|
"core.oauth.wechatwork": "企业微信",
|
|
163
201
|
"core.oauth.unknown": "未知方式",
|
|
164
|
-
"core.password.error": "
|
|
202
|
+
"core.password.error": "密码不符合当前生效的密码策略",
|
|
165
203
|
"core.password.crypto_unsupported": "当前环境不支持密码加密",
|
|
166
204
|
"core.password.required": "密码不能为空",
|
|
205
|
+
"core.password.verify_title": "验证密码",
|
|
206
|
+
"core.password.verify_label": "当前密码",
|
|
167
207
|
"core.password.strength": "密码强度",
|
|
168
208
|
"core.password.strength.empty": "未输入",
|
|
169
209
|
"core.password.strength.high": "高",
|
|
170
210
|
"core.password.strength.low": "低",
|
|
171
211
|
"core.password.strength.medium": "中",
|
|
172
|
-
"core.password.tip": "
|
|
212
|
+
"core.password.tip": "密码要求以当前生效的密码策略为准。",
|
|
173
213
|
"core.theme.accordion": "菜单手风琴",
|
|
174
214
|
"core.theme.aside_inverted": "侧边栏反转色",
|
|
175
215
|
"core.theme.aside_inverted_tip": "侧边栏颜色变为深色模式",
|
|
@@ -253,11 +293,15 @@
|
|
|
253
293
|
"common.dialog.resource_field": "{field}:{value}",
|
|
254
294
|
"common.dialog.status_change": "是否确定{action}{resource}?\n{field}:{value}",
|
|
255
295
|
"common.field.created_at": "创建时间",
|
|
296
|
+
"common.field.department": "部门",
|
|
297
|
+
"common.field.post": "岗位",
|
|
256
298
|
"common.field.remark": "备注",
|
|
299
|
+
"common.field.role": "角色",
|
|
257
300
|
"common.field.sort": "排序",
|
|
258
301
|
"common.field.status": "状态",
|
|
259
302
|
"common.field.tenant": "租户",
|
|
260
303
|
"common.field.updated_at": "更新时间",
|
|
304
|
+
"common.field.user": "用户",
|
|
261
305
|
"common.message.create_success": "新增{resource}成功",
|
|
262
306
|
"common.message.delete_success": "删除{resource}成功",
|
|
263
307
|
"common.message.load_children_failed": "加载{resource}子节点失败",
|
|
@@ -276,5 +320,9 @@
|
|
|
276
320
|
"common.value.yes": "是",
|
|
277
321
|
"common.value.no": "否",
|
|
278
322
|
"common.value.unknown": "未知",
|
|
279
|
-
"common.value.none": "无"
|
|
323
|
+
"common.value.none": "无",
|
|
324
|
+
"common.value.top_level": "顶级节点",
|
|
325
|
+
"common.resource.default": "{resource}",
|
|
326
|
+
"common.action.delete_resource": "删除{resource}",
|
|
327
|
+
"common.action.set_field_status": "设置{field}"
|
|
280
328
|
}
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"common.validation.phone_required": "請輸入手機號碼",
|
|
34
34
|
"common.title.notice": "提示",
|
|
35
35
|
"common.title.warning": "溫馨提示",
|
|
36
|
+
"common.confirm.delete": "確定要刪除嗎?",
|
|
36
37
|
"common.placeholder.input": "請輸入",
|
|
37
38
|
"common.placeholder.input_content": "請輸入內容",
|
|
38
39
|
"common.placeholder.select": "請選擇",
|
|
@@ -47,6 +48,34 @@
|
|
|
47
48
|
"core.auth.no_menu_permission": "當前賬號無任何選單許可權,請聯絡系統管理員",
|
|
48
49
|
"core.auth.no_permission": "無許可權訪問",
|
|
49
50
|
"core.clipboard.success": "複製成功",
|
|
51
|
+
"core.markdown.action.copy_code": "複製程式碼",
|
|
52
|
+
"core.markdown.message.copy_success": "已複製!",
|
|
53
|
+
"core.markdown.message.copy_failed": "複製失敗!",
|
|
54
|
+
"core.loading.text": "載入中",
|
|
55
|
+
"core.layout.avatar": "使用者頭像",
|
|
56
|
+
"core.layout.logo_alt": "系統標誌",
|
|
57
|
+
"core.login.background_alt": "登入頁背景",
|
|
58
|
+
"core.login.mfa_title": "多因素認證",
|
|
59
|
+
"core.login.mfa_code": "請輸入動態密碼",
|
|
60
|
+
"core.login.mfa_recovery_code": "恢復碼(可選)",
|
|
61
|
+
"core.login.mfa_setup_title": "綁定多因素認證",
|
|
62
|
+
"core.login.mfa_setup_qr_alt": "多因素認證綁定 QR Code",
|
|
63
|
+
"core.login.mfa_uri_copied": "綁定地址已複製",
|
|
64
|
+
"core.login.mfa_show_uri": "顯示備用綁定地址",
|
|
65
|
+
"core.login.mfa_copy_uri": "複製綁定地址",
|
|
66
|
+
"core.login.mfa_recovery_codes_title": "儲存 MFA 恢復碼",
|
|
67
|
+
"core.login.mfa_recovery_codes_warning": "每個恢復碼只能使用一次,關閉此視窗後不會再次顯示。",
|
|
68
|
+
"core.login.mfa_recovery_codes_copied": "恢復碼已複製",
|
|
69
|
+
"core.login.mfa_copy_recovery_codes": "複製恢復碼",
|
|
70
|
+
"core.login.mfa_recovery_codes_confirm": "我已儲存",
|
|
71
|
+
"core.login.mfa_setup_success": "多因素認證綁定成功,請重新登入。",
|
|
72
|
+
"core.login.mfa_webauthn_action": "使用 Passkey",
|
|
73
|
+
"core.login.mfa_webauthn_setup_unsupported": "目前平台不支援 WebAuthn,請使用 TOTP 或恢復碼。",
|
|
74
|
+
"core.login.mfa_webauthn_setup_invalid": "WebAuthn 註冊未回傳有效憑證。",
|
|
75
|
+
"core.login.mfa_webauthn_login_unsupported": "目前平台不支援 WebAuthn,請使用恢復碼。",
|
|
76
|
+
"core.login.mfa_webauthn_login_invalid": "WebAuthn 登入未回傳有效憑證。",
|
|
77
|
+
"core.layout.info_content": "查看目前使用者資訊",
|
|
78
|
+
"core.layout.password_content": "修改目前使用者密碼",
|
|
50
79
|
"core.cron.cycle_unit.day": "天",
|
|
51
80
|
"core.cron.cycle_unit.hour": "小時",
|
|
52
81
|
"core.cron.cycle_unit.minute": "分鐘",
|
|
@@ -134,7 +163,16 @@
|
|
|
134
163
|
"core.layout.home": "首頁",
|
|
135
164
|
"core.layout.info": "個人資訊",
|
|
136
165
|
"core.layout.password_change": "修改密碼",
|
|
166
|
+
"core.layout.password_change_required": "密碼已過期,請先修改密碼",
|
|
137
167
|
"core.layout.unnamed_menu": "未命名選單",
|
|
168
|
+
"core.layout.lock_screen": "鎖定螢幕",
|
|
169
|
+
"core.layout.lock_screen_action": "鎖定",
|
|
170
|
+
"core.layout.lock_screen_password_placeholder": "請輸入鎖屏密碼",
|
|
171
|
+
"core.layout.lock_screen_password_required": "請輸入鎖屏密碼",
|
|
172
|
+
"core.layout.lock_screen_password_invalid": "鎖屏密碼錯誤",
|
|
173
|
+
"core.layout.lock_screen_unlock_hint": "點選解鎖",
|
|
174
|
+
"core.layout.lock_screen_enter": "進入系統",
|
|
175
|
+
"core.layout.lock_screen_return_login": "返回登入",
|
|
138
176
|
"core.layout.logout_confirm": "您是否確認退出登入?",
|
|
139
177
|
"core.layout.logout_success": "退出登入成功",
|
|
140
178
|
"core.layout.not_set": "未設定",
|
|
@@ -161,15 +199,17 @@
|
|
|
161
199
|
"core.oauth.wechatmp": "微信公眾號",
|
|
162
200
|
"core.oauth.wechatwork": "企業微信",
|
|
163
201
|
"core.oauth.unknown": "未知方式",
|
|
164
|
-
"core.password.error": "
|
|
202
|
+
"core.password.error": "密碼不符合目前生效的密碼策略",
|
|
165
203
|
"core.password.crypto_unsupported": "當前環境不支援密碼加密",
|
|
166
204
|
"core.password.required": "密碼不能為空",
|
|
205
|
+
"core.password.verify_title": "驗證密碼",
|
|
206
|
+
"core.password.verify_label": "當前密碼",
|
|
167
207
|
"core.password.strength": "密碼強度",
|
|
168
208
|
"core.password.strength.empty": "未輸入",
|
|
169
209
|
"core.password.strength.high": "高",
|
|
170
210
|
"core.password.strength.low": "低",
|
|
171
211
|
"core.password.strength.medium": "中",
|
|
172
|
-
"core.password.tip": "
|
|
212
|
+
"core.password.tip": "密碼要求以目前生效的密碼策略為準。",
|
|
173
213
|
"core.theme.accordion": "選單手風琴",
|
|
174
214
|
"core.theme.aside_inverted": "側邊欄反轉色",
|
|
175
215
|
"core.theme.aside_inverted_tip": "側邊欄顏色變為深色模式",
|
|
@@ -253,11 +293,15 @@
|
|
|
253
293
|
"common.dialog.resource_field": "{field}:{value}",
|
|
254
294
|
"common.dialog.status_change": "是否確定{action}{resource}?\n{field}:{value}",
|
|
255
295
|
"common.field.created_at": "建立時間",
|
|
296
|
+
"common.field.department": "部門",
|
|
297
|
+
"common.field.post": "崗位",
|
|
256
298
|
"common.field.remark": "備註",
|
|
299
|
+
"common.field.role": "角色",
|
|
257
300
|
"common.field.sort": "排序",
|
|
258
301
|
"common.field.status": "狀態",
|
|
259
302
|
"common.field.tenant": "租戶",
|
|
260
303
|
"common.field.updated_at": "更新時間",
|
|
304
|
+
"common.field.user": "使用者",
|
|
261
305
|
"common.message.create_success": "新增{resource}成功",
|
|
262
306
|
"common.message.delete_success": "刪除{resource}成功",
|
|
263
307
|
"common.message.load_children_failed": "載入{resource}子節點失敗",
|
|
@@ -276,5 +320,9 @@
|
|
|
276
320
|
"common.value.yes": "是",
|
|
277
321
|
"common.value.no": "否",
|
|
278
322
|
"common.value.unknown": "未知",
|
|
279
|
-
"common.value.none": "無"
|
|
323
|
+
"common.value.none": "無",
|
|
324
|
+
"common.value.top_level": "頂級節點",
|
|
325
|
+
"common.resource.default": "{resource}",
|
|
326
|
+
"common.action.delete_resource": "刪除{resource}",
|
|
327
|
+
"common.action.set_field_status": "設定{field}"
|
|
280
328
|
}
|
|
@@ -43,10 +43,8 @@ export interface AdminHeaderTool {
|
|
|
43
43
|
export interface AdminUserMenuAction {
|
|
44
44
|
/** 操作唯一名称。 */
|
|
45
45
|
name: string;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/** 兼容未迁移模块的静态显示名称。 */
|
|
49
|
-
label?: string;
|
|
46
|
+
/** 操作显示名称对应的稳定语言键。 */
|
|
47
|
+
labelKey: string;
|
|
50
48
|
/** 对应后端动态菜单名称,菜单不存在时不显示操作。 */
|
|
51
49
|
menuName: string;
|
|
52
50
|
/** 操作图标。 */
|
|
@@ -2,8 +2,11 @@ export { default } from "./utils/request";
|
|
|
2
2
|
export {
|
|
3
3
|
ensureAccessToken,
|
|
4
4
|
getRequestAccessToken,
|
|
5
|
+
handlePasswordChangeRequired,
|
|
5
6
|
handleAuthExpired,
|
|
6
7
|
hasValidAccessToken,
|
|
8
|
+
clearPasswordChangeRequired,
|
|
9
|
+
passwordChangeState,
|
|
7
10
|
requestBaseURL
|
|
8
11
|
} from "./utils/request";
|
|
9
12
|
export { getLocaleRequestHeaders } from "./locales";
|
|
@@ -7,6 +7,8 @@ import NProgress from "../config/nprogress";
|
|
|
7
7
|
import { isUnmatchedRoute } from "../utils/router";
|
|
8
8
|
import { ensureAccessToken } from "../utils/request";
|
|
9
9
|
import { t } from "../locales";
|
|
10
|
+
import { useUserStore } from "../stores/modules/user";
|
|
11
|
+
import { setAdminDocumentTitle } from "../documentTitle";
|
|
10
12
|
|
|
11
13
|
const mode = import.meta.env.VITE_ROUTER_MODE;
|
|
12
14
|
|
|
@@ -42,20 +44,15 @@ const router = createRouter({
|
|
|
42
44
|
* */
|
|
43
45
|
router.beforeEach(async to => {
|
|
44
46
|
const authStore = useAuthStore();
|
|
47
|
+
const userStore = useUserStore();
|
|
45
48
|
const redirectQuery = typeof to.query.redirect === "string" ? to.query.redirect : "";
|
|
46
49
|
|
|
47
50
|
// 1.NProgress 开始
|
|
48
51
|
NProgress.start();
|
|
49
52
|
|
|
50
|
-
// 2.动态设置标题
|
|
51
|
-
const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
|
52
|
-
const titleKey = typeof to.meta.titleKey === "string" ? to.meta.titleKey : "";
|
|
53
|
-
const routeTitle = titleKey ? t(titleKey) : String(to.meta.title ?? "");
|
|
54
|
-
document.title = routeTitle ? `${routeTitle} - ${title}` : title;
|
|
55
|
-
|
|
56
53
|
const hasAccessToken = await ensureAccessToken();
|
|
57
54
|
|
|
58
|
-
//
|
|
55
|
+
// 2.判断是访问登陆页,有 Token 就在当前页面,没有 Token 重置路由到登陆页
|
|
59
56
|
if (to.path.toLocaleLowerCase() === LOGIN_URL) {
|
|
60
57
|
const hasOauthCallback = typeof to.query.oauth_ticket === "string" || typeof to.query.oauth_error === "string";
|
|
61
58
|
if (hasOauthCallback) {
|
|
@@ -71,10 +68,10 @@ router.beforeEach(async to => {
|
|
|
71
68
|
return true;
|
|
72
69
|
}
|
|
73
70
|
|
|
74
|
-
//
|
|
71
|
+
// 3.判断访问页面是否在路由白名单地址(静态路由)中,如果存在直接放行
|
|
75
72
|
if (ROUTER_WHITE_LIST.includes(to.path)) return true;
|
|
76
73
|
|
|
77
|
-
//
|
|
74
|
+
// 4.判断是否有可用 Token,没有重定向到 login 页面
|
|
78
75
|
if (!hasAccessToken) {
|
|
79
76
|
const redirect = to.path === LOGIN_URL ? undefined : to.fullPath;
|
|
80
77
|
return {
|
|
@@ -84,24 +81,25 @@ router.beforeEach(async to => {
|
|
|
84
81
|
};
|
|
85
82
|
}
|
|
86
83
|
|
|
87
|
-
//
|
|
84
|
+
// 5.如果没有菜单列表,就重新请求菜单列表并添加动态路由
|
|
88
85
|
if (!authStore.authMenuListGet.length) {
|
|
86
|
+
await userStore.getUserInfo();
|
|
89
87
|
await initDynamicRouter();
|
|
90
88
|
if (isUnmatchedRoute(router, to.path)) return getFirstAccessibleRoutePath();
|
|
91
89
|
return { ...to, replace: true };
|
|
92
90
|
}
|
|
93
91
|
|
|
94
|
-
//
|
|
92
|
+
// 5.1 菜单已恢复但路由实例尚未重新挂载时,补跑一次动态路由注册,避免刷新或登录首跳直接命中 404。
|
|
95
93
|
if (isUnmatchedRoute(router, to.path)) {
|
|
96
94
|
await initDynamicRouter();
|
|
97
95
|
if (isUnmatchedRoute(router, to.path)) return getFirstAccessibleRoutePath();
|
|
98
96
|
return { ...to, replace: true };
|
|
99
97
|
}
|
|
100
98
|
|
|
101
|
-
//
|
|
99
|
+
// 6.存储 routerName 做按钮权限筛选
|
|
102
100
|
authStore.setRouteName(to.name as string);
|
|
103
101
|
|
|
104
|
-
//
|
|
102
|
+
// 7.正常访问页面
|
|
105
103
|
return true;
|
|
106
104
|
});
|
|
107
105
|
|
|
@@ -139,8 +137,11 @@ router.onError(error => {
|
|
|
139
137
|
/**
|
|
140
138
|
* @description 路由跳转结束
|
|
141
139
|
* */
|
|
142
|
-
router.afterEach(
|
|
140
|
+
router.afterEach(to => {
|
|
143
141
|
NProgress.done();
|
|
142
|
+
const titleKey = typeof to.meta.titleKey === "string" ? to.meta.titleKey : "";
|
|
143
|
+
const routeTitle = titleKey ? t(titleKey) : String(to.meta.title ?? "");
|
|
144
|
+
setAdminDocumentTitle(routeTitle);
|
|
144
145
|
});
|
|
145
146
|
|
|
146
147
|
export default router;
|