@qlover/create-app 0.7.6 → 0.7.7

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 (91) hide show
  1. package/CHANGELOG.md +237 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/templates/next-app/.env.template +22 -0
  5. package/dist/templates/next-app/.prettierignore +58 -0
  6. package/dist/templates/next-app/README.md +36 -0
  7. package/dist/templates/next-app/build/generateLocales.ts +25 -0
  8. package/dist/templates/next-app/config/IOCIdentifier.ts +45 -0
  9. package/dist/templates/next-app/config/Identifier/common.error.ts +34 -0
  10. package/dist/templates/next-app/config/Identifier/common.ts +62 -0
  11. package/dist/templates/next-app/config/Identifier/index.ts +10 -0
  12. package/dist/templates/next-app/config/Identifier/page.about.ts +181 -0
  13. package/dist/templates/next-app/config/Identifier/page.executor.ts +272 -0
  14. package/dist/templates/next-app/config/Identifier/page.home.ts +63 -0
  15. package/dist/templates/next-app/config/Identifier/page.identifiter.ts +39 -0
  16. package/dist/templates/next-app/config/Identifier/page.jsonStorage.ts +72 -0
  17. package/dist/templates/next-app/config/Identifier/page.login.ts +165 -0
  18. package/dist/templates/next-app/config/Identifier/page.register.ts +147 -0
  19. package/dist/templates/next-app/config/Identifier/page.request.ts +182 -0
  20. package/dist/templates/next-app/config/common.ts +34 -0
  21. package/dist/templates/next-app/config/i18n/PageI18nInterface.ts +51 -0
  22. package/dist/templates/next-app/config/i18n/i18nConfig.ts +12 -0
  23. package/dist/templates/next-app/config/i18n/index.ts +3 -0
  24. package/dist/templates/next-app/config/i18n/loginI18n.ts +42 -0
  25. package/dist/templates/next-app/config/theme.ts +23 -0
  26. package/dist/templates/next-app/docs/env.md +94 -0
  27. package/dist/templates/next-app/eslint.config.mjs +181 -0
  28. package/dist/templates/next-app/next.config.ts +21 -0
  29. package/dist/templates/next-app/package.json +58 -0
  30. package/dist/templates/next-app/plugins/eslint-plugin-testid.mjs +94 -0
  31. package/dist/templates/next-app/plugins/generateLocalesPlugin.ts +33 -0
  32. package/dist/templates/next-app/postcss.config.mjs +5 -0
  33. package/dist/templates/next-app/public/file.svg +1 -0
  34. package/dist/templates/next-app/public/globe.svg +1 -0
  35. package/dist/templates/next-app/public/locales/en/common.json +183 -0
  36. package/dist/templates/next-app/public/locales/zh/common.json +183 -0
  37. package/dist/templates/next-app/public/next.svg +1 -0
  38. package/dist/templates/next-app/public/vercel.svg +1 -0
  39. package/dist/templates/next-app/public/window.svg +1 -0
  40. package/dist/templates/next-app/src/app/[locale]/favicon.ico +0 -0
  41. package/dist/templates/next-app/src/app/[locale]/layout.tsx +44 -0
  42. package/dist/templates/next-app/src/app/[locale]/login/FeatureItem.tsx +13 -0
  43. package/dist/templates/next-app/src/app/[locale]/login/LoginForm.tsx +115 -0
  44. package/dist/templates/next-app/src/app/[locale]/login/page.tsx +73 -0
  45. package/dist/templates/next-app/src/app/[locale]/not-found.tsx +24 -0
  46. package/dist/templates/next-app/src/app/[locale]/page.tsx +106 -0
  47. package/dist/templates/next-app/src/base/cases/AppConfig.ts +15 -0
  48. package/dist/templates/next-app/src/base/cases/InversifyContainer.ts +33 -0
  49. package/dist/templates/next-app/src/base/port/I18nServiceInterface.ts +25 -0
  50. package/dist/templates/next-app/src/base/port/UserServiceInterface.ts +11 -0
  51. package/dist/templates/next-app/src/base/services/I18nService.ts +115 -0
  52. package/dist/templates/next-app/src/base/services/UserService.ts +23 -0
  53. package/dist/templates/next-app/src/core/IOC.ts +58 -0
  54. package/dist/templates/next-app/src/core/IocRegisterImpl.ts +100 -0
  55. package/dist/templates/next-app/src/core/bootstraps/BootstrapClient.ts +98 -0
  56. package/dist/templates/next-app/src/core/bootstraps/BootstrapsRegistry.ts +47 -0
  57. package/dist/templates/next-app/src/core/bootstraps/IocIdentifierTest.ts +26 -0
  58. package/dist/templates/next-app/src/core/bootstraps/PrintBootstrap.ts +18 -0
  59. package/dist/templates/next-app/src/core/globals.ts +21 -0
  60. package/dist/templates/next-app/src/i18n/request.ts +22 -0
  61. package/dist/templates/next-app/src/i18n/routing.ts +30 -0
  62. package/dist/templates/next-app/src/middleware.ts +22 -0
  63. package/dist/templates/next-app/src/server/getServerI18n.ts +26 -0
  64. package/dist/templates/next-app/src/styles/css/antd-themes/_default.css +239 -0
  65. package/dist/templates/next-app/src/styles/css/antd-themes/dark.css +178 -0
  66. package/dist/templates/next-app/src/styles/css/antd-themes/index.css +3 -0
  67. package/dist/templates/next-app/src/styles/css/antd-themes/no-context.css +34 -0
  68. package/dist/templates/next-app/src/styles/css/antd-themes/pink.css +204 -0
  69. package/dist/templates/next-app/src/styles/css/index.css +6 -0
  70. package/dist/templates/next-app/src/styles/css/page.css +19 -0
  71. package/dist/templates/next-app/src/styles/css/tailwind.css +5 -0
  72. package/dist/templates/next-app/src/styles/css/themes/_default.css +29 -0
  73. package/dist/templates/next-app/src/styles/css/themes/dark.css +29 -0
  74. package/dist/templates/next-app/src/styles/css/themes/index.css +3 -0
  75. package/dist/templates/next-app/src/styles/css/themes/pink.css +29 -0
  76. package/dist/templates/next-app/src/styles/css/zIndex.css +9 -0
  77. package/dist/templates/next-app/src/uikit/components/BaseHeader.tsx +42 -0
  78. package/dist/templates/next-app/src/uikit/components/BootstrapsProvider.tsx +25 -0
  79. package/dist/templates/next-app/src/uikit/components/ComboProvider.tsx +45 -0
  80. package/dist/templates/next-app/src/uikit/components/LanguageSwitcher.tsx +52 -0
  81. package/dist/templates/next-app/src/uikit/components/LocaleLink.tsx +51 -0
  82. package/dist/templates/next-app/src/uikit/components/NextIntlProvider.tsx +21 -0
  83. package/dist/templates/next-app/src/uikit/components/ThemeSwitcher.tsx +86 -0
  84. package/dist/templates/next-app/src/uikit/context/IOCContext.ts +6 -0
  85. package/dist/templates/next-app/src/uikit/hook/useI18nInterface.ts +28 -0
  86. package/dist/templates/next-app/src/uikit/hook/useIOC.ts +37 -0
  87. package/dist/templates/next-app/src/uikit/hook/useMountedClient.ts +11 -0
  88. package/dist/templates/next-app/src/uikit/hook/useStore.ts +15 -0
  89. package/dist/templates/next-app/tailwind.config.ts +8 -0
  90. package/dist/templates/next-app/tsconfig.json +36 -0
  91. package/package.json +1 -1
