@qlover/create-app 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +139 -0
- package/package.json +4 -4
- package/templates/react-app/README.md +311 -120
- package/templates/react-app/config/Identifier.I18n.ts +1048 -0
- package/templates/react-app/config/app.router.json +7 -7
- package/templates/react-app/config/common.ts +13 -0
- package/templates/react-app/config/theme.json +7 -88
- package/templates/react-app/package.json +11 -5
- package/templates/react-app/postcss.config.js +1 -2
- package/templates/react-app/public/locales/en/common.json +142 -1
- package/templates/react-app/public/locales/zh/common.json +142 -1
- package/templates/react-app/src/App.tsx +16 -3
- package/templates/react-app/src/base/apis/AiApi.ts +4 -4
- package/templates/react-app/src/base/apis/feApi/FeApiAdapter.ts +2 -2
- package/templates/react-app/src/base/apis/userApi/UserApiAdapter.ts +2 -2
- package/templates/react-app/src/base/cases/AppConfig.ts +103 -0
- package/templates/react-app/src/base/cases/{appError/AppError.ts → AppError.ts} +0 -3
- package/templates/react-app/src/base/cases/DialogHandler.ts +86 -0
- package/templates/react-app/src/base/cases/RequestLogger.ts +1 -1
- package/templates/react-app/src/base/cases/RouterLoader.ts +166 -0
- package/templates/react-app/src/base/port/InteractionHubInterface.ts +94 -0
- package/templates/react-app/src/base/services/I18nService.ts +50 -3
- package/templates/react-app/src/base/services/ProcesserService.ts +0 -1
- package/templates/react-app/src/base/types/deprecated-antd.d.ts +60 -0
- package/templates/react-app/src/core/IOC.ts +18 -8
- package/templates/react-app/src/core/bootstrap.ts +41 -62
- package/templates/react-app/src/core/bootstraps/PrintBootstrap.ts +14 -0
- package/templates/react-app/src/core/bootstraps/index.ts +36 -7
- package/templates/react-app/src/core/globals.ts +8 -1
- package/templates/react-app/src/core/registers/RegisterApi.ts +2 -5
- package/templates/react-app/src/core/registers/RegisterCommon.ts +38 -29
- package/templates/react-app/src/core/registers/RegisterControllers.ts +5 -10
- package/templates/react-app/src/core/registers/RegisterGlobals.ts +21 -17
- package/templates/react-app/src/core/registers/index.ts +27 -13
- package/templates/react-app/src/main.tsx +1 -1
- package/templates/react-app/src/pages/404.tsx +1 -1
- package/templates/react-app/src/pages/500.tsx +1 -1
- package/templates/react-app/src/pages/auth/Login.tsx +128 -36
- package/templates/react-app/src/pages/base/About.tsx +118 -2
- package/templates/react-app/src/pages/base/ErrorIdentifier.tsx +38 -19
- package/templates/react-app/src/pages/base/Executor.tsx +442 -29
- package/templates/react-app/src/pages/base/Home.tsx +99 -93
- package/templates/react-app/src/pages/base/JSONStorage.tsx +47 -38
- package/templates/react-app/src/pages/base/Layout.tsx +5 -2
- package/templates/react-app/src/pages/base/Request.tsx +90 -208
- package/templates/react-app/src/pages/base/components/BaseHeader.tsx +13 -5
- package/templates/react-app/src/styles/css/antd-themes/_default.css +239 -0
- package/templates/react-app/src/styles/css/antd-themes/dark.css +176 -0
- package/templates/react-app/src/styles/css/antd-themes/index.css +3 -0
- package/templates/react-app/src/styles/css/antd-themes/no-context.css +34 -0
- package/templates/react-app/src/styles/css/antd-themes/pink.css +199 -0
- package/templates/react-app/src/{uikit/styles → styles}/css/index.css +3 -0
- package/templates/react-app/src/styles/css/page.css +11 -0
- package/templates/react-app/src/styles/css/tailwind.css +5 -0
- package/templates/react-app/src/styles/css/themes/_default.css +29 -0
- package/templates/react-app/src/styles/css/themes/dark.css +29 -0
- package/templates/react-app/src/styles/css/themes/index.css +3 -0
- package/templates/react-app/src/styles/css/themes/pink.css +29 -0
- package/templates/react-app/src/uikit/components/LanguageSwitcher.tsx +56 -0
- package/templates/react-app/src/uikit/components/Loading.tsx +27 -21
- package/templates/react-app/src/uikit/components/RouterRenderComponent.tsx +1 -1
- package/templates/react-app/src/uikit/components/ThemeSwitcher.tsx +63 -13
- package/templates/react-app/src/uikit/contexts/BaseRouteContext.ts +1 -1
- package/templates/react-app/src/uikit/controllers/RouterController.ts +1 -1
- package/templates/react-app/src/uikit/controllers/UserController.ts +2 -2
- package/templates/react-app/tailwind.config.js +1 -15
- package/templates/react-app/tsconfig.json +3 -2
- package/templates/react-app/tsconfig.node.json +2 -1
- package/templates/react-app/vite.config.ts +15 -3
- package/templates/react-app/lib/tailwind/root10px.js +0 -178
- package/templates/react-app/lib/tailwind/theme-generator.js +0 -238
- package/templates/react-app/public/locales/en/about.json +0 -3
- package/templates/react-app/public/locales/en/executor.json +0 -6
- package/templates/react-app/public/locales/en/home.json +0 -10
- package/templates/react-app/public/locales/en/jsonStorage.json +0 -11
- package/templates/react-app/public/locales/en/login.json +0 -7
- package/templates/react-app/public/locales/en/request.json +0 -15
- package/templates/react-app/public/locales/zh/about.json +0 -3
- package/templates/react-app/public/locales/zh/executor.json +0 -6
- package/templates/react-app/public/locales/zh/home.json +0 -10
- package/templates/react-app/public/locales/zh/jsonStorage.json +0 -11
- package/templates/react-app/public/locales/zh/login.json +0 -7
- package/templates/react-app/public/locales/zh/request.json +0 -15
- package/templates/react-app/src/base/cases/router-loader/index.ts +0 -90
- package/templates/react-app/src/base/port/InversifyIocInterface.ts +0 -9
- package/templates/react-app/src/core/AppConfig.ts +0 -36
- package/templates/react-app/src/uikit/styles/css/page.css +0 -3
- package/templates/react-app/src/uikit/styles/css/tailwind.css +0 -3
- /package/templates/react-app/config/{ErrorIdentifier.ts → Identifier.Error.ts} +0 -0
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"meta": {
|
|
22
22
|
"title": "fe-utils/home",
|
|
23
23
|
"icon": "home",
|
|
24
|
-
"localNamespace": "
|
|
24
|
+
"localNamespace": "common"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"meta": {
|
|
31
31
|
"title": "关于",
|
|
32
32
|
"icon": "info",
|
|
33
|
-
"localNamespace": "
|
|
33
|
+
"localNamespace": "common"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"meta": {
|
|
40
40
|
"title": "FE-Utils JSONStorage",
|
|
41
41
|
"icon": "info",
|
|
42
|
-
"localNamespace": "
|
|
42
|
+
"localNamespace": "common"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
{
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"meta": {
|
|
49
49
|
"title": "FE-Utils Request",
|
|
50
50
|
"icon": "info",
|
|
51
|
-
"localNamespace": "
|
|
51
|
+
"localNamespace": "common"
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
{
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"meta": {
|
|
58
58
|
"title": "FE-Utils Executor",
|
|
59
59
|
"icon": "info",
|
|
60
|
-
"localNamespace": "
|
|
60
|
+
"localNamespace": "common"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
{
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"meta": {
|
|
110
110
|
"title": "登录",
|
|
111
111
|
"icon": "info",
|
|
112
|
-
"localNamespace": "
|
|
112
|
+
"localNamespace": "common"
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
{
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"meta": {
|
|
119
119
|
"title": "注册",
|
|
120
120
|
"icon": "info",
|
|
121
|
-
"localNamespace": "
|
|
121
|
+
"localNamespace": "common"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
]
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
import type { ViteDeprecatedAntdOptions } from '@brain-toolkit/antd-theme-override/vite';
|
|
2
|
+
|
|
1
3
|
export const envPrefix = 'VITE_';
|
|
2
4
|
|
|
3
5
|
export const browserGlobalsName = 'feGlobals';
|
|
4
6
|
|
|
7
|
+
/**
|
|
8
|
+
* 覆盖 antd 主题模式
|
|
9
|
+
*
|
|
10
|
+
* - noGlobals 不要使用全局的 antd 组件(推荐)
|
|
11
|
+
* - overrideStatic 单独覆盖静态组件变量(这个文件就是这个作用)
|
|
12
|
+
*
|
|
13
|
+
* If use vite-deprecated-antd, automatically change file
|
|
14
|
+
*/
|
|
15
|
+
export const overrideAntdThemeMode: ViteDeprecatedAntdOptions['mode'] =
|
|
16
|
+
'noGlobals';
|
|
17
|
+
|
|
5
18
|
/**
|
|
6
19
|
* bootstrap ,not inject env
|
|
7
20
|
*/
|
|
@@ -1,90 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"colors": {
|
|
10
|
-
"light": {
|
|
11
|
-
"primary": "#00f",
|
|
12
|
-
"secondary": "#fff",
|
|
13
|
-
"text": "#000",
|
|
14
|
-
"background": "#fff"
|
|
15
|
-
},
|
|
16
|
-
"dark": {
|
|
17
|
-
"primary": "#f00",
|
|
18
|
-
"secondary": "#000",
|
|
19
|
-
"text": "#fff",
|
|
20
|
-
"background": "#000"
|
|
21
|
-
},
|
|
22
|
-
"pink": {
|
|
23
|
-
"primary": "#f0f",
|
|
24
|
-
"secondary": "#aaa",
|
|
25
|
-
"text": "#ddd",
|
|
26
|
-
"background": "#e0e0e0"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"override": {
|
|
31
|
-
"domAttribute": "data-theme",
|
|
32
|
-
"defaultTheme": "system",
|
|
33
|
-
"target": "html",
|
|
34
|
-
"supportedThemes": ["light", "dark", "pink"],
|
|
35
|
-
"storageKey": "fe_theme",
|
|
36
|
-
"styleThemeKeyTemplate": "${target}[${domAttribute}='${theme}']",
|
|
37
|
-
"styleKeyTemplate": "--fe-color-${colorKey}",
|
|
38
|
-
"colorsValueTemplate": "rgb(var(${styleKey}))",
|
|
39
|
-
"colors": {
|
|
40
|
-
"light": {
|
|
41
|
-
"white": "255 255 255",
|
|
42
|
-
"black": "0 0 0",
|
|
43
|
-
"gray": {
|
|
44
|
-
"50": "249 250 251",
|
|
45
|
-
"100": "243 244 246",
|
|
46
|
-
"200": "229 231 235",
|
|
47
|
-
"300": "209 213 219",
|
|
48
|
-
"400": "156 163 175",
|
|
49
|
-
"500": "107 114 128",
|
|
50
|
-
"600": "75 85 99",
|
|
51
|
-
"700": "55 65 81",
|
|
52
|
-
"800": "31 41 55",
|
|
53
|
-
"900": "17 24 39"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"dark": {
|
|
57
|
-
"white": "226 232 240",
|
|
58
|
-
"black": "0 0 0",
|
|
59
|
-
"gray": {
|
|
60
|
-
"50": "10 10 10",
|
|
61
|
-
"100": "28 28 28",
|
|
62
|
-
"200": "46 46 46",
|
|
63
|
-
"300": "64 64 64",
|
|
64
|
-
"400": "82 82 82",
|
|
65
|
-
"500": "100 100 100",
|
|
66
|
-
"600": "120 120 120",
|
|
67
|
-
"700": "138 138 138",
|
|
68
|
-
"800": "156 156 156",
|
|
69
|
-
"900": "176 176 176"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"pink": {
|
|
73
|
-
"white": "255 228 225",
|
|
74
|
-
"black": "51 51 51",
|
|
75
|
-
"gray": {
|
|
76
|
-
"50": "255 245 245",
|
|
77
|
-
"100": "255 234 234",
|
|
78
|
-
"200": "255 194 194",
|
|
79
|
-
"300": "255 153 153",
|
|
80
|
-
"400": "255 112 112",
|
|
81
|
-
"500": "255 71 71",
|
|
82
|
-
"600": "255 31 31",
|
|
83
|
-
"700": "230 0 0",
|
|
84
|
-
"800": "179 0 0",
|
|
85
|
-
"900": "128 0 0"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
2
|
+
"domAttribute": "data-theme",
|
|
3
|
+
"defaultTheme": "system",
|
|
4
|
+
"target": "html",
|
|
5
|
+
"supportedThemes": ["light", "dark", "pink"],
|
|
6
|
+
"storageKey": "fe_theme",
|
|
7
|
+
"init": true,
|
|
8
|
+
"prioritizeStore": true
|
|
90
9
|
}
|
|
@@ -51,10 +51,15 @@
|
|
|
51
51
|
"test": "vitest run"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@
|
|
54
|
+
"@brain-toolkit/antd-theme-override": "^0.0.3",
|
|
55
|
+
"@qlover/corekit-bridge": "^1.0.3",
|
|
55
56
|
"@qlover/fe-corekit": "^1.3.1",
|
|
56
57
|
"@qlover/logger": "^0.1.1",
|
|
57
58
|
"@qlover/slice-store-react": "^1.0.8",
|
|
59
|
+
"@tailwindcss/postcss": "^4.1.8",
|
|
60
|
+
"@tailwindcss/vite": "^4.1.8",
|
|
61
|
+
"antd": "^5.25.3",
|
|
62
|
+
"clsx": "^2.1.1",
|
|
58
63
|
"i18next": "^24.2.0",
|
|
59
64
|
"i18next-browser-languagedetector": "^8.0.2",
|
|
60
65
|
"i18next-http-backend": "^3.0.1",
|
|
@@ -64,9 +69,11 @@
|
|
|
64
69
|
"react-dom": "^18.3.1",
|
|
65
70
|
"react-i18next": "^15.2.0",
|
|
66
71
|
"react-router-dom": "^7.1.5",
|
|
67
|
-
"reflect-metadata": "^0.2.2"
|
|
72
|
+
"reflect-metadata": "^0.2.2",
|
|
73
|
+
"vite": "^6.3.5"
|
|
68
74
|
},
|
|
69
75
|
"devDependencies": {
|
|
76
|
+
"@brain-toolkit/ts2locales": "^0.2.3",
|
|
70
77
|
"@qlover/env-loader": "latest",
|
|
71
78
|
"@qlover/eslint-plugin-fe-dev": "^0.2.0",
|
|
72
79
|
"@qlover/fe-scripts": "latest",
|
|
@@ -86,13 +93,12 @@
|
|
|
86
93
|
"eslint-plugin-react-refresh": "^0.4.14",
|
|
87
94
|
"eslint-plugin-vitest": "^0.5.4",
|
|
88
95
|
"globals": "^15.12.0",
|
|
89
|
-
"postcss": "^8.4
|
|
96
|
+
"postcss": "^8.5.4",
|
|
90
97
|
"prettier": "^3.5.3",
|
|
91
98
|
"sass-embedded": "^1.79.4",
|
|
92
|
-
"tailwindcss": "^
|
|
99
|
+
"tailwindcss": "^4.1.8",
|
|
93
100
|
"typescript": "^5.6.3",
|
|
94
101
|
"typescript-eslint": "^8.15.0",
|
|
95
|
-
"vite": "^5.4.8",
|
|
96
102
|
"vite-plugin-cross-origin-isolation": "^0.1.6",
|
|
97
103
|
"vite-tsconfig-paths": "^5.1.4",
|
|
98
104
|
"vitest": "^3.0.5"
|
|
@@ -6,5 +6,146 @@
|
|
|
6
6
|
"err.ioc.not.implemented": "IOC not implemented",
|
|
7
7
|
"err.local.no.user.token": "Local no user token",
|
|
8
8
|
"err.global.no.window": "Global no window",
|
|
9
|
-
"err.within.page.provider": "Must be used in PageProvider"
|
|
9
|
+
"err.within.page.provider": "Must be used in PageProvider",
|
|
10
|
+
"page.about.title": "About",
|
|
11
|
+
"page.about.description": "Learn more about our project and team information",
|
|
12
|
+
"about.title": "About",
|
|
13
|
+
"jsonStorage.title": "JSONStorage Demo",
|
|
14
|
+
"jsonStorage.title2": "Permanent storage test",
|
|
15
|
+
"jsonStorage.title3": "Expire time test",
|
|
16
|
+
"jsonStorage.title4": "Request Timeout",
|
|
17
|
+
"jsonStorage.format.title": "Test key: ${key}, Random value range: ${min}~${max}",
|
|
18
|
+
"jsonStorage.setRandomValue": "Set random value",
|
|
19
|
+
"jsonStorage.currentValue": "Current value",
|
|
20
|
+
"jsonStorage.ms": "ms",
|
|
21
|
+
"jsonStorage.setExpireTime": "Set random value(with expire time)",
|
|
22
|
+
"login.title": "Login",
|
|
23
|
+
"login.email": "Email",
|
|
24
|
+
"login.username": "Username",
|
|
25
|
+
"login.password": "Password",
|
|
26
|
+
"login.login": "Login",
|
|
27
|
+
"request.requestTimeout": "Request Timeout",
|
|
28
|
+
"request.helloResult": "Hello result is",
|
|
29
|
+
"request.helloError": "Hello error is",
|
|
30
|
+
"request.ipInfoResult": "IpInfo result is",
|
|
31
|
+
"request.ipInfo": "IpInfo",
|
|
32
|
+
"request.randomUser": "RandomUser",
|
|
33
|
+
"request.loading": "Loading...",
|
|
34
|
+
"request.randomUserResult": "RandomUser result is",
|
|
35
|
+
"request.randomUserError": "RandomUser error is",
|
|
36
|
+
"request.triggerAbortRequest": "Trigger Abort Request",
|
|
37
|
+
"request.stopAbortRequest": "Stop Abort Request",
|
|
38
|
+
"request.abortRequestResult": "Abort Request Result",
|
|
39
|
+
"request.abortRequestError": "Abort Request Error",
|
|
40
|
+
"executor.executorDemo": "Executor Demo",
|
|
41
|
+
"executor.requestTimeout": "Request Timeout",
|
|
42
|
+
"executor.executorTestPlugin": "Executor Test Plugin",
|
|
43
|
+
"executor.testPlugin": "Test Plugin",
|
|
44
|
+
"home.welcome": "Welcome to the home page",
|
|
45
|
+
"home.description": "A modern frontend utility library collection providing various practical tools and components",
|
|
46
|
+
"home.about": "About Us",
|
|
47
|
+
"home.about_description": "Learn more about our project and team information",
|
|
48
|
+
"home.jsonstorage": "JSONStorage",
|
|
49
|
+
"home.jsonstorage_description": "Efficient JSON data storage solution",
|
|
50
|
+
"home.request": "Request",
|
|
51
|
+
"home.request_description": "A modern frontend utility library collection providing various practical tools and components",
|
|
52
|
+
"page.jsonstorage.title": "JSONStorage Page",
|
|
53
|
+
"page.jsonstorage.description": "Use JSONStorage for data storage and management",
|
|
54
|
+
"page.request.title": "Request Examples",
|
|
55
|
+
"page.request.description": "Demonstrate various request examples and usage",
|
|
56
|
+
"page.executor.title": "Executor Examples",
|
|
57
|
+
"page.executor.description": "A powerful task executor supporting multiple task types and state management",
|
|
58
|
+
"page.error.identifier.title": "Error Identifier",
|
|
59
|
+
"page.error.identifier.description": "Error identifier usage and examples",
|
|
60
|
+
"home.explore": "Explore",
|
|
61
|
+
"home.get_started.title": "Ready to Get Started?",
|
|
62
|
+
"home.get_started.description": "Join us and discover the power of our utilities",
|
|
63
|
+
"home.get_started.button": "Get Started Now",
|
|
64
|
+
"header.theme.default": "Default Theme",
|
|
65
|
+
"header.theme.dark": "Dark Theme",
|
|
66
|
+
"header.theme.pink": "Pink Theme",
|
|
67
|
+
"page.jsonstorage.main_title": "JSONStorage Demo",
|
|
68
|
+
"page.jsonstorage.permanent_title": "Permanent Storage Test",
|
|
69
|
+
"page.jsonstorage.expire_title": "Expire Time Test",
|
|
70
|
+
"page.jsonstorage.timeout_title": "Request Timeout Setting",
|
|
71
|
+
"page.jsonstorage.format_title": "Test key: ${key}, Random value range: ${min}~${max}",
|
|
72
|
+
"page.jsonstorage.set_random": "Set Random Value",
|
|
73
|
+
"page.jsonstorage.current_value": "Current Value",
|
|
74
|
+
"page.jsonstorage.set_expire": "Set Random Value (with expire time)",
|
|
75
|
+
"page.jsonstorage.ms": "ms",
|
|
76
|
+
"page.request.timeout": "Request Timeout",
|
|
77
|
+
"page.request.hello.title": "AI API: Hello",
|
|
78
|
+
"page.request.hello.description": "Functional API using FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger plugins",
|
|
79
|
+
"page.request.hello.button": "Hello",
|
|
80
|
+
"page.request.ip_info.title": "FeApi: IP Information",
|
|
81
|
+
"page.request.ip_info.description": "RequestScheduler class API using FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin plugins, where ApiPickDataPlugin can flatten return types to data field",
|
|
82
|
+
"page.request.random_user.title": "UserApi: Random User",
|
|
83
|
+
"page.request.random_user.description": "RequestTransaction class API using FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin plugins, where FetchAbortPlugin can abort requests, ApiCatchPlugin can unify caught errors to apiCatchResult field",
|
|
84
|
+
"page.request.api_catch.title": "UserApi: Api Catch Result",
|
|
85
|
+
"page.request.abort.title": "UserApi: Abort Request",
|
|
86
|
+
"page.request.trigger_abort": "Trigger Abort Request",
|
|
87
|
+
"page.request.stop_abort": "Stop Abort Request",
|
|
88
|
+
"page.request.trigger_api_catch": "Trigger API Catch Result",
|
|
89
|
+
"page.request.stop_api_catch": "Stop API Catch Result",
|
|
90
|
+
"page.executor.main_title": "Executor",
|
|
91
|
+
"page.executor.test_plugin.title": "Test Plugin",
|
|
92
|
+
"page.executor.task.status.pending": "Pending",
|
|
93
|
+
"page.executor.task.status.running": "Running",
|
|
94
|
+
"page.executor.task.status.completed": "Completed",
|
|
95
|
+
"page.executor.task.status.failed": "Failed",
|
|
96
|
+
"page.executor.task.type.data_sync": "Data Sync",
|
|
97
|
+
"page.executor.task.type.report": "Report Generation",
|
|
98
|
+
"page.executor.task.type.maintenance": "System Maintenance",
|
|
99
|
+
"page.executor.task.type.backup": "Backup",
|
|
100
|
+
"page.executor.task.duration.unit": "minutes",
|
|
101
|
+
"page.executor.task.start": "Start",
|
|
102
|
+
"page.executor.task.stop": "Stop",
|
|
103
|
+
"page.executor.task.success": "Task %{name} executed successfully",
|
|
104
|
+
"page.executor.task.failure": "Task %{name} execution failed",
|
|
105
|
+
"page.executor.plugin.test.success": "Plugin test successful",
|
|
106
|
+
"page.executor.plugin.test.failure": "Plugin test failed",
|
|
107
|
+
"page.executor.custom_task.url_required": "Please enter URL",
|
|
108
|
+
"page.executor.custom_task.name": "Custom Task %{method} %{url}",
|
|
109
|
+
"page.executor.create_task.title": "Create Custom Task",
|
|
110
|
+
"page.executor.create_button": "Create",
|
|
111
|
+
"page.executor.enter_url": "Enter URL",
|
|
112
|
+
"page.executor.task_list.title": "Task List",
|
|
113
|
+
"page.executor.task_stats.total": "Total Tasks",
|
|
114
|
+
"page.executor.task_stats.running": "Running",
|
|
115
|
+
"page.executor.task_stats.completed": "Completed",
|
|
116
|
+
"page.executor.task_stats.failed": "Failed",
|
|
117
|
+
"page.executor.task_history.title": "Execution History",
|
|
118
|
+
"page.executor.help.title": "Need Help?",
|
|
119
|
+
"page.executor.help.description": "Having issues? Check our task execution guide or contact support",
|
|
120
|
+
"page.executor.view_guide": "View Guide",
|
|
121
|
+
"page.executor.contact_support": "Contact Support",
|
|
122
|
+
"page.error.identifier.main_title": "Error Identifier",
|
|
123
|
+
"page.error.identifier.source_description": "Identifier From: '@config/Identifier.Error'",
|
|
124
|
+
"page.error.identifier.help.title": "Need Help?",
|
|
125
|
+
"page.error.identifier.help.description": "If you encounter any issues while using error identifiers, please contact our support team",
|
|
126
|
+
"page.error.identifier.contact_support": "Contact Support",
|
|
127
|
+
"about.message.test": "This is a test message",
|
|
128
|
+
"about.notification.title": "Notification Title",
|
|
129
|
+
"about.notification.description": "This is a test notification",
|
|
130
|
+
"about.button.message": "Show Message",
|
|
131
|
+
"about.button.notification": "Show Notification",
|
|
132
|
+
"about.tooltip.text": "This is a tooltip text",
|
|
133
|
+
"about.button.tooltip": "Hover to show Tooltip",
|
|
134
|
+
"about.modal.title": "Modal Example",
|
|
135
|
+
"about.modal.content": "This is modal content",
|
|
136
|
+
"about.button.modal": "Show Modal",
|
|
137
|
+
"about.drawer.title": "Drawer Example",
|
|
138
|
+
"about.drawer.content": "This is drawer content",
|
|
139
|
+
"about.button.drawer": "Show Drawer",
|
|
140
|
+
"about.popover.content": "This is a popover card",
|
|
141
|
+
"about.popover.title": "Popover Title",
|
|
142
|
+
"about.button.popover": "Show Popover",
|
|
143
|
+
"about.popconfirm.title": "Confirmation",
|
|
144
|
+
"about.popconfirm.description": "Are you sure you want to perform this action?",
|
|
145
|
+
"about.button.popconfirm": "Show Popconfirm",
|
|
146
|
+
"about.alert.message": "This is a warning alert",
|
|
147
|
+
"common.ok": "OK",
|
|
148
|
+
"common.cancel": "Cancel",
|
|
149
|
+
"about.button.message2": "Static Message",
|
|
150
|
+
"about.button.notification2": "Static Notification"
|
|
10
151
|
}
|
|
@@ -6,5 +6,146 @@
|
|
|
6
6
|
"err.ioc.not.implemented": "IOC 未实现",
|
|
7
7
|
"err.local.no.user.token": "本地未找到 user token",
|
|
8
8
|
"err.global.no.window": "全局未找到 window",
|
|
9
|
-
"err.within.page.provider": "必须在 PageProvider 中使用"
|
|
9
|
+
"err.within.page.provider": "必须在 PageProvider 中使用",
|
|
10
|
+
"page.about.title": "关于",
|
|
11
|
+
"page.about.description": "了解更多关于我们的项目和团队信息",
|
|
12
|
+
"about.title": "关于我们",
|
|
13
|
+
"jsonStorage.title": "JSONStorage Demo",
|
|
14
|
+
"jsonStorage.title2": "永久存储测试",
|
|
15
|
+
"jsonStorage.title3": "过期时间测试",
|
|
16
|
+
"jsonStorage.title4": "请求超时时间设置",
|
|
17
|
+
"jsonStorage.format.title": "测试 key: ${key}, 随机值范围: ${min}~${max}",
|
|
18
|
+
"jsonStorage.setRandomValue": "设置随机值",
|
|
19
|
+
"jsonStorage.currentValue": "当前值",
|
|
20
|
+
"jsonStorage.ms": "毫秒",
|
|
21
|
+
"jsonStorage.setExpireTime": "设置随机值(带过期时间)",
|
|
22
|
+
"login.title": "登录",
|
|
23
|
+
"login.email": "邮箱",
|
|
24
|
+
"login.username": "用户名",
|
|
25
|
+
"login.password": "密码",
|
|
26
|
+
"login.login": "登录",
|
|
27
|
+
"request.requestTimeout": "请求超时",
|
|
28
|
+
"request.helloResult": "Hello 结果是",
|
|
29
|
+
"request.helloError": "Hello 错误是",
|
|
30
|
+
"request.ipInfoResult": "IpInfo 结果是",
|
|
31
|
+
"request.ipInfo": "IpInfo",
|
|
32
|
+
"request.randomUser": "随机用户",
|
|
33
|
+
"request.loading": "加载中...",
|
|
34
|
+
"request.randomUserResult": "随机用户 结果是",
|
|
35
|
+
"request.randomUserError": "随机用户 错误是",
|
|
36
|
+
"request.triggerAbortRequest": "触发中止请求",
|
|
37
|
+
"request.stopAbortRequest": "停止中止请求",
|
|
38
|
+
"request.abortRequestResult": "中止请求 结果是",
|
|
39
|
+
"request.abortRequestError": "中止请求 错误是",
|
|
40
|
+
"executor.executorDemo": "执行器 Demo",
|
|
41
|
+
"executor.requestTimeout": "请求超时",
|
|
42
|
+
"executor.executorTestPlugin": "执行器 测试插件",
|
|
43
|
+
"executor.testPlugin": "测试插件",
|
|
44
|
+
"home.welcome": "欢迎来到主页",
|
|
45
|
+
"home.description": "一个现代前端实用库集合,提供各种实用工具和组件",
|
|
46
|
+
"home.about": "关于我们",
|
|
47
|
+
"home.about_description": "了解更多关于我们的项目和团队信息",
|
|
48
|
+
"home.jsonstorage": "JSON存储",
|
|
49
|
+
"home.jsonstorage_description": "高效的JSON数据存储解决方案",
|
|
50
|
+
"home.request": "请求",
|
|
51
|
+
"home.request_description": "一个现代前端实用库集合,提供各种实用工具和组件",
|
|
52
|
+
"page.jsonstorage.title": "JSONStorage 页面",
|
|
53
|
+
"page.jsonstorage.description": "使用 JSONStorage 进行数据存储和管理",
|
|
54
|
+
"page.request.title": "请求示例",
|
|
55
|
+
"page.request.description": "展示各种请求示例和用法",
|
|
56
|
+
"page.executor.title": "执行器示例",
|
|
57
|
+
"page.executor.description": "一个强大的任务执行器,支持多种任务类型和状态管理",
|
|
58
|
+
"page.error.identifier.title": "错误标识符",
|
|
59
|
+
"page.error.identifier.description": "错误标识符的使用和示例",
|
|
60
|
+
"home.explore": "探索",
|
|
61
|
+
"home.get_started.title": "准备开始使用?",
|
|
62
|
+
"home.get_started.description": "加入我们,探索实用工具的力量",
|
|
63
|
+
"home.get_started.button": "立即开始",
|
|
64
|
+
"header.theme.default": "默认主题",
|
|
65
|
+
"header.theme.dark": "暗色主题",
|
|
66
|
+
"header.theme.pink": "粉色主题",
|
|
67
|
+
"page.jsonstorage.main_title": "JSONStorage 演示",
|
|
68
|
+
"page.jsonstorage.permanent_title": "永久存储测试",
|
|
69
|
+
"page.jsonstorage.expire_title": "过期时间测试",
|
|
70
|
+
"page.jsonstorage.timeout_title": "请求超时时间设置",
|
|
71
|
+
"page.jsonstorage.format_title": "测试 key: ${key}, 随机值范围: ${min}~${max}",
|
|
72
|
+
"page.jsonstorage.set_random": "设置随机值",
|
|
73
|
+
"page.jsonstorage.current_value": "当前值",
|
|
74
|
+
"page.jsonstorage.set_expire": "设置随机值(带过期时间)",
|
|
75
|
+
"page.jsonstorage.ms": "毫秒",
|
|
76
|
+
"page.request.timeout": "请求超时时间",
|
|
77
|
+
"page.request.hello.title": "AI API: Hello",
|
|
78
|
+
"page.request.hello.description": "函数式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger 插件",
|
|
79
|
+
"page.request.hello.button": "Hello",
|
|
80
|
+
"page.request.ip_info.title": "FeApi: IP Information",
|
|
81
|
+
"page.request.ip_info.description": "RequestScheduler 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin 插件, 其中 ApiPickDataPlugin 插件可以将返回类型统一扁平到 data 字段",
|
|
82
|
+
"page.request.random_user.title": "UserApi: Random User",
|
|
83
|
+
"page.request.random_user.description": "RequestTransaction 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin 插件, 其中 FetchAbortPlugin 可以中止请求, ApiCatchPlugin 可以将捕获的错误统一到 apiCatchResult 字段",
|
|
84
|
+
"page.request.api_catch.title": "UserApi: Api Catch Result",
|
|
85
|
+
"page.request.abort.title": "UserApi: Abort Request",
|
|
86
|
+
"page.request.trigger_abort": "触发中止请求",
|
|
87
|
+
"page.request.stop_abort": "停止中止请求",
|
|
88
|
+
"page.request.trigger_api_catch": "触发 API 捕获结果",
|
|
89
|
+
"page.request.stop_api_catch": "停止 API 捕获结果",
|
|
90
|
+
"page.executor.main_title": "执行器",
|
|
91
|
+
"page.executor.test_plugin.title": "测试插件",
|
|
92
|
+
"page.executor.task.status.pending": "等待中",
|
|
93
|
+
"page.executor.task.status.running": "运行中",
|
|
94
|
+
"page.executor.task.status.completed": "已完成",
|
|
95
|
+
"page.executor.task.status.failed": "失败",
|
|
96
|
+
"page.executor.task.type.data_sync": "数据同步",
|
|
97
|
+
"page.executor.task.type.report": "报告生成",
|
|
98
|
+
"page.executor.task.type.maintenance": "系统维护",
|
|
99
|
+
"page.executor.task.type.backup": "数据备份",
|
|
100
|
+
"page.executor.task.duration.unit": "分钟",
|
|
101
|
+
"page.executor.task.start": "开始",
|
|
102
|
+
"page.executor.task.stop": "停止",
|
|
103
|
+
"page.executor.task.success": "任务 %{name} 执行成功",
|
|
104
|
+
"page.executor.task.failure": "任务 %{name} 执行失败",
|
|
105
|
+
"page.executor.plugin.test.success": "插件测试成功",
|
|
106
|
+
"page.executor.plugin.test.failure": "插件测试失败",
|
|
107
|
+
"page.executor.custom_task.url_required": "请输入URL",
|
|
108
|
+
"page.executor.custom_task.name": "自定义任务 %{method} %{url}",
|
|
109
|
+
"page.executor.create_task.title": "创建自定义任务",
|
|
110
|
+
"page.executor.create_button": "创建",
|
|
111
|
+
"page.executor.enter_url": "输入URL",
|
|
112
|
+
"page.executor.task_list.title": "任务列表",
|
|
113
|
+
"page.executor.task_stats.total": "总任务数",
|
|
114
|
+
"page.executor.task_stats.running": "运行中",
|
|
115
|
+
"page.executor.task_stats.completed": "已完成",
|
|
116
|
+
"page.executor.task_stats.failed": "失败",
|
|
117
|
+
"page.executor.task_history.title": "执行历史",
|
|
118
|
+
"page.executor.help.title": "需要帮助?",
|
|
119
|
+
"page.executor.help.description": "遇到问题?查看我们的任务执行指南或联系支持团队",
|
|
120
|
+
"page.executor.view_guide": "查看指南",
|
|
121
|
+
"page.executor.contact_support": "联系支持",
|
|
122
|
+
"page.error.identifier.main_title": "错误标识符",
|
|
123
|
+
"page.error.identifier.source_description": "来自 '@config/Identifier.Error' 的标识符",
|
|
124
|
+
"page.error.identifier.help.title": "需要帮助?",
|
|
125
|
+
"page.error.identifier.help.description": "如果您在使用错误标识符时遇到问题,请联系我们的支持团队",
|
|
126
|
+
"page.error.identifier.contact_support": "联系支持",
|
|
127
|
+
"about.message.test": "这是一条测试消息",
|
|
128
|
+
"about.notification.title": "通知标题",
|
|
129
|
+
"about.notification.description": "这是一条测试通知",
|
|
130
|
+
"about.button.message": "显示 Message",
|
|
131
|
+
"about.button.notification": "显示 Notification",
|
|
132
|
+
"about.tooltip.text": "这是一个提示文本",
|
|
133
|
+
"about.button.tooltip": "悬停显示 Tooltip",
|
|
134
|
+
"about.modal.title": "模态框示例",
|
|
135
|
+
"about.modal.content": "这是一个模态框的内容",
|
|
136
|
+
"about.button.modal": "显示 Modal",
|
|
137
|
+
"about.drawer.title": "抽屉示例",
|
|
138
|
+
"about.drawer.content": "这是一个抽屉的内容",
|
|
139
|
+
"about.button.drawer": "显示 Drawer",
|
|
140
|
+
"about.popover.content": "这是一个气泡卡片",
|
|
141
|
+
"about.popover.title": "Popover 标题",
|
|
142
|
+
"about.button.popover": "显示 Popover",
|
|
143
|
+
"about.popconfirm.title": "确认提示",
|
|
144
|
+
"about.popconfirm.description": "您确定要执行此操作吗?",
|
|
145
|
+
"about.button.popconfirm": "显示 Popconfirm",
|
|
146
|
+
"about.alert.message": "这是一个警告提示",
|
|
147
|
+
"common.ok": "确定",
|
|
148
|
+
"common.cancel": "取消",
|
|
149
|
+
"about.button.message2": "静态消息",
|
|
150
|
+
"about.button.notification2": "静态通知"
|
|
10
151
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import '@/
|
|
1
|
+
import '@/styles/css/index.css';
|
|
2
2
|
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
|
|
3
3
|
import { lazy, useMemo } from 'react';
|
|
4
4
|
import { RouterRenderComponent } from './uikit/components/RouterRenderComponent';
|
|
5
5
|
import { IOC } from './core/IOC';
|
|
6
6
|
import { RouterController } from './uikit/controllers/RouterController';
|
|
7
|
-
import { RouterLoader, type ComponentValue } from '@/base/cases/
|
|
7
|
+
import { RouterLoader, type ComponentValue } from '@/base/cases/RouterLoader';
|
|
8
|
+
import { AntdThemeProvider } from '@brain-toolkit/antd-theme-override/react';
|
|
8
9
|
|
|
9
10
|
function getAllPages() {
|
|
10
11
|
const modules = import.meta.glob('./pages/**/*.tsx');
|
|
@@ -34,7 +35,19 @@ function App() {
|
|
|
34
35
|
return router;
|
|
35
36
|
}, []);
|
|
36
37
|
|
|
37
|
-
return
|
|
38
|
+
return (
|
|
39
|
+
<AntdThemeProvider
|
|
40
|
+
staticApi={IOC('DialogHandler')}
|
|
41
|
+
theme={{
|
|
42
|
+
cssVar: {
|
|
43
|
+
key: 'fe-theme',
|
|
44
|
+
prefix: 'fe'
|
|
45
|
+
}
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<RouterProvider router={routerBase} />
|
|
49
|
+
</AntdThemeProvider>
|
|
50
|
+
);
|
|
38
51
|
}
|
|
39
52
|
|
|
40
53
|
export default App;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import AppConfig from '@/core/AppConfig';
|
|
2
1
|
import {
|
|
3
2
|
FetchURLPlugin,
|
|
4
3
|
RequestAdapterFetch,
|
|
@@ -10,9 +9,10 @@ import {
|
|
|
10
9
|
} from '@qlover/corekit-bridge';
|
|
11
10
|
import { RequestLogger } from '../cases/RequestLogger';
|
|
12
11
|
import { IOCIdentifier } from '@/core/IOC';
|
|
12
|
+
import { appConfig } from '@/core/globals';
|
|
13
13
|
|
|
14
14
|
const apiApiAdapter = new RequestAdapterFetch({
|
|
15
|
-
baseURL:
|
|
15
|
+
baseURL: appConfig.aiApiBaseUrl
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
// 使用 RequestScheduler
|
|
@@ -27,8 +27,8 @@ export const AiApiBootstarp: BootstrapExecutorPlugin = {
|
|
|
27
27
|
apiApiAdapter.usePlugin(new FetchURLPlugin());
|
|
28
28
|
apiApiAdapter.usePlugin(
|
|
29
29
|
new RequestCommonPlugin({
|
|
30
|
-
tokenPrefix:
|
|
31
|
-
token:
|
|
30
|
+
tokenPrefix: appConfig.aiApiTokenPrefix,
|
|
31
|
+
token: appConfig.aiApiToken
|
|
32
32
|
})
|
|
33
33
|
);
|
|
34
34
|
apiApiAdapter.usePlugin(ioc.get(IOCIdentifier.ApiMockPlugin));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { AppConfig } from '@/base/cases/AppConfig';
|
|
1
2
|
import { IOCIdentifier } from '@/core/IOC';
|
|
2
3
|
import { RequestAdapterFetch } from '@qlover/fe-corekit';
|
|
3
4
|
import { inject, injectable } from 'inversify';
|
|
4
|
-
import { AppConfigImpl } from '@/core/AppConfig';
|
|
5
5
|
|
|
6
6
|
@injectable()
|
|
7
7
|
export class FeApiAdapter extends RequestAdapterFetch {
|
|
8
|
-
constructor(@inject(IOCIdentifier.AppConfig) appConfig:
|
|
8
|
+
constructor(@inject(IOCIdentifier.AppConfig) appConfig: AppConfig) {
|
|
9
9
|
super({
|
|
10
10
|
responseType: 'json',
|
|
11
11
|
baseURL: appConfig.feApiBaseUrl
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { AppConfig } from '@/base/cases/AppConfig';
|
|
1
2
|
import { IOCIdentifier } from '@/core/IOC';
|
|
2
3
|
import { RequestAdapterFetch } from '@qlover/fe-corekit';
|
|
3
4
|
import { inject, injectable } from 'inversify';
|
|
4
|
-
import { AppConfigImpl } from '@/core/AppConfig';
|
|
5
5
|
|
|
6
6
|
@injectable()
|
|
7
7
|
export class UserApiAdapter extends RequestAdapterFetch {
|
|
8
|
-
constructor(@inject(IOCIdentifier.AppConfig) appConfig:
|
|
8
|
+
constructor(@inject(IOCIdentifier.AppConfig) appConfig: AppConfig) {
|
|
9
9
|
super({
|
|
10
10
|
responseType: 'json',
|
|
11
11
|
baseURL: appConfig.feApiBaseUrl
|