@qlover/create-app 0.4.1 → 0.4.2
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/CHANGELOG.md +37 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/react-app/.env +1 -2
- package/templates/react-app/README.md +70 -8
- package/templates/react-app/config/app.router.json +13 -13
- package/templates/react-app/config/common.ts +8 -0
- package/templates/react-app/config/i18n.ts +3 -1
- package/templates/react-app/config/{Identifier.I18n.ts → identifier/I18n.ts} +321 -3
- package/templates/react-app/index.html +1 -1
- package/templates/react-app/public/locales/en/common.json +54 -8
- package/templates/react-app/public/locales/zh/common.json +54 -8
- package/templates/react-app/public/router-root/logo.svg +1 -0
- package/templates/react-app/src/App.tsx +6 -3
- package/templates/react-app/src/base/cases/PublicAssetsPath.ts +17 -0
- package/templates/react-app/src/base/port/LoginInterface.ts +8 -0
- package/templates/react-app/src/base/port/StoreInterface.ts +58 -0
- package/templates/react-app/src/base/services/I18nService.ts +15 -9
- package/templates/react-app/src/{uikit/controllers/RouterController.ts → base/services/RouteService.ts} +12 -12
- package/templates/react-app/src/{uikit/controllers/UserController.ts → base/services/UserService.ts} +21 -11
- package/templates/react-app/src/core/bootstrap.ts +1 -1
- package/templates/react-app/src/core/registers/RegisterCommon.ts +11 -1
- package/templates/react-app/src/core/registers/RegisterControllers.ts +3 -12
- package/templates/react-app/src/pages/auth/Layout.tsx +5 -5
- package/templates/react-app/src/pages/auth/Login.tsx +50 -29
- package/templates/react-app/src/pages/auth/Register.tsx +238 -1
- package/templates/react-app/src/pages/base/About.tsx +1 -1
- package/templates/react-app/src/pages/base/ErrorIdentifier.tsx +2 -2
- package/templates/react-app/src/pages/base/Executor.tsx +4 -4
- package/templates/react-app/src/pages/base/Home.tsx +1 -1
- package/templates/react-app/src/pages/base/JSONStorage.tsx +3 -3
- package/templates/react-app/src/pages/base/Request.tsx +4 -4
- package/templates/react-app/src/pages/base/components/BaseHeader.tsx +8 -2
- package/templates/react-app/src/uikit/components/LanguageSwitcher.tsx +7 -7
- package/templates/react-app/src/uikit/components/ThemeSwitcher.tsx +3 -3
- package/templates/react-app/src/uikit/contexts/BaseRouteContext.ts +1 -1
- package/templates/react-app/src/uikit/controllers/ExecutorController.ts +6 -3
- package/templates/react-app/src/uikit/controllers/JSONStorageController.ts +6 -3
- package/templates/react-app/src/uikit/controllers/RequestController.ts +3 -4
- package/templates/react-app/src/uikit/hooks/useDocumentTitle.ts +15 -0
- package/templates/react-app/src/uikit/hooks/useStore.ts +12 -0
- package/templates/react-app/src/uikit/providers/BaseRouteProvider.tsx +7 -1
- package/templates/react-app/src/uikit/providers/ProcessProvider.tsx +7 -7
- package/templates/react-app/vite.config.ts +20 -11
- /package/templates/react-app/config/{Identifier.Error.ts → identifier/Error.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @qlover/create-app
|
|
2
2
|
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
#### ✨ Features
|
|
8
|
+
|
|
9
|
+
- **create-app:** enhance routing and configuration with router prefix and new services ([b32795d](https://github.com/qlover/fe-base/commit/b32795d02af4234d4708a5bdcb111bf8d2a54bd6)) ([#430](https://github.com/qlover/fe-base/pull/430))
|
|
10
|
+
|
|
11
|
+
- Introduced a router prefix in the configuration to manage asset paths and API routes more effectively.
|
|
12
|
+
- Updated the application to utilize the new RouteService for routing logic, replacing the previous RouterController.
|
|
13
|
+
- Refactored user authentication handling to use UserService, improving modularity and maintainability.
|
|
14
|
+
- Added PublicAssetsPath service to manage public asset paths dynamically based on the router prefix.
|
|
15
|
+
- Updated localization files to include additional keys and ensure consistency across languages.
|
|
16
|
+
- Modified various components to integrate the new services and ensure proper routing and asset management.
|
|
17
|
+
|
|
18
|
+
This update enhances the overall structure and flexibility of the application, paving the way for future improvements.
|
|
19
|
+
|
|
20
|
+
- **create-app:** enhance login and registration features with improved localization and form handling ([a3724e5](https://github.com/qlover/fe-base/commit/a3724e5e75c8708dd00684ece563d9e1c63c0d00)) ([#430](https://github.com/qlover/fe-base/pull/430))
|
|
21
|
+
|
|
22
|
+
- Updated routing configuration to include localized titles for various pages, enhancing user experience.
|
|
23
|
+
- Added new keys for login and registration in localization files for both English and Chinese.
|
|
24
|
+
- Implemented a registration form with validation and user feedback, integrating with the UserService for account creation.
|
|
25
|
+
- Enhanced the Login component to utilize localized strings for better accessibility and clarity.
|
|
26
|
+
- Refactored the I18nService to support dynamic title updates based on the current route.
|
|
27
|
+
|
|
28
|
+
This update significantly improves the user interface and experience for authentication processes within the application.
|
|
29
|
+
|
|
30
|
+
- **create-app:** refactor internationalization and store management ([c86ed98](https://github.com/qlover/fe-base/commit/c86ed9818d844d4059878c11897051a6c504a333)) ([#430](https://github.com/qlover/fe-base/pull/430))
|
|
31
|
+
|
|
32
|
+
- Updated file structure for internationalization resources, moving identifiers to a new directory for better organization.
|
|
33
|
+
- Introduced new error and i18n identifier files to enhance localization support.
|
|
34
|
+
- Refactored store management by implementing a new StoreInterface, improving state management across services.
|
|
35
|
+
- Replaced deprecated useSliceStore with a new useStore hook for better integration with the updated store architecture.
|
|
36
|
+
- Enhanced README documentation to reflect changes in project structure and build optimizations.
|
|
37
|
+
|
|
38
|
+
This update significantly improves the maintainability and scalability of the application, paving the way for future enhancements.
|
|
39
|
+
|
|
3
40
|
## 0.4.1
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -2378,7 +2378,7 @@ var Generator = class {
|
|
|
2378
2378
|
|
|
2379
2379
|
// package.json
|
|
2380
2380
|
var package_default = {
|
|
2381
|
-
version: "0.4.
|
|
2381
|
+
version: "0.4.2",
|
|
2382
2382
|
description: "Create a new app with a single command"};
|
|
2383
2383
|
function programArgs() {
|
|
2384
2384
|
const program = new Command();
|
package/package.json
CHANGED
package/templates/react-app/.env
CHANGED
|
@@ -10,7 +10,6 @@ FE_RELEASE=false
|
|
|
10
10
|
FE_RELEASE_ENV=production
|
|
11
11
|
|
|
12
12
|
# ===== build
|
|
13
|
-
VITE_PUBLIC_PATH=
|
|
14
13
|
VITE_SERVER_PORT=3200
|
|
15
14
|
|
|
16
15
|
# ===== app config
|
|
@@ -21,5 +20,5 @@ VITE_OPEN_AI_TOKEN=sk-proj-1234567890
|
|
|
21
20
|
VITE_OPEN_AI_TOKEN_PREFIX=Bearer
|
|
22
21
|
VITE_OPEN_AI_REQUIRE_TOKEN=true
|
|
23
22
|
VITE_LOGIN_USER=admin
|
|
24
|
-
VITE_LOGIN_PASSWORD=123456
|
|
23
|
+
VITE_LOGIN_PASSWORD=prod-123456
|
|
25
24
|
VITE_FE_API_BASE_URL=https://feapi.example.com/
|
|
@@ -85,7 +85,7 @@ pnpm test
|
|
|
85
85
|
项目使用 `@brain-toolkit/ts2locales` 插件从 TypeScript 注释自动生成国际化资源:
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
|
-
// config/Identifier
|
|
88
|
+
// config/Identifier/I18n.ts
|
|
89
89
|
export const Messages = {
|
|
90
90
|
/**
|
|
91
91
|
* @description Home page welcome message
|
|
@@ -116,11 +116,11 @@ export default defineConfig({
|
|
|
116
116
|
locales: i18nConfig.supportedLngs,
|
|
117
117
|
options: [
|
|
118
118
|
{
|
|
119
|
-
source: './config/Identifier
|
|
119
|
+
source: './config/Identifier/Error.ts',
|
|
120
120
|
target: './public/locales/{{lng}}/common.json'
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
source: './config/Identifier
|
|
123
|
+
source: './config/Identifier/I18n.ts',
|
|
124
124
|
target: './public/locales/{{lng}}/common.json'
|
|
125
125
|
}
|
|
126
126
|
]
|
|
@@ -147,7 +147,7 @@ await i18nService.changeLanguage('zh');
|
|
|
147
147
|
|
|
148
148
|
```typescript
|
|
149
149
|
import { useBaseRoutePage } from '@/uikit/contexts/BaseRouteContext';
|
|
150
|
-
import * as i18nKeys from '@config/Identifier
|
|
150
|
+
import * as i18nKeys from '@config/Identifier/I18n';
|
|
151
151
|
|
|
152
152
|
function MyComponent() {
|
|
153
153
|
const { t } = useBaseRoutePage();
|
|
@@ -181,8 +181,8 @@ function Header() {
|
|
|
181
181
|
|
|
182
182
|
1. 国际化标识符管理:
|
|
183
183
|
|
|
184
|
-
- 在 `config/Identifier
|
|
185
|
-
- 在 `config/Identifier
|
|
184
|
+
- 在 `config/Identifier/I18n.ts` 中集中管理UI文本
|
|
185
|
+
- 在 `config/Identifier/Error.ts` 中集中管理错误信息
|
|
186
186
|
- 使用有意义的 key 命名(如:'page.home.title')
|
|
187
187
|
|
|
188
188
|
2. TypeScript 注释规范:
|
|
@@ -198,7 +198,7 @@ function Header() {
|
|
|
198
198
|
|
|
199
199
|
4. 组件开发:
|
|
200
200
|
- 使用 `useBaseRoutePage` hook 获取翻译函数
|
|
201
|
-
- 从 `@config/Identifier
|
|
201
|
+
- 从 `@config/Identifier/I18n` 引入国际化 key
|
|
202
202
|
- 避免硬编码文本,始终使用国际化 key
|
|
203
203
|
|
|
204
204
|
### 主题系统
|
|
@@ -217,7 +217,7 @@ function Header() {
|
|
|
217
217
|
|
|
218
218
|
```typescript
|
|
219
219
|
@injectable()
|
|
220
|
-
export class RequestController extends
|
|
220
|
+
export class RequestController extends StoreInterface<RequestControllerState> {
|
|
221
221
|
constructor(
|
|
222
222
|
@inject(FeApi) private readonly feApi: FeApi,
|
|
223
223
|
@inject(UserApi) private readonly userApi: UserApi
|
|
@@ -375,3 +375,65 @@ const response = await api.request({
|
|
|
375
375
|
1. 在 `public/locales` 添加翻译文件
|
|
376
376
|
2. 使用 `useTranslation` hook 进行调用
|
|
377
377
|
3. 支持按需加载语言包
|
|
378
|
+
|
|
379
|
+
### 构建优化
|
|
380
|
+
|
|
381
|
+
项目使用 Vite 进行构建,并进行了以下优化:
|
|
382
|
+
|
|
383
|
+
#### 代码分割
|
|
384
|
+
|
|
385
|
+
自动进行智能代码分割,将代码分为以下几个主要块:
|
|
386
|
+
|
|
387
|
+
- react-vendor: React 核心库
|
|
388
|
+
- antd-core: Ant Design 核心组件
|
|
389
|
+
- antd-basic: 基础 UI 组件
|
|
390
|
+
- antd-advanced: 高级 UI 组件
|
|
391
|
+
- utils: 工具函数
|
|
392
|
+
- i18n: 国际化相关
|
|
393
|
+
|
|
394
|
+
#### 构建优化配置
|
|
395
|
+
|
|
396
|
+
```typescript
|
|
397
|
+
build: {
|
|
398
|
+
// 分块大小警告限制设置为 600kb
|
|
399
|
+
chunkSizeWarningLimit: 600,
|
|
400
|
+
// 使用 terser 进行代码压缩
|
|
401
|
+
minify: 'terser',
|
|
402
|
+
terserOptions: {
|
|
403
|
+
compress: {
|
|
404
|
+
// 移除控制台输出和调试器语句
|
|
405
|
+
drop_console: true,
|
|
406
|
+
drop_debugger: true,
|
|
407
|
+
// 移除特定的控制台函数调用
|
|
408
|
+
pure_funcs: ['console.log', 'console.info', 'console.debug']
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### 项目配置
|
|
415
|
+
|
|
416
|
+
#### 环境变量
|
|
417
|
+
|
|
418
|
+
- 使用 `@qlover/corekit-bridge/vite-env-config` 管理环境变量
|
|
419
|
+
- 自动注入应用名称和版本信息
|
|
420
|
+
- 支持环境变量前缀配置
|
|
421
|
+
|
|
422
|
+
#### 样式配置
|
|
423
|
+
|
|
424
|
+
- 集成 Tailwind CSS
|
|
425
|
+
- 按需加载 Ant Design 组件样式
|
|
426
|
+
- 支持主题模式覆盖
|
|
427
|
+
|
|
428
|
+
#### 开发服务器
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
# 默认端口 3200,可通过环境变量配置
|
|
432
|
+
VITE_SERVER_PORT=3000 pnpm dev
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
#### 测试配置
|
|
436
|
+
|
|
437
|
+
- 使用 Vitest 进行单元测试
|
|
438
|
+
- 支持 JSDOM 环境
|
|
439
|
+
- 内置测试工具配置
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"index": true,
|
|
20
20
|
"element": "base/Home",
|
|
21
21
|
"meta": {
|
|
22
|
-
"title": "
|
|
22
|
+
"title": "page.home.title",
|
|
23
23
|
"icon": "home",
|
|
24
24
|
"localNamespace": "common"
|
|
25
25
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"path": "about",
|
|
29
29
|
"element": "base/About",
|
|
30
30
|
"meta": {
|
|
31
|
-
"title": "
|
|
31
|
+
"title": "page.about.title",
|
|
32
32
|
"icon": "info",
|
|
33
33
|
"localNamespace": "common"
|
|
34
34
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"path": "jsonStorage",
|
|
38
38
|
"element": "base/JSONStorage",
|
|
39
39
|
"meta": {
|
|
40
|
-
"title": "
|
|
40
|
+
"title": "page.jsonstorage.title",
|
|
41
41
|
"icon": "info",
|
|
42
42
|
"localNamespace": "common"
|
|
43
43
|
}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"path": "request",
|
|
47
47
|
"element": "base/Request",
|
|
48
48
|
"meta": {
|
|
49
|
-
"title": "
|
|
49
|
+
"title": "page.request.title",
|
|
50
50
|
"icon": "info",
|
|
51
51
|
"localNamespace": "common"
|
|
52
52
|
}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"path": "executor",
|
|
56
56
|
"element": "base/Executor",
|
|
57
57
|
"meta": {
|
|
58
|
-
"title": "
|
|
58
|
+
"title": "page.executor.title",
|
|
59
59
|
"icon": "info",
|
|
60
60
|
"localNamespace": "common"
|
|
61
61
|
}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"path": "errorIdentifier",
|
|
65
65
|
"element": "base/ErrorIdentifier",
|
|
66
66
|
"meta": {
|
|
67
|
-
"title": "
|
|
67
|
+
"title": "page.error_identifier.title",
|
|
68
68
|
"icon": "info",
|
|
69
69
|
"localNamespace": "common"
|
|
70
70
|
}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"element": "404",
|
|
75
75
|
"meta": {
|
|
76
76
|
"category": "common",
|
|
77
|
-
"title": "404",
|
|
77
|
+
"title": "page.404.title",
|
|
78
78
|
"layout": "blank",
|
|
79
79
|
"localNamespace": "common"
|
|
80
80
|
}
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"element": "500",
|
|
85
85
|
"meta": {
|
|
86
86
|
"category": "common",
|
|
87
|
-
"title": "500",
|
|
87
|
+
"title": "page.500.title",
|
|
88
88
|
"layout": "blank",
|
|
89
89
|
"localNamespace": "common"
|
|
90
90
|
}
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"path": "login",
|
|
108
108
|
"element": "auth/Login",
|
|
109
109
|
"meta": {
|
|
110
|
-
"title": "
|
|
110
|
+
"title": "page.login.title",
|
|
111
111
|
"icon": "info",
|
|
112
112
|
"localNamespace": "common"
|
|
113
113
|
}
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"path": "register",
|
|
117
117
|
"element": "auth/Register",
|
|
118
118
|
"meta": {
|
|
119
|
-
"title": "
|
|
119
|
+
"title": "page.register.title",
|
|
120
120
|
"icon": "info",
|
|
121
121
|
"localNamespace": "common"
|
|
122
122
|
}
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"element": "404",
|
|
130
130
|
"meta": {
|
|
131
131
|
"category": "common",
|
|
132
|
-
"title": "404",
|
|
132
|
+
"title": "page.404.title",
|
|
133
133
|
"layout": "blank",
|
|
134
134
|
"localNamespace": "common"
|
|
135
135
|
}
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"element": "500",
|
|
140
140
|
"meta": {
|
|
141
141
|
"category": "common",
|
|
142
|
-
"title": "500",
|
|
142
|
+
"title": "page.500.title",
|
|
143
143
|
"layout": "blank",
|
|
144
144
|
"localNamespace": "common"
|
|
145
145
|
}
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"element": "404",
|
|
150
150
|
"meta": {
|
|
151
151
|
"category": "common",
|
|
152
|
-
"title": "404",
|
|
152
|
+
"title": "page.404.title",
|
|
153
153
|
"layout": "blank",
|
|
154
154
|
"localNamespace": "common"
|
|
155
155
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { routerPrefix } from './common';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
fallbackLng: 'en',
|
|
3
5
|
debug: false,
|
|
@@ -7,7 +9,7 @@ export default {
|
|
|
7
9
|
ns: ['common'],
|
|
8
10
|
defaultNS: 'common',
|
|
9
11
|
backend: {
|
|
10
|
-
loadPath: '/locales/{{lng}}/{{ns}}.json'
|
|
12
|
+
loadPath: routerPrefix + '/locales/{{lng}}/{{ns}}.json'
|
|
11
13
|
},
|
|
12
14
|
supportedLngs: ['en', 'zh']
|
|
13
15
|
} as const;
|
|
@@ -152,6 +152,20 @@ export const LOGIN_PASSWORD = 'login.password';
|
|
|
152
152
|
*/
|
|
153
153
|
export const LOGIN_BUTTON = 'login.login';
|
|
154
154
|
|
|
155
|
+
/**
|
|
156
|
+
* @description Login page description
|
|
157
|
+
* @localZh 欢迎来到未来学习
|
|
158
|
+
* @localEn Welcome to the future of learning
|
|
159
|
+
*/
|
|
160
|
+
export const LOGIN_WELCOME = 'login.welcome';
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @description Login page description
|
|
164
|
+
* @localZh 解锁个性化 AI 驱动的学习体验,加速您的知识旅程。
|
|
165
|
+
* @localEn Unlock personalized AI-powered learning experiences designed to accelerate your knowledge journey.
|
|
166
|
+
*/
|
|
167
|
+
export const LOGIN_SUBTITLE = 'login.subtitle';
|
|
168
|
+
|
|
155
169
|
/**
|
|
156
170
|
* @description Request timeout message
|
|
157
171
|
* @localZh 请求超时
|
|
@@ -367,7 +381,7 @@ export const PAGE_EXECUTOR_TITLE = 'page.executor.title';
|
|
|
367
381
|
* @localZh 错误标识符
|
|
368
382
|
* @localEn Error Identifier
|
|
369
383
|
*/
|
|
370
|
-
export const PAGE_ERROR_IDENTIFIER_TITLE = 'page.
|
|
384
|
+
export const PAGE_ERROR_IDENTIFIER_TITLE = 'page.error_identifier.title';
|
|
371
385
|
|
|
372
386
|
/**
|
|
373
387
|
* @description Error Identifier page description
|
|
@@ -847,8 +861,8 @@ export const PAGE_ERROR_IDENTIFIER_MAIN_TITLE =
|
|
|
847
861
|
|
|
848
862
|
/**
|
|
849
863
|
* @description ErrorIdentifier page description
|
|
850
|
-
* @localZh 来自 '@config/Identifier
|
|
851
|
-
* @localEn Identifier From: '@config/Identifier
|
|
864
|
+
* @localZh 来自 '@config/Identifier/Error' 的标识符
|
|
865
|
+
* @localEn Identifier From: '@config/Identifier/Error'
|
|
852
866
|
*/
|
|
853
867
|
export const PAGE_ERROR_IDENTIFIER_SOURCE_DESCRIPTION =
|
|
854
868
|
'page.error.identifier.source_description';
|
|
@@ -1046,3 +1060,307 @@ export const COMMON_OK = 'common.ok';
|
|
|
1046
1060
|
* @Codebase
|
|
1047
1061
|
*/
|
|
1048
1062
|
export const COMMON_CANCEL = 'common.cancel';
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* @description Login page forgot password text
|
|
1066
|
+
* @localZh 忘记密码?
|
|
1067
|
+
* @localEn Forgot your password?
|
|
1068
|
+
*/
|
|
1069
|
+
export const LOGIN_FORGOT_PASSWORD = 'login.forgot_password';
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* @description Login page continue with text
|
|
1073
|
+
* @localZh 或继续使用
|
|
1074
|
+
* @localEn or continue with
|
|
1075
|
+
*/
|
|
1076
|
+
export const LOGIN_CONTINUE_WITH = 'login.continue_with';
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* @description Login with Google button text
|
|
1080
|
+
* @localZh 使用 Google 登录
|
|
1081
|
+
* @localEn Sign in with Google
|
|
1082
|
+
*/
|
|
1083
|
+
export const LOGIN_WITH_GOOGLE = 'login.with_google';
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* @description Login page no account text
|
|
1087
|
+
* @localZh 还没有账号?
|
|
1088
|
+
* @localEn Don't have an account?
|
|
1089
|
+
*/
|
|
1090
|
+
export const LOGIN_NO_ACCOUNT = 'login.no_account';
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* @description Login page create account link text
|
|
1094
|
+
* @localZh 在此创建
|
|
1095
|
+
* @localEn Create one here
|
|
1096
|
+
*/
|
|
1097
|
+
export const LOGIN_CREATE_ACCOUNT = 'login.create_account';
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* @description Login page email validation message
|
|
1101
|
+
* @localZh 请输入您的邮箱!
|
|
1102
|
+
* @localEn Please input your email!
|
|
1103
|
+
*/
|
|
1104
|
+
export const LOGIN_EMAIL_REQUIRED = 'login.email_required';
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* @description Login page password validation message
|
|
1108
|
+
* @localZh 请输入您的密码!
|
|
1109
|
+
* @localEn Please input your password!
|
|
1110
|
+
*/
|
|
1111
|
+
export const LOGIN_PASSWORD_REQUIRED = 'login.password_required';
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* @description Login page feature item - AI learning paths
|
|
1115
|
+
* @localZh AI驱动的个性化学习路径
|
|
1116
|
+
* @localEn AI-powered personalized learning paths
|
|
1117
|
+
*/
|
|
1118
|
+
export const LOGIN_FEATURE_AI_PATHS = 'login.feature.ai_paths';
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* @description Login page feature item - Smart recommendations
|
|
1122
|
+
* @localZh 智能内容推荐
|
|
1123
|
+
* @localEn Smart content recommendations
|
|
1124
|
+
*/
|
|
1125
|
+
export const LOGIN_FEATURE_SMART_RECOMMENDATIONS =
|
|
1126
|
+
'login.feature.smart_recommendations';
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* @description Login page feature item - Progress tracking
|
|
1130
|
+
* @localZh 实时进度追踪
|
|
1131
|
+
* @localEn Real-time progress tracking
|
|
1132
|
+
*/
|
|
1133
|
+
export const LOGIN_FEATURE_PROGRESS_TRACKING =
|
|
1134
|
+
'login.feature.progress_tracking';
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* @description Login page email input title
|
|
1138
|
+
* @localZh 输入邮箱
|
|
1139
|
+
* @localEn Enter email
|
|
1140
|
+
*/
|
|
1141
|
+
export const LOGIN_EMAIL_TITLE = 'login.email.title';
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* @description Login page password input title
|
|
1145
|
+
* @localZh 输入密码
|
|
1146
|
+
* @localEn Enter password
|
|
1147
|
+
*/
|
|
1148
|
+
export const LOGIN_PASSWORD_TITLE = 'login.password.title';
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* @description Login page forgot password link title
|
|
1152
|
+
* @localZh 重置密码
|
|
1153
|
+
* @localEn Reset password
|
|
1154
|
+
*/
|
|
1155
|
+
export const LOGIN_FORGOT_PASSWORD_TITLE = 'login.forgot_password.title';
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* @description Login page submit button title
|
|
1159
|
+
* @localZh 登录账号
|
|
1160
|
+
* @localEn Sign in to account
|
|
1161
|
+
*/
|
|
1162
|
+
export const LOGIN_BUTTON_TITLE = 'login.button.title';
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* @description Login page Google sign in button title
|
|
1166
|
+
* @localZh 使用Google账号登录
|
|
1167
|
+
* @localEn Sign in with Google account
|
|
1168
|
+
*/
|
|
1169
|
+
export const LOGIN_WITH_GOOGLE_TITLE = 'login.with_google.title';
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* @description Login page create account link title
|
|
1173
|
+
* @localZh 创建新账号
|
|
1174
|
+
* @localEn Create new account
|
|
1175
|
+
*/
|
|
1176
|
+
export const LOGIN_CREATE_ACCOUNT_TITLE = 'login.create_account.title';
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* @description Register page title
|
|
1180
|
+
* @localZh 创建账号
|
|
1181
|
+
* @localEn Create Account
|
|
1182
|
+
*/
|
|
1183
|
+
export const REGISTER_TITLE = 'register.title';
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* @description Register page subtitle
|
|
1187
|
+
* @localZh 开始您的学习之旅
|
|
1188
|
+
* @localEn Start your learning journey
|
|
1189
|
+
*/
|
|
1190
|
+
export const REGISTER_SUBTITLE = 'register.subtitle';
|
|
1191
|
+
|
|
1192
|
+
/**
|
|
1193
|
+
* @description Register page username field
|
|
1194
|
+
* @localZh 用户名
|
|
1195
|
+
* @localEn Username
|
|
1196
|
+
*/
|
|
1197
|
+
export const REGISTER_USERNAME = 'register.username';
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* @description Register page username required message
|
|
1201
|
+
* @localZh 请输入用户名!
|
|
1202
|
+
* @localEn Please input your username!
|
|
1203
|
+
*/
|
|
1204
|
+
export const REGISTER_USERNAME_REQUIRED = 'register.username_required';
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
* @description Register page email field
|
|
1208
|
+
* @localZh 邮箱
|
|
1209
|
+
* @localEn Email
|
|
1210
|
+
*/
|
|
1211
|
+
export const REGISTER_EMAIL = 'register.email';
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* @description Register page email required message
|
|
1215
|
+
* @localZh 请输入邮箱!
|
|
1216
|
+
* @localEn Please input your email!
|
|
1217
|
+
*/
|
|
1218
|
+
export const REGISTER_EMAIL_REQUIRED = 'register.email_required';
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* @description Register page password field
|
|
1222
|
+
* @localZh 密码
|
|
1223
|
+
* @localEn Password
|
|
1224
|
+
*/
|
|
1225
|
+
export const REGISTER_PASSWORD = 'register.password';
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* @description Register page password required message
|
|
1229
|
+
* @localZh 请输入密码!
|
|
1230
|
+
* @localEn Please input your password!
|
|
1231
|
+
*/
|
|
1232
|
+
export const REGISTER_PASSWORD_REQUIRED = 'register.password_required';
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* @description Register page confirm password field
|
|
1236
|
+
* @localZh 确认密码
|
|
1237
|
+
* @localEn Confirm Password
|
|
1238
|
+
*/
|
|
1239
|
+
export const REGISTER_CONFIRM_PASSWORD = 'register.confirm_password';
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* @description Register page confirm password required message
|
|
1243
|
+
* @localZh 请确认密码!
|
|
1244
|
+
* @localEn Please confirm your password!
|
|
1245
|
+
*/
|
|
1246
|
+
export const REGISTER_CONFIRM_PASSWORD_REQUIRED =
|
|
1247
|
+
'register.confirm_password_required';
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* @description Register page passwords don't match message
|
|
1251
|
+
* @localZh 两次输入的密码不匹配!
|
|
1252
|
+
* @localEn The passwords you entered don't match!
|
|
1253
|
+
*/
|
|
1254
|
+
export const REGISTER_PASSWORD_MISMATCH = 'register.password_mismatch';
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* @description Register page submit button
|
|
1258
|
+
* @localZh 注册
|
|
1259
|
+
* @localEn Register
|
|
1260
|
+
*/
|
|
1261
|
+
export const REGISTER_BUTTON = 'register.button';
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* @description Register page terms and conditions text
|
|
1265
|
+
* @localZh 注册即表示您同意我们的
|
|
1266
|
+
* @localEn By registering, you agree to our
|
|
1267
|
+
*/
|
|
1268
|
+
export const REGISTER_TERMS_PREFIX = 'register.terms_prefix';
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* @description Register page terms and conditions link
|
|
1272
|
+
* @localZh 服务条款
|
|
1273
|
+
* @localEn Terms of Service
|
|
1274
|
+
*/
|
|
1275
|
+
export const REGISTER_TERMS_LINK = 'register.terms_link';
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* @description Register page privacy policy text
|
|
1279
|
+
* @localZh 和
|
|
1280
|
+
* @localEn and
|
|
1281
|
+
*/
|
|
1282
|
+
export const REGISTER_TERMS_AND = 'register.terms_and';
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* @description Register page privacy policy link
|
|
1286
|
+
* @localZh 隐私政策
|
|
1287
|
+
* @localEn Privacy Policy
|
|
1288
|
+
*/
|
|
1289
|
+
export const REGISTER_PRIVACY_LINK = 'register.privacy_link';
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* @description Register page have account text
|
|
1293
|
+
* @localZh 已有账号?
|
|
1294
|
+
* @localEn Already have an account?
|
|
1295
|
+
*/
|
|
1296
|
+
export const REGISTER_HAVE_ACCOUNT = 'register.have_account';
|
|
1297
|
+
|
|
1298
|
+
/**
|
|
1299
|
+
* @description Register page login link
|
|
1300
|
+
* @localZh 登录
|
|
1301
|
+
* @localEn Sign in
|
|
1302
|
+
*/
|
|
1303
|
+
export const REGISTER_LOGIN_LINK = 'register.login_link';
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* @description Register page feature item - Personalized Learning
|
|
1307
|
+
* @localZh 个性化学习体验
|
|
1308
|
+
* @localEn Personalized Learning Experience
|
|
1309
|
+
*/
|
|
1310
|
+
export const REGISTER_FEATURE_PERSONALIZED = 'register.feature.personalized';
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* @description Register page feature item - Expert Support
|
|
1314
|
+
* @localZh 专家支持和指导
|
|
1315
|
+
* @localEn Expert Support and Guidance
|
|
1316
|
+
*/
|
|
1317
|
+
export const REGISTER_FEATURE_SUPPORT = 'register.feature.support';
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* @description Register page feature item - Learning Community
|
|
1321
|
+
* @localZh 活跃的学习社区
|
|
1322
|
+
* @localEn Active Learning Community
|
|
1323
|
+
*/
|
|
1324
|
+
export const REGISTER_FEATURE_COMMUNITY = 'register.feature.community';
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* @description Register page terms agreement required message
|
|
1328
|
+
* @localZh 请同意服务条款和隐私政策
|
|
1329
|
+
* @localEn Please agree to the Terms of Service and Privacy Policy
|
|
1330
|
+
*/
|
|
1331
|
+
export const REGISTER_TERMS_REQUIRED = 'register.terms_required';
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* @description Home page title
|
|
1335
|
+
* @localZh 首页
|
|
1336
|
+
* @localEn Home
|
|
1337
|
+
*/
|
|
1338
|
+
export const PAGE_HOME_TITLE = 'page.home.title';
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* @description 404 page title
|
|
1342
|
+
* @localZh 404 - 页面未找到
|
|
1343
|
+
* @localEn 404 - Page Not Found
|
|
1344
|
+
*/
|
|
1345
|
+
export const PAGE_404_TITLE = 'page.404.title';
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* @description 500 page title
|
|
1349
|
+
* @localZh 500 - 服务器错误
|
|
1350
|
+
* @localEn 500 - Server Error
|
|
1351
|
+
*/
|
|
1352
|
+
export const PAGE_500_TITLE = 'page.500.title';
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* @description Login page title
|
|
1356
|
+
* @localZh 登录
|
|
1357
|
+
* @localEn Login
|
|
1358
|
+
*/
|
|
1359
|
+
export const PAGE_LOGIN_TITLE = 'page.login.title';
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* @description Register page title
|
|
1363
|
+
* @localZh 注册
|
|
1364
|
+
* @localEn Register
|
|
1365
|
+
*/
|
|
1366
|
+
export const PAGE_REGISTER_TITLE = 'page.register.title';
|