@@ -0,0 +1,165 @@
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 content
15
+ * @localZh 登录页面内容
16
+ * @localEn Login Page Content
17
+ */
18
+ export const PAGE_LOGIN_CONTENT = 'page__login__content';
19
+ /**
20
+ * @description Login page keywords
21
+ * @localZh 登录页面关键词
22
+ * @localEn Login Page Keywords
23
+ */
24
+ export const PAGE_LOGIN_KEYWORDS = 'page__login__keywords';
25
+
26
+ /**
27
+ * @description Login page title
28
+ * @localZh 登录
29
+ * @localEn Login
30
+ */
31
+ export const LOGIN_TITLE = 'login__title';
32
+ /**
33
+ * @description Email field label
34
+ * @localZh 邮箱
35
+ * @localEn Email
36
+ */
37
+ export const LOGIN_EMAIL = 'login__email';
38
+ /**
39
+ * @description Username field label
40
+ * @localZh 用户名
41
+ * @localEn Username
42
+ */
43
+ export const LOGIN_USERNAME = 'login__username';
44
+ /**
45
+ * @description Password field label
46
+ * @localZh 密码
47
+ * @localEn Password
48
+ */
49
+ export const LOGIN_PASSWORD = 'login__password';
50
+ /**
51
+ * @description Login button text
52
+ * @localZh 登录
53
+ * @localEn Login
54
+ */
55
+ export const LOGIN_BUTTON = 'login__login';
56
+ /**
57
+ * @description Login page description
58
+ * @localZh 欢迎来到未来学习
59
+ * @localEn Welcome to the future of learning
60
+ */
61
+ export const LOGIN_WELCOME = 'login__welcome';
62
+ /**
63
+ * @description Login page description
64
+ * @localZh 解锁个性化 AI 驱动的学习体验,加速您的知识旅程。
65
+ * @localEn Unlock personalized AI-powered learning experiences designed to accelerate your knowledge journey__
66
+ */
67
+ export const LOGIN_SUBTITLE = 'login__subtitle';
68
+ /**
69
+ * @description Login page forgot password text
70
+ * @localZh 忘记密码?
71
+ * @localEn Forgot your password?
72
+ */
73
+ export const LOGIN_FORGOT_PASSWORD = 'login__forgot_password';
74
+ /**
75
+ * @description Login page continue with text
76
+ * @localZh 或继续使用
77
+ * @localEn or continue with
78
+ */
79
+ export const LOGIN_CONTINUE_WITH = 'login__continue_with';
80
+ /**
81
+ * @description Login with Google button text
82
+ * @localZh 使用 Google 登录
83
+ * @localEn Sign in with Google
84
+ */
85
+ export const LOGIN_WITH_GOOGLE = 'login__with_google';
86
+ /**
87
+ * @description Login page no account text
88
+ * @localZh 还没有账号?
89
+ * @localEn Don't have an account?
90
+ */
91
+ export const LOGIN_NO_ACCOUNT = 'login__no_account';
92
+ /**
93
+ * @description Login page create account link text
94
+ * @localZh 在此创建
95
+ * @localEn Create one here
96
+ */
97
+ export const LOGIN_CREATE_ACCOUNT = 'login__create_account';
98
+ /**
99
+ * @description Login page email validation message
100
+ * @localZh 请输入您的邮箱!
101
+ * @localEn Please input your email!
102
+ */
103
+ export const LOGIN_EMAIL_REQUIRED = 'login__email_required';
104
+ /**
105
+ * @description Login page password validation message
106
+ * @localZh 请输入您的密码!
107
+ * @localEn Please input your password!
108
+ */
109
+ export const LOGIN_PASSWORD_REQUIRED = 'login__password_required';
110
+ /**
111
+ * @description Login page feature item - AI learning paths
112
+ * @localZh AI驱动的个性化学习路径
113
+ * @localEn AI-powered personalized learning paths
114
+ */
115
+ export const LOGIN_FEATURE_AI_PATHS = 'login__feature__ai_paths';
116
+ /**
117
+ * @description Login page feature item - Smart recommendations
118
+ * @localZh 智能内容推荐
119
+ * @localEn Smart content recommendations
120
+ */
121
+ export const LOGIN_FEATURE_SMART_RECOMMENDATIONS =
122
+ 'login__feature__smart_recommendations';
123
+ /**
124
+ * @description Login page feature item - Progress tracking
125
+ * @localZh 实时进度追踪
126
+ * @localEn Real-time progress tracking
127
+ */
128
+ export const LOGIN_FEATURE_PROGRESS_TRACKING =
129
+ 'login__feature__progress_tracking';
130
+ /**
131
+ * @description Login page email input title
132
+ * @localZh 输入邮箱
133
+ * @localEn Enter email
134
+ */
135
+ export const LOGIN_EMAIL_TITLE = 'login__email__title';
136
+ /**
137
+ * @description Login page password input title
138
+ * @localZh 输入密码
139
+ * @localEn Enter password
140
+ */
141
+ export const LOGIN_PASSWORD_TITLE = 'login__password__title';
142
+ /**
143
+ * @description Login page forgot password link title
144
+ * @localZh 重置密码
145
+ * @localEn Reset password
146
+ */
147
+ export const LOGIN_FORGOT_PASSWORD_TITLE = 'login__forgot_password__title';
148
+ /**
149
+ * @description Login page submit button title
150
+ * @localZh 登录账号
151
+ * @localEn Sign in to account
152
+ */
153
+ export const LOGIN_BUTTON_TITLE = 'login__button__title';
154
+ /**
155
+ * @description Login page Google sign in button title
156
+ * @localZh 使用Google账号登录
157
+ * @localEn Sign in with Google account
158
+ */
159
+ export const LOGIN_WITH_GOOGLE_TITLE = 'login__with_google__title';
160
+ /**
161
+ * @description Login page create account link title
162
+ * @localZh 创建新账号
163
+ * @localEn Create new account
164
+ */
165
+ 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,182 @@
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 =
112
+ 'page__request__hello__description';
113
+ /**
114
+ * @description Request page hello button text
115
+ * @localZh Hello
116
+ * @localEn Hello
117
+ */
118
+ export const PAGE_REQUEST_HELLO_BUTTON = 'page__request__hello__button';
119
+ /**
120
+ * @description Request page ip info title
121
+ * @localZh FeApi: IP Information
122
+ * @localEn FeApi: IP Information
123
+ */
124
+ export const PAGE_REQUEST_IP_INFO_TITLE = 'page__request__ip_info__title';
125
+ /**
126
+ * @description Request page ip info description
127
+ * @localZh RequestScheduler 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin 插件, 其中 ApiPickDataPlugin 插件可以将返回类型统一扁平到 data 字段
128
+ * @localEn RequestScheduler class API using FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin plugins, where ApiPickDataPlugin can flatten return types to data field
129
+ */
130
+ export const PAGE_REQUEST_IP_INFO_DESCRIPTION =
131
+ 'page__request__ip_info__description';
132
+ /**
133
+ * @description Request page random user title
134
+ * @localZh UserApi: Random User
135
+ * @localEn UserApi: Random User
136
+ */
137
+ export const PAGE_REQUEST_RANDOM_USER_TITLE =
138
+ 'page__request__random_user__title';
139
+ /**
140
+ * @description Request page random user description
141
+ * @localZh RequestTransaction 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin 插件, 其中 FetchAbortPlugin 可以中止请求, ApiCatchPlugin 可以将捕获的错误统一到 apiCatchResult 字段
142
+ * @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
143
+ */
144
+ export const PAGE_REQUEST_RANDOM_USER_DESCRIPTION =
145
+ 'page__request__random_user__description';
146
+ /**
147
+ * @description Request page api catch result title
148
+ * @localZh UserApi: Api Catch Result
149
+ * @localEn UserApi: Api Catch Result
150
+ */
151
+ export const PAGE_REQUEST_API_CATCH_TITLE = 'page__request__api_catch__title';
152
+ /**
153
+ * @description Request page abort request title
154
+ * @localZh UserApi: Abort Request
155
+ * @localEn UserApi: Abort Request
156
+ */
157
+ export const PAGE_REQUEST_ABORT_TITLE = 'page__request__abort__title';
158
+ /**
159
+ * @description Request page trigger abort request button
160
+ * @localZh 触发中止请求
161
+ * @localEn Trigger Abort Request
162
+ */
163
+ export const PAGE_REQUEST_TRIGGER_ABORT = 'page__request__trigger_abort';
164
+ /**
165
+ * @description Request page stop abort request button
166
+ * @localZh 停止中止请求
167
+ * @localEn Stop Abort Request
168
+ */
169
+ export const PAGE_REQUEST_STOP_ABORT = 'page__request__stop_abort';
170
+ /**
171
+ * @description Request page trigger api catch result button
172
+ * @localZh 触发 API 捕获结果
173
+ * @localEn Trigger API Catch Result
174
+ */
175
+ export const PAGE_REQUEST_TRIGGER_API_CATCH =
176
+ 'page__request__trigger_api_catch';
177
+ /**
178
+ * @description Request page stop api catch result button
179
+ * @localZh 停止 API 捕获结果
180
+ * @localEn Stop API Catch Result
181
+ */
182
+ export const PAGE_REQUEST_STOP_API_CATCH = 'page__request__stop_api_catch';
@@ -0,0 +1,34 @@
1
+ export const envPrefix = 'NEXT_PUBLIC_';
2
+
3
+ export const browserGlobalsName = 'feGlobals';
4
+
5
+ /**
6
+ * 启动器环境变量注入黑名单
7
+ */
8
+ export const envBlackList = ['env', 'userNodeEnv'];
9
+
10
+ export const loggerStyles = {
11
+ fatal: { color: '#ff0000', fontWeight: 'bold' },
12
+ error: { color: '#ff0000' },
13
+ warn: { color: '#ffa500' },
14
+ info: { color: '#0000ff' },
15
+ debug: { color: '#008000' },
16
+ trace: { color: '#808080' },
17
+ log: { color: '#000000' }
18
+ };
19
+
20
+ /**
21
+ * 路由前缀
22
+ *
23
+ * - 需要以 / 开头
24
+ * - 但是不能只有 /
25
+ */
26
+ export const routerPrefix = '/router-root';
27
+
28
+ /**
29
+ * 是否使用本地化路由
30
+ *
31
+ * - true: 使用本地化路由,路由会带有语言前缀 (例如: /en/home)
32
+ * - false: 不使用本地化路由,直接使用路径 (例如: /home)
33
+ */
34
+ export const useLocaleRoutes = true;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Page I18n Interface for SEO meta properties
3
+ *
4
+ * value may be undefined, which means the page does not have this meta property
5
+ *
6
+ * - if value is i18n key, it will be translated to the current language
7
+ * - if value is a string, it will be used as is
8
+ */
9
+ export interface PageI18nInterface {
10
+ // Basic meta properties
11
+ title: string;
12
+ description: string;
13
+ content: string;
14
+ keywords: string;
15
+
16
+ // Canonical URL
17
+ canonical?: string;
18
+
19
+ // Robots meta
20
+ robots?: {
21
+ index?: boolean;
22
+ follow?: boolean;
23
+ noarchive?: boolean;
24
+ };
25
+
26
+ // Open Graph meta properties
27
+ og?: {
28
+ title?: string;
29
+ description?: string;
30
+ type?: string;
31
+ image?: string;
32
+ url?: string;
33
+ siteName?: string;
34
+ locale?: string;
35
+ };
36
+
37
+ // Twitter Card meta properties
38
+ twitter?: {
39
+ card?: 'summary' | 'summary_large_image' | 'app' | 'player';
40
+ site?: string;
41
+ creator?: string;
42
+ title?: string;
43
+ description?: string;
44
+ image?: string;
45
+ };
46
+
47
+ // Additional meta properties
48
+ author?: string;
49
+ publishedTime?: string;
50
+ modifiedTime?: string;
51
+ }
@@ -0,0 +1,12 @@
1
+ export const i18nConfig = {
2
+ localeNames: {
3
+ en: 'English',
4
+ zh: '中文'
5
+ },
6
+ fallbackLng: 'en',
7
+ debug: false,
8
+ supportedLngs: ['en', 'zh'] as const,
9
+ localeDetection: true
10
+ } as const;
11
+
12
+ export type LocaleType = (typeof i18nConfig.supportedLngs)[number];
@@ -0,0 +1,3 @@
1
+ export * from './i18nConfig';
2
+ export * from './PageI18nInterface';
3
+ export * from './loginI18n';
@@ -0,0 +1,42 @@
1
+ import * as i18nKeys from '../Identifier/page.login';
2
+
3
+ /**
4
+ * Login page i18n interface
5
+ *
6
+ * @description
7
+ * - welcome: welcome message
8
+ */
9
+ export type LoginI18nInterface = typeof loginI18n;
10
+
11
+ export const loginI18n = Object.freeze({
12
+ // basic meta properties
13
+ title: i18nKeys.PAGE_LOGIN_TITLE,
14
+ description: i18nKeys.PAGE_LOGIN_DESCRIPTION,
15
+ content: i18nKeys.PAGE_LOGIN_CONTENT,
16
+ keywords: i18nKeys.PAGE_LOGIN_KEYWORDS,
17
+
18
+ // login page
19
+ welcome: i18nKeys.LOGIN_WELCOME,
20
+ subtitle: i18nKeys.LOGIN_SUBTITLE,
21
+ feature_ai_paths: i18nKeys.LOGIN_FEATURE_AI_PATHS,
22
+ feature_smart_recommendations: i18nKeys.LOGIN_FEATURE_SMART_RECOMMENDATIONS,
23
+ feature_progress_tracking: i18nKeys.LOGIN_FEATURE_PROGRESS_TRACKING,
24
+
25
+ // login form
26
+ emailRequired: i18nKeys.LOGIN_EMAIL_REQUIRED,
27
+ email: i18nKeys.LOGIN_EMAIL,
28
+ emailTitle: i18nKeys.LOGIN_EMAIL_TITLE,
29
+ passwordRequired: i18nKeys.LOGIN_PASSWORD_REQUIRED,
30
+ password: i18nKeys.LOGIN_PASSWORD,
31
+ passwordTitle: i18nKeys.LOGIN_PASSWORD_TITLE,
32
+ forgotPasswordTitle: i18nKeys.LOGIN_FORGOT_PASSWORD_TITLE,
33
+ forgotPassword: i18nKeys.LOGIN_FORGOT_PASSWORD,
34
+ buttonTitle: i18nKeys.LOGIN_BUTTON_TITLE,
35
+ button: i18nKeys.LOGIN_BUTTON,
36
+ continueWith: i18nKeys.LOGIN_CONTINUE_WITH,
37
+ withGoogleTitle: i18nKeys.LOGIN_WITH_GOOGLE_TITLE,
38
+ withGoogle: i18nKeys.LOGIN_WITH_GOOGLE,
39
+ noAccount: i18nKeys.LOGIN_NO_ACCOUNT,
40
+ createAccountTitle: i18nKeys.LOGIN_CREATE_ACCOUNT_TITLE,
41
+ createAccount: i18nKeys.LOGIN_CREATE_ACCOUNT
42
+ });
@@ -0,0 +1,23 @@
1
+ import type { ThemeConfig } from 'antd';
2
+
3
+ /**
4
+ * @type {import('@qlover/corekit-bridge').ThemeConfig}
5
+ */
6
+ export const themeConfig = {
7
+ domAttribute: 'data-theme',
8
+ defaultTheme: 'system',
9
+ target: 'html',
10
+ supportedThemes: ['light', 'dark', 'pink'],
11
+ storageKey: 'fe_theme',
12
+ init: true,
13
+ prioritizeStore: true,
14
+
15
+ antdTheme: {
16
+ cssVar: {
17
+ key: 'fe-theme',
18
+ prefix: 'fe'
19
+ }
20
+ } as ThemeConfig
21
+ } as const;
22
+
23
+ export type CommonThemeConfig = typeof themeConfig;