@qlover/create-app 0.4.5 → 0.4.6

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 (161) hide show
  1. package/CHANGELOG.md +80 -35
  2. package/dist/index.cjs +11 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +10 -2418
  5. package/{templates → dist/templates}/node-lib/package.json +2 -2
  6. package/{templates → dist/templates}/react-app/README.md +6 -6
  7. package/{templates → dist/templates}/react-app/config/Identifier/Error.ts +8 -8
  8. package/dist/templates/react-app/config/Identifier/common.ts +62 -0
  9. package/dist/templates/react-app/config/Identifier/index.ts +10 -0
  10. package/dist/templates/react-app/config/Identifier/page.about.ts +181 -0
  11. package/dist/templates/react-app/config/Identifier/page.executor.ts +267 -0
  12. package/dist/templates/react-app/config/Identifier/page.home.ts +63 -0
  13. package/dist/templates/react-app/config/Identifier/page.identifiter.ts +39 -0
  14. package/dist/templates/react-app/config/Identifier/page.jsonStorage.ts +70 -0
  15. package/dist/templates/react-app/config/Identifier/page.login.ts +152 -0
  16. package/dist/templates/react-app/config/Identifier/page.register.ts +147 -0
  17. package/dist/templates/react-app/config/Identifier/page.request.ts +179 -0
  18. package/dist/templates/react-app/config/app.router.ts +163 -0
  19. package/dist/templates/react-app/config/theme.ts +11 -0
  20. package/{templates → dist/templates}/react-app/package.json +2 -2
  21. package/{templates → dist/templates}/react-app/public/locales/en/common.json +97 -116
  22. package/{templates → dist/templates}/react-app/public/locales/zh/common.json +98 -117
  23. package/{templates → dist/templates}/react-app/src/App.tsx +6 -5
  24. package/dist/templates/react-app/src/base/cases/I18nKeyErrorPlugin.ts +36 -0
  25. package/{templates → dist/templates}/react-app/src/base/cases/RouterLoader.ts +2 -1
  26. package/{templates → dist/templates}/react-app/src/base/services/I18nService.ts +4 -4
  27. package/{templates/react-app/src/base/services/ProcesserService.ts → dist/templates/react-app/src/base/services/ProcesserExecutor.ts} +15 -5
  28. package/{templates → dist/templates}/react-app/src/base/services/RouteService.ts +11 -13
  29. package/{templates → dist/templates}/react-app/src/base/services/UserService.ts +37 -21
  30. package/{templates → dist/templates}/react-app/src/base/types/Page.ts +12 -2
  31. package/{templates → dist/templates}/react-app/src/core/bootstrap.ts +1 -1
  32. package/{templates → dist/templates}/react-app/src/core/bootstraps/index.ts +3 -1
  33. package/{templates → dist/templates}/react-app/src/core/registers/RegisterCommon.ts +7 -7
  34. package/{templates → dist/templates}/react-app/src/core/registers/RegisterControllers.ts +7 -2
  35. package/{templates → dist/templates}/react-app/src/pages/404.tsx +4 -1
  36. package/{templates → dist/templates}/react-app/src/pages/500.tsx +2 -1
  37. package/{templates → dist/templates}/react-app/src/pages/auth/Layout.tsx +1 -1
  38. package/{templates/react-app/src/pages/auth/Login.tsx → dist/templates/react-app/src/pages/auth/LoginPage.tsx} +2 -2
  39. package/{templates/react-app/src/pages/auth/Register.tsx → dist/templates/react-app/src/pages/auth/RegisterPage.tsx} +3 -4
  40. package/{templates/react-app/src/pages/base/About.tsx → dist/templates/react-app/src/pages/base/AboutPage.tsx} +4 -4
  41. package/{templates/react-app/src/pages/base/ErrorIdentifier.tsx → dist/templates/react-app/src/pages/base/ErrorIdentifierPage.tsx} +3 -3
  42. package/{templates/react-app/src/pages/base/Executor.tsx → dist/templates/react-app/src/pages/base/ExecutorPage.tsx} +3 -3
  43. package/{templates/react-app/src/pages/base/Home.tsx → dist/templates/react-app/src/pages/base/HomePage.tsx} +15 -45
  44. package/{templates/react-app/src/pages/base/JSONStorage.tsx → dist/templates/react-app/src/pages/base/JSONStoragePage.tsx} +2 -2
  45. package/{templates → dist/templates}/react-app/src/pages/base/Layout.tsx +4 -4
  46. package/{templates/react-app/src/pages/base/Request.tsx → dist/templates/react-app/src/pages/base/RequestPage.tsx} +2 -2
  47. package/{templates/react-app/src/pages/base → dist/templates/react-app/src/uikit}/components/LogoutButton.tsx +1 -1
  48. package/{templates → dist/templates}/react-app/src/uikit/components/ThemeSwitcher.tsx +5 -6
  49. package/{templates → dist/templates}/react-app/src/uikit/contexts/BaseRouteContext.ts +1 -1
  50. package/{templates → dist/templates}/react-app/src/uikit/controllers/ExecutorController.ts +2 -2
  51. package/{templates → dist/templates}/react-app/src/uikit/controllers/JSONStorageController.ts +2 -2
  52. package/{templates → dist/templates}/react-app/src/uikit/controllers/RequestController.ts +1 -1
  53. package/{templates/react-app/src/uikit/hooks/useLanguageGuard.ts → dist/templates/react-app/src/uikit/hooks/useI18nGuard.ts} +1 -1
  54. package/{templates → dist/templates}/react-app/src/uikit/hooks/useStore.ts +2 -2
  55. package/dist/templates/react-app/src/uikit/hooks/userRouterService.ts +12 -0
  56. package/{templates → dist/templates}/react-app/src/uikit/providers/BaseRouteProvider.tsx +1 -0
  57. package/dist/templates/react-app/src/uikit/providers/ProcessExecutorProvider.tsx +24 -0
  58. package/dist/templates/react-app/src/uikit/providers/UserAuthProvider.tsx +16 -0
  59. package/{templates → dist/templates}/react-app/vite.config.ts +2 -1
  60. package/package.json +4 -6
  61. package/templates/react-app/config/Identifier/Auth.ts +0 -13
  62. package/templates/react-app/config/Identifier/I18n.ts +0 -1366
  63. package/templates/react-app/config/app.router.json +0 -159
  64. package/templates/react-app/config/theme.json +0 -9
  65. package/templates/react-app/src/base/port/LoginInterface.ts +0 -12
  66. package/templates/react-app/src/base/port/StoreInterface.ts +0 -58
  67. package/templates/react-app/src/uikit/providers/ProcessProvider.tsx +0 -45
  68. /package/{configs → dist/configs}/_common/.editorconfig +0 -0
  69. /package/{configs → dist/configs}/_common/.env.template +0 -0
  70. /package/{configs → dist/configs}/_common/.gitattributes +0 -0
  71. /package/{configs → dist/configs}/_common/.github/workflows/general-check.yml +0 -0
  72. /package/{configs → dist/configs}/_common/.github/workflows/release.yml +0 -0
  73. /package/{configs → dist/configs}/_common/.gitignore.template +0 -0
  74. /package/{configs → dist/configs}/_common/.husky/commit-msg +0 -0
  75. /package/{configs → dist/configs}/_common/.husky/pre-commit +0 -0
  76. /package/{configs → dist/configs}/_common/.prettierignore +0 -0
  77. /package/{configs → dist/configs}/_common/.prettierrc.js +0 -0
  78. /package/{configs → dist/configs}/_common/.vscode/extensions.json +0 -0
  79. /package/{configs → dist/configs}/_common/.vscode/react.code-snippets +0 -0
  80. /package/{configs → dist/configs}/_common/.vscode/settings.json +0 -0
  81. /package/{configs → dist/configs}/_common/commitlint.config.js +0 -0
  82. /package/{configs → dist/configs}/_common/package.json.template +0 -0
  83. /package/{configs → dist/configs}/node-lib/eslint.config.js +0 -0
  84. /package/{configs → dist/configs}/react-app/eslint.config.js +0 -0
  85. /package/{templates → dist/templates}/node-lib/__tests__/readJson.test.ts +0 -0
  86. /package/{templates → dist/templates}/node-lib/bin/test.js +0 -0
  87. /package/{templates → dist/templates}/node-lib/rollup.config.js +0 -0
  88. /package/{templates → dist/templates}/node-lib/src/index.ts +0 -0
  89. /package/{templates → dist/templates}/node-lib/src/readJson.ts +0 -0
  90. /package/{templates → dist/templates}/node-lib/tsconfig.json +0 -0
  91. /package/{templates → dist/templates}/pack-app/README.md +0 -0
  92. /package/{templates → dist/templates}/pack-app/eslint.config.js +0 -0
  93. /package/{templates → dist/templates}/pack-app/fe-config.json +0 -0
  94. /package/{templates → dist/templates}/pack-app/package.json +0 -0
  95. /package/{templates → dist/templates}/pack-app/pnpm-workspace.yaml +0 -0
  96. /package/{templates → dist/templates}/pack-app/tsconfig.json +0 -0
  97. /package/{templates → dist/templates}/pack-app/tsconfig.test.json +0 -0
  98. /package/{templates → dist/templates}/pack-app/vite.config.ts +0 -0
  99. /package/{templates → dist/templates}/react-app/.env.template +0 -0
  100. /package/{templates → dist/templates}/react-app/config/common.ts +0 -0
  101. /package/{templates → dist/templates}/react-app/config/feapi.mock.json +0 -0
  102. /package/{templates → dist/templates}/react-app/config/i18n.ts +0 -0
  103. /package/{templates → dist/templates}/react-app/index.html +0 -0
  104. /package/{templates → dist/templates}/react-app/postcss.config.js +0 -0
  105. /package/{templates → dist/templates}/react-app/public/logo.svg +0 -0
  106. /package/{templates → dist/templates}/react-app/public/router-root/logo.svg +0 -0
  107. /package/{templates → dist/templates}/react-app/src/assets/react.svg +0 -0
  108. /package/{templates → dist/templates}/react-app/src/base/apis/AiApi.ts +0 -0
  109. /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApi.ts +0 -0
  110. /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApiAdapter.ts +0 -0
  111. /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApiBootstarp.ts +0 -0
  112. /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApiType.ts +0 -0
  113. /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApi.ts +0 -0
  114. /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApiAdapter.ts +0 -0
  115. /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApiBootstarp.ts +0 -0
  116. /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApiType.ts +0 -0
  117. /package/{templates → dist/templates}/react-app/src/base/cases/AppConfig.ts +0 -0
  118. /package/{templates → dist/templates}/react-app/src/base/cases/AppError.ts +0 -0
  119. /package/{templates → dist/templates}/react-app/src/base/cases/DialogHandler.ts +0 -0
  120. /package/{templates → dist/templates}/react-app/src/base/cases/PublicAssetsPath.ts +0 -0
  121. /package/{templates → dist/templates}/react-app/src/base/cases/RequestLogger.ts +0 -0
  122. /package/{templates → dist/templates}/react-app/src/base/cases/RequestStatusCatcher.ts +0 -0
  123. /package/{templates → dist/templates}/react-app/src/base/port/ApiTransactionInterface.ts +0 -0
  124. /package/{templates → dist/templates}/react-app/src/base/port/InteractionHubInterface.ts +0 -0
  125. /package/{templates → dist/templates}/react-app/src/base/port/RequestCatcherInterface.ts +0 -0
  126. /package/{templates → dist/templates}/react-app/src/base/port/UIDependenciesInterface.ts +0 -0
  127. /package/{templates → dist/templates}/react-app/src/base/types/deprecated-antd.d.ts +0 -0
  128. /package/{templates → dist/templates}/react-app/src/base/types/global.d.ts +0 -0
  129. /package/{templates → dist/templates}/react-app/src/core/IOC.ts +0 -0
  130. /package/{templates → dist/templates}/react-app/src/core/bootstraps/BootstrapApp.ts +0 -0
  131. /package/{templates → dist/templates}/react-app/src/core/bootstraps/PrintBootstrap.ts +0 -0
  132. /package/{templates → dist/templates}/react-app/src/core/globals.ts +0 -0
  133. /package/{templates → dist/templates}/react-app/src/core/registers/RegisterApi.ts +0 -0
  134. /package/{templates → dist/templates}/react-app/src/core/registers/RegisterGlobals.ts +0 -0
  135. /package/{templates → dist/templates}/react-app/src/core/registers/index.ts +0 -0
  136. /package/{templates → dist/templates}/react-app/src/main.tsx +0 -0
  137. /package/{templates → dist/templates}/react-app/src/pages/base/RedirectPathname.tsx +0 -0
  138. /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/_default.css +0 -0
  139. /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/dark.css +0 -0
  140. /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/index.css +0 -0
  141. /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/no-context.css +0 -0
  142. /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/pink.css +0 -0
  143. /package/{templates → dist/templates}/react-app/src/styles/css/index.css +0 -0
  144. /package/{templates → dist/templates}/react-app/src/styles/css/page.css +0 -0
  145. /package/{templates → dist/templates}/react-app/src/styles/css/tailwind.css +0 -0
  146. /package/{templates → dist/templates}/react-app/src/styles/css/themes/_default.css +0 -0
  147. /package/{templates → dist/templates}/react-app/src/styles/css/themes/dark.css +0 -0
  148. /package/{templates → dist/templates}/react-app/src/styles/css/themes/index.css +0 -0
  149. /package/{templates → dist/templates}/react-app/src/styles/css/themes/pink.css +0 -0
  150. /package/{templates/react-app/src/pages/base → dist/templates/react-app/src/uikit}/components/BaseHeader.tsx +0 -0
  151. /package/{templates → dist/templates}/react-app/src/uikit/components/LanguageSwitcher.tsx +0 -0
  152. /package/{templates → dist/templates}/react-app/src/uikit/components/Loading.tsx +0 -0
  153. /package/{templates → dist/templates}/react-app/src/uikit/components/LocaleLink.tsx +0 -0
  154. /package/{templates → dist/templates}/react-app/src/uikit/components/RouterRenderComponent.tsx +0 -0
  155. /package/{templates → dist/templates}/react-app/src/uikit/hooks/useDocumentTitle.ts +0 -0
  156. /package/{templates → dist/templates}/react-app/src/uikit/hooks/useStrictEffect.ts +0 -0
  157. /package/{templates → dist/templates}/react-app/src/vite-env.d.ts +0 -0
  158. /package/{templates → dist/templates}/react-app/tailwind.config.js +0 -0
  159. /package/{templates → dist/templates}/react-app/tsconfig.app.json +0 -0
  160. /package/{templates → dist/templates}/react-app/tsconfig.json +0 -0
  161. /package/{templates → dist/templates}/react-app/tsconfig.node.json +0 -0
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @description JSONStorage page title
3
+ * @localZh JSONStorage 页面
4
+ * @localEn JSONStorage Page
5
+ */
6
+ export const PAGE_JSONSTORAGE_TITLE = 'page.jsonstorage.title';
7
+
8
+ /**
9
+ * @description JSONStorage page description
10
+ * @localZh 使用 JSONStorage 进行数据存储和管理
11
+ * @localEn Use JSONStorage for data storage and management
12
+ */
13
+ export const PAGE_JSONSTORAGE_DESCRIPTION = 'page.jsonstorage.description';
14
+
15
+ /**
16
+ * @description JSONStorage page main title
17
+ * @localZh JSONStorage 演示
18
+ * @localEn JSONStorage Demo
19
+ */
20
+ export const PAGE_JSONSTORAGE_MAIN_TITLE = 'page.jsonstorage.main_title';
21
+ /**
22
+ * @description JSONStorage permanent storage test title
23
+ * @localZh 永久存储测试
24
+ * @localEn Permanent Storage Test
25
+ */
26
+ export const PAGE_JSONSTORAGE_PERMANENT_TITLE =
27
+ 'page.jsonstorage.permanent_title';
28
+
29
+ /**
30
+ * @description JSONStorage expire time test title
31
+ * @localZh 过期时间测试
32
+ * @localEn Expire Time Test
33
+ */
34
+ export const PAGE_JSONSTORAGE_EXPIRE_TITLE = 'page.jsonstorage.expire_title';
35
+ /**
36
+ * @description JSONStorage request timeout title
37
+ * @localZh 请求超时时间设置
38
+ * @localEn Request Timeout Setting
39
+ */
40
+ export const PAGE_JSONSTORAGE_TIMEOUT_TITLE = 'page.jsonstorage.timeout_title';
41
+ /**
42
+ * @description JSONStorage format title template
43
+ * @localZh 测试 key: ${key}, 随机值范围: ${min}~${max}
44
+ * @localEn Test key: ${key}, Random value range: ${min}~${max}
45
+ */
46
+ export const PAGE_JSONSTORAGE_FORMAT_TITLE = 'page.jsonstorage.format_title';
47
+ /**
48
+ * @description JSONStorage set random value button
49
+ * @localZh 设置随机值
50
+ * @localEn Set Random Value
51
+ */
52
+ export const PAGE_JSONSTORAGE_SET_RANDOM = 'page.jsonstorage.set_random';
53
+ /**
54
+ * @description JSONStorage current value label
55
+ * @localZh 当前值
56
+ * @localEn Current Value
57
+ */
58
+ export const PAGE_JSONSTORAGE_CURRENT_VALUE = 'page.jsonstorage.current_value';
59
+ /**
60
+ * @description JSONStorage set expire time button
61
+ * @localZh 设置随机值(带过期时间)
62
+ * @localEn Set Random Value (with expire time)
63
+ */
64
+ export const PAGE_JSONSTORAGE_SET_EXPIRE = 'page.jsonstorage.set_expire';
65
+ /**
66
+ * @description JSONStorage milliseconds unit
67
+ * @localZh 毫秒
68
+ * @localEn ms
69
+ */
70
+ export const PAGE_JSONSTORAGE_MS = 'page.jsonstorage.ms';
@@ -0,0 +1,152 @@
1
+ /**
2
+ * @description Login page title
3
+ * @localZh 登录
4
+ * @localEn Login
5
+ */
6
+ export const PAGE_LOGIN_TITLE = 'page.login.title';
7
+ /**
8
+ * @description Login page description
9
+ * @localZh 登录页面描述
10
+ * @localEn Login Page Description
11
+ */
12
+ export const PAGE_LOGIN_DESCRIPTION = 'page.login.description';
13
+ /**
14
+ * @description Login page title
15
+ * @localZh 登录
16
+ * @localEn Login
17
+ */
18
+ export const LOGIN_TITLE = 'login.title';
19
+ /**
20
+ * @description Email field label
21
+ * @localZh 邮箱
22
+ * @localEn Email
23
+ */
24
+ export const LOGIN_EMAIL = 'login.email';
25
+ /**
26
+ * @description Username field label
27
+ * @localZh 用户名
28
+ * @localEn Username
29
+ */
30
+ export const LOGIN_USERNAME = 'login.username';
31
+ /**
32
+ * @description Password field label
33
+ * @localZh 密码
34
+ * @localEn Password
35
+ */
36
+ export const LOGIN_PASSWORD = 'login.password';
37
+ /**
38
+ * @description Login button text
39
+ * @localZh 登录
40
+ * @localEn Login
41
+ */
42
+ export const LOGIN_BUTTON = 'login.login';
43
+ /**
44
+ * @description Login page description
45
+ * @localZh 欢迎来到未来学习
46
+ * @localEn Welcome to the future of learning
47
+ */
48
+ export const LOGIN_WELCOME = 'login.welcome';
49
+ /**
50
+ * @description Login page description
51
+ * @localZh 解锁个性化 AI 驱动的学习体验,加速您的知识旅程。
52
+ * @localEn Unlock personalized AI-powered learning experiences designed to accelerate your knowledge journey.
53
+ */
54
+ export const LOGIN_SUBTITLE = 'login.subtitle';
55
+ /**
56
+ * @description Login page forgot password text
57
+ * @localZh 忘记密码?
58
+ * @localEn Forgot your password?
59
+ */
60
+ export const LOGIN_FORGOT_PASSWORD = 'login.forgot_password';
61
+ /**
62
+ * @description Login page continue with text
63
+ * @localZh 或继续使用
64
+ * @localEn or continue with
65
+ */
66
+ export const LOGIN_CONTINUE_WITH = 'login.continue_with';
67
+ /**
68
+ * @description Login with Google button text
69
+ * @localZh 使用 Google 登录
70
+ * @localEn Sign in with Google
71
+ */
72
+ export const LOGIN_WITH_GOOGLE = 'login.with_google';
73
+ /**
74
+ * @description Login page no account text
75
+ * @localZh 还没有账号?
76
+ * @localEn Don't have an account?
77
+ */
78
+ export const LOGIN_NO_ACCOUNT = 'login.no_account';
79
+ /**
80
+ * @description Login page create account link text
81
+ * @localZh 在此创建
82
+ * @localEn Create one here
83
+ */
84
+ export const LOGIN_CREATE_ACCOUNT = 'login.create_account';
85
+ /**
86
+ * @description Login page email validation message
87
+ * @localZh 请输入您的邮箱!
88
+ * @localEn Please input your email!
89
+ */
90
+ export const LOGIN_EMAIL_REQUIRED = 'login.email_required';
91
+ /**
92
+ * @description Login page password validation message
93
+ * @localZh 请输入您的密码!
94
+ * @localEn Please input your password!
95
+ */
96
+ export const LOGIN_PASSWORD_REQUIRED = 'login.password_required';
97
+ /**
98
+ * @description Login page feature item - AI learning paths
99
+ * @localZh AI驱动的个性化学习路径
100
+ * @localEn AI-powered personalized learning paths
101
+ */
102
+ export const LOGIN_FEATURE_AI_PATHS = 'login.feature.ai_paths';
103
+ /**
104
+ * @description Login page feature item - Smart recommendations
105
+ * @localZh 智能内容推荐
106
+ * @localEn Smart content recommendations
107
+ */
108
+ export const LOGIN_FEATURE_SMART_RECOMMENDATIONS =
109
+ 'login.feature.smart_recommendations';
110
+ /**
111
+ * @description Login page feature item - Progress tracking
112
+ * @localZh 实时进度追踪
113
+ * @localEn Real-time progress tracking
114
+ */
115
+ export const LOGIN_FEATURE_PROGRESS_TRACKING =
116
+ 'login.feature.progress_tracking';
117
+ /**
118
+ * @description Login page email input title
119
+ * @localZh 输入邮箱
120
+ * @localEn Enter email
121
+ */
122
+ export const LOGIN_EMAIL_TITLE = 'login.email.title';
123
+ /**
124
+ * @description Login page password input title
125
+ * @localZh 输入密码
126
+ * @localEn Enter password
127
+ */
128
+ export const LOGIN_PASSWORD_TITLE = 'login.password.title';
129
+ /**
130
+ * @description Login page forgot password link title
131
+ * @localZh 重置密码
132
+ * @localEn Reset password
133
+ */
134
+ export const LOGIN_FORGOT_PASSWORD_TITLE = 'login.forgot_password.title';
135
+ /**
136
+ * @description Login page submit button title
137
+ * @localZh 登录账号
138
+ * @localEn Sign in to account
139
+ */
140
+ export const LOGIN_BUTTON_TITLE = 'login.button.title';
141
+ /**
142
+ * @description Login page Google sign in button title
143
+ * @localZh 使用Google账号登录
144
+ * @localEn Sign in with Google account
145
+ */
146
+ export const LOGIN_WITH_GOOGLE_TITLE = 'login.with_google.title';
147
+ /**
148
+ * @description Login page create account link title
149
+ * @localZh 创建新账号
150
+ * @localEn Create new account
151
+ */
152
+ export const LOGIN_CREATE_ACCOUNT_TITLE = 'login.create_account.title';
@@ -0,0 +1,147 @@
1
+ /**
2
+ * @description Register page title
3
+ * @localZh 创建账号
4
+ * @localEn Create Account
5
+ */
6
+ export const PAGE_REGISTER_TITLE = 'page.register.title';
7
+
8
+ /**
9
+ * @description Register page description
10
+ * @localZh 创建账号页面描述
11
+ * @localEn Create Account Page Description
12
+ */
13
+ export const PAGE_REGISTER_DESCRIPTION = 'page.register.description';
14
+
15
+ /**
16
+ * @description Register page title
17
+ * @localZh 创建账号
18
+ * @localEn Create Account
19
+ */
20
+ export const REGISTER_TITLE = 'register.title';
21
+ /**
22
+ * @description Register page subtitle
23
+ * @localZh 开始您的学习之旅
24
+ * @localEn Start your learning journey
25
+ */
26
+ export const REGISTER_SUBTITLE = 'register.subtitle';
27
+ /**
28
+ * @description Register page username field
29
+ * @localZh 用户名
30
+ * @localEn Username
31
+ */
32
+ export const REGISTER_USERNAME = 'register.username';
33
+ /**
34
+ * @description Register page username required message
35
+ * @localZh 请输入用户名!
36
+ * @localEn Please input your username!
37
+ */
38
+ export const REGISTER_USERNAME_REQUIRED = 'register.username_required';
39
+ /**
40
+ * @description Register page email field
41
+ * @localZh 邮箱
42
+ * @localEn Email
43
+ */
44
+ export const REGISTER_EMAIL = 'register.email';
45
+ /**
46
+ * @description Register page email required message
47
+ * @localZh 请输入邮箱!
48
+ * @localEn Please input your email!
49
+ */
50
+ export const REGISTER_EMAIL_REQUIRED = 'register.email_required';
51
+ /**
52
+ * @description Register page password field
53
+ * @localZh 密码
54
+ * @localEn Password
55
+ */
56
+ export const REGISTER_PASSWORD = 'register.password';
57
+ /**
58
+ * @description Register page password required message
59
+ * @localZh 请输入密码!
60
+ * @localEn Please input your password!
61
+ */
62
+ export const REGISTER_PASSWORD_REQUIRED = 'register.password_required';
63
+ /**
64
+ * @description Register page confirm password field
65
+ * @localZh 确认密码
66
+ * @localEn Confirm Password
67
+ */
68
+ export const REGISTER_CONFIRM_PASSWORD = 'register.confirm_password';
69
+ /**
70
+ * @description Register page confirm password required message
71
+ * @localZh 请确认密码!
72
+ * @localEn Please confirm your password!
73
+ */
74
+ export const REGISTER_CONFIRM_PASSWORD_REQUIRED =
75
+ 'register.confirm_password_required';
76
+ /**
77
+ * @description Register page passwords don't match message
78
+ * @localZh 两次输入的密码不匹配!
79
+ * @localEn The passwords you entered don't match!
80
+ */
81
+ export const REGISTER_PASSWORD_MISMATCH = 'register.password_mismatch';
82
+ /**
83
+ * @description Register page submit button
84
+ * @localZh 注册
85
+ * @localEn Register
86
+ */
87
+ export const REGISTER_BUTTON = 'register.button';
88
+ /**
89
+ * @description Register page terms and conditions text
90
+ * @localZh 注册即表示您同意我们的
91
+ * @localEn By registering, you agree to our
92
+ */
93
+ export const REGISTER_TERMS_PREFIX = 'register.terms_prefix';
94
+ /**
95
+ * @description Register page terms and conditions link
96
+ * @localZh 服务条款
97
+ * @localEn Terms of Service
98
+ */
99
+ export const REGISTER_TERMS_LINK = 'register.terms_link';
100
+ /**
101
+ * @description Register page privacy policy text
102
+ * @localZh 和
103
+ * @localEn and
104
+ */
105
+ export const REGISTER_TERMS_AND = 'register.terms_and';
106
+ /**
107
+ * @description Register page privacy policy link
108
+ * @localZh 隐私政策
109
+ * @localEn Privacy Policy
110
+ */
111
+ export const REGISTER_PRIVACY_LINK = 'register.privacy_link';
112
+ /**
113
+ * @description Register page have account text
114
+ * @localZh 已有账号?
115
+ * @localEn Already have an account?
116
+ */
117
+ export const REGISTER_HAVE_ACCOUNT = 'register.have_account';
118
+ /**
119
+ * @description Register page login link
120
+ * @localZh 登录
121
+ * @localEn Sign in
122
+ */
123
+ export const REGISTER_LOGIN_LINK = 'register.login_link';
124
+ /**
125
+ * @description Register page feature item - Personalized Learning
126
+ * @localZh 个性化学习体验
127
+ * @localEn Personalized Learning Experience
128
+ */
129
+ export const REGISTER_FEATURE_PERSONALIZED = 'register.feature.personalized';
130
+ /**
131
+ * @description Register page feature item - Expert Support
132
+ * @localZh 专家支持和指导
133
+ * @localEn Expert Support and Guidance
134
+ */
135
+ export const REGISTER_FEATURE_SUPPORT = 'register.feature.support';
136
+ /**
137
+ * @description Register page feature item - Learning Community
138
+ * @localZh 活跃的学习社区
139
+ * @localEn Active Learning Community
140
+ */
141
+ export const REGISTER_FEATURE_COMMUNITY = 'register.feature.community';
142
+ /**
143
+ * @description Register page terms agreement required message
144
+ * @localZh 请同意服务条款和隐私政策
145
+ * @localEn Please agree to the Terms of Service and Privacy Policy
146
+ */
147
+ export const REGISTER_TERMS_REQUIRED = 'register.terms_required';
@@ -0,0 +1,179 @@
1
+ /**
2
+ * @description Request page title
3
+ * @localZh 请求示例
4
+ * @localEn Request Examples
5
+ */
6
+ export const PAGE_REQUEST_TITLE = 'page.request.title';
7
+
8
+ /**
9
+ * @description Request page description
10
+ * @localZh 展示各种请求示例和用法
11
+ * @localEn Demonstrate various request examples and usage
12
+ */
13
+ export const PAGE_REQUEST_DESCRIPTION = 'page.request.description';
14
+
15
+ /**
16
+ * @description Request timeout message
17
+ * @localZh 请求超时
18
+ * @localEn Request Timeout
19
+ */
20
+ export const REQUEST_TIMEOUT = 'request.requestTimeout';
21
+ /**
22
+ * @description Hello result message
23
+ * @localZh Hello 结果是
24
+ * @localEn Hello result is
25
+ */
26
+ export const REQUEST_HELLO_RESULT = 'request.helloResult';
27
+ /**
28
+ * @description Hello error message
29
+ * @localZh Hello 错误是
30
+ * @localEn Hello error is
31
+ */
32
+ export const REQUEST_HELLO_ERROR = 'request.helloError';
33
+ /**
34
+ * @description IpInfo result message
35
+ * @localZh IpInfo 结果是
36
+ * @localEn IpInfo result is
37
+ */
38
+ export const REQUEST_IP_INFO_RESULT = 'request.ipInfoResult';
39
+ /**
40
+ * @description IpInfo title
41
+ * @localZh IpInfo
42
+ * @localEn IpInfo
43
+ */
44
+ export const REQUEST_IP_INFO = 'request.ipInfo';
45
+ /**
46
+ * @description Random user title
47
+ * @localZh 随机用户
48
+ * @localEn RandomUser
49
+ */
50
+ export const REQUEST_RANDOM_USER = 'request.randomUser';
51
+ /**
52
+ * @description Loading message
53
+ * @localZh 加载中...
54
+ * @localEn Loading...
55
+ */
56
+ export const REQUEST_LOADING = 'request.loading';
57
+ /**
58
+ * @description Random user result message
59
+ * @localZh 随机用户 结果是
60
+ * @localEn RandomUser result is
61
+ */
62
+ export const REQUEST_RANDOM_USER_RESULT = 'request.randomUserResult';
63
+ /**
64
+ * @description Random user error message
65
+ * @localZh 随机用户 错误是
66
+ * @localEn RandomUser error is
67
+ */
68
+ export const REQUEST_RANDOM_USER_ERROR = 'request.randomUserError';
69
+ /**
70
+ * @description Trigger abort request button text
71
+ * @localZh 触发中止请求
72
+ * @localEn Trigger Abort Request
73
+ */
74
+ export const REQUEST_TRIGGER_ABORT = 'request.triggerAbortRequest';
75
+ /**
76
+ * @description Stop abort request button text
77
+ * @localZh 停止中止请求
78
+ * @localEn Stop Abort Request
79
+ */
80
+ export const REQUEST_STOP_ABORT = 'request.stopAbortRequest';
81
+ /**
82
+ * @description Abort request result message
83
+ * @localZh 中止请求 结果是
84
+ * @localEn Abort Request Result
85
+ */
86
+ export const REQUEST_ABORT_RESULT = 'request.abortRequestResult';
87
+ /**
88
+ * @description Abort request error message
89
+ * @localZh 中止请求 错误是
90
+ * @localEn Abort Request Error
91
+ */
92
+ export const REQUEST_ABORT_ERROR = 'request.abortRequestError';
93
+
94
+ /**
95
+ * @description Request page timeout title
96
+ * @localZh 请求超时时间
97
+ * @localEn Request Timeout
98
+ */
99
+ export const PAGE_REQUEST_TIMEOUT = 'page.request.timeout';
100
+ /**
101
+ * @description Request page hello api title
102
+ * @localZh AI API: Hello
103
+ * @localEn AI API: Hello
104
+ */
105
+ export const PAGE_REQUEST_HELLO_TITLE = 'page.request.hello.title';
106
+ /**
107
+ * @description Request page hello api description
108
+ * @localZh 函数式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger 插件
109
+ * @localEn Functional API using FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger plugins
110
+ */
111
+ export const PAGE_REQUEST_HELLO_DESCRIPTION = 'page.request.hello.description';
112
+ /**
113
+ * @description Request page hello button text
114
+ * @localZh Hello
115
+ * @localEn Hello
116
+ */
117
+ export const PAGE_REQUEST_HELLO_BUTTON = 'page.request.hello.button';
118
+ /**
119
+ * @description Request page ip info title
120
+ * @localZh FeApi: IP Information
121
+ * @localEn FeApi: IP Information
122
+ */
123
+ export const PAGE_REQUEST_IP_INFO_TITLE = 'page.request.ip_info.title';
124
+ /**
125
+ * @description Request page ip info description
126
+ * @localZh RequestScheduler 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin 插件, 其中 ApiPickDataPlugin 插件可以将返回类型统一扁平到 data 字段
127
+ * @localEn RequestScheduler class API using FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin plugins, where ApiPickDataPlugin can flatten return types to data field
128
+ */
129
+ export const PAGE_REQUEST_IP_INFO_DESCRIPTION =
130
+ 'page.request.ip_info.description';
131
+ /**
132
+ * @description Request page random user title
133
+ * @localZh UserApi: Random User
134
+ * @localEn UserApi: Random User
135
+ */
136
+ export const PAGE_REQUEST_RANDOM_USER_TITLE = 'page.request.random_user.title';
137
+ /**
138
+ * @description Request page random user description
139
+ * @localZh RequestTransaction 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin 插件, 其中 FetchAbortPlugin 可以中止请求, ApiCatchPlugin 可以将捕获的错误统一到 apiCatchResult 字段
140
+ * @localEn RequestTransaction class API using FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin plugins, where FetchAbortPlugin can abort requests, ApiCatchPlugin can unify caught errors to apiCatchResult field
141
+ */
142
+ export const PAGE_REQUEST_RANDOM_USER_DESCRIPTION =
143
+ 'page.request.random_user.description';
144
+ /**
145
+ * @description Request page api catch result title
146
+ * @localZh UserApi: Api Catch Result
147
+ * @localEn UserApi: Api Catch Result
148
+ */
149
+ export const PAGE_REQUEST_API_CATCH_TITLE = 'page.request.api_catch.title';
150
+ /**
151
+ * @description Request page abort request title
152
+ * @localZh UserApi: Abort Request
153
+ * @localEn UserApi: Abort Request
154
+ */
155
+ export const PAGE_REQUEST_ABORT_TITLE = 'page.request.abort.title';
156
+ /**
157
+ * @description Request page trigger abort request button
158
+ * @localZh 触发中止请求
159
+ * @localEn Trigger Abort Request
160
+ */
161
+ export const PAGE_REQUEST_TRIGGER_ABORT = 'page.request.trigger_abort';
162
+ /**
163
+ * @description Request page stop abort request button
164
+ * @localZh 停止中止请求
165
+ * @localEn Stop Abort Request
166
+ */
167
+ export const PAGE_REQUEST_STOP_ABORT = 'page.request.stop_abort';
168
+ /**
169
+ * @description Request page trigger api catch result button
170
+ * @localZh 触发 API 捕获结果
171
+ * @localEn Trigger API Catch Result
172
+ */
173
+ export const PAGE_REQUEST_TRIGGER_API_CATCH = 'page.request.trigger_api_catch';
174
+ /**
175
+ * @description Request page stop api catch result button
176
+ * @localZh 停止 API 捕获结果
177
+ * @localEn Stop API Catch Result
178
+ */
179
+ export const PAGE_REQUEST_STOP_API_CATCH = 'page.request.stop_api_catch';
@@ -0,0 +1,163 @@
1
+ import type { RouteConfigValue } from '@/base/cases/RouterLoader';
2
+ import * as identifier from './Identifier';
3
+
4
+ export const baseRoutes: RouteConfigValue[] = [
5
+ {
6
+ path: '/',
7
+ element: 'base/RedirectPathname'
8
+ },
9
+ {
10
+ path: '/:lng',
11
+ element: 'base/Layout',
12
+ meta: {
13
+ category: 'main'
14
+ },
15
+ children: [
16
+ {
17
+ index: true,
18
+ element: 'base/HomePage',
19
+ meta: {
20
+ title: identifier.PAGE_HOME_TITLE,
21
+ description: identifier.PAGE_HOME_DESCRIPTION,
22
+ icon: 'home',
23
+ localNamespace: 'common'
24
+ }
25
+ },
26
+ {
27
+ path: 'about',
28
+ element: 'base/AboutPage',
29
+ meta: {
30
+ title: identifier.PAGE_ABOUT_TITLE,
31
+ description: identifier.PAGE_ABOUT_DESCRIPTION,
32
+ icon: 'info',
33
+ localNamespace: 'common'
34
+ }
35
+ },
36
+ {
37
+ path: 'jsonStorage',
38
+ element: 'base/JSONStoragePage',
39
+ meta: {
40
+ title: identifier.PAGE_JSONSTORAGE_TITLE,
41
+ description: identifier.PAGE_JSONSTORAGE_DESCRIPTION,
42
+ icon: 'info',
43
+ localNamespace: 'common'
44
+ }
45
+ },
46
+ {
47
+ path: 'request',
48
+ element: 'base/RequestPage',
49
+ meta: {
50
+ title: identifier.PAGE_REQUEST_TITLE,
51
+ description: identifier.PAGE_REQUEST_DESCRIPTION,
52
+ icon: 'info',
53
+ localNamespace: 'common'
54
+ }
55
+ },
56
+ {
57
+ path: 'executor',
58
+ element: 'base/ExecutorPage',
59
+ meta: {
60
+ title: identifier.PAGE_EXECUTOR_TITLE,
61
+ description: identifier.PAGE_EXECUTOR_DESCRIPTION,
62
+ icon: 'info',
63
+ localNamespace: 'common'
64
+ }
65
+ },
66
+ {
67
+ path: 'errorIdentifier',
68
+ element: 'base/ErrorIdentifierPage',
69
+ meta: {
70
+ title: identifier.PAGE_ERROR_IDENTIFIER_TITLE,
71
+ description: identifier.PAGE_ERROR_IDENTIFIER_DESCRIPTION,
72
+ icon: 'info',
73
+ localNamespace: 'common'
74
+ }
75
+ },
76
+ {
77
+ path: '404',
78
+ element: '404',
79
+ meta: {
80
+ category: 'common',
81
+ title: identifier.PAGE_404_TITLE,
82
+ description: identifier.PAGE_404_DESCRIPTION,
83
+ localNamespace: 'common'
84
+ }
85
+ },
86
+ {
87
+ path: '500',
88
+ element: '500',
89
+ meta: {
90
+ category: 'common',
91
+ title: identifier.PAGE_500_TITLE,
92
+ description: identifier.PAGE_500_DESCRIPTION,
93
+ localNamespace: 'common'
94
+ }
95
+ }
96
+ ]
97
+ },
98
+
99
+ {
100
+ path: '/:lng',
101
+ element: 'auth/Layout',
102
+ meta: {
103
+ category: 'auth'
104
+ },
105
+ children: [
106
+ {
107
+ index: true,
108
+ element: 'auth/LoginPage'
109
+ },
110
+ {
111
+ path: 'login',
112
+ element: 'auth/LoginPage',
113
+ meta: {
114
+ title: identifier.PAGE_LOGIN_TITLE,
115
+ description: identifier.PAGE_LOGIN_DESCRIPTION,
116
+ icon: 'info',
117
+ localNamespace: 'common'
118
+ }
119
+ },
120
+ {
121
+ path: 'register',
122
+ element: 'auth/RegisterPage',
123
+ meta: {
124
+ title: identifier.PAGE_REGISTER_TITLE,
125
+ description: identifier.PAGE_REGISTER_DESCRIPTION,
126
+ icon: 'info',
127
+ localNamespace: 'common'
128
+ }
129
+ }
130
+ ]
131
+ },
132
+
133
+ {
134
+ path: '404',
135
+ element: '404',
136
+ meta: {
137
+ category: 'common',
138
+ title: identifier.PAGE_404_TITLE,
139
+ description: identifier.PAGE_404_DESCRIPTION,
140
+ localNamespace: 'common'
141
+ }
142
+ },
143
+ {
144
+ path: '500',
145
+ element: '500',
146
+ meta: {
147
+ category: 'common',
148
+ title: identifier.PAGE_500_TITLE,
149
+ description: identifier.PAGE_500_DESCRIPTION,
150
+ localNamespace: 'common'
151
+ }
152
+ },
153
+ {
154
+ path: '*',
155
+ element: '404',
156
+ meta: {
157
+ category: 'common',
158
+ title: identifier.PAGE_404_TITLE,
159
+ description: identifier.PAGE_404_DESCRIPTION,
160
+ localNamespace: 'common'
161
+ }
162
+ }
163
+ ];