@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.
- package/CHANGELOG.md +80 -35
- package/dist/index.cjs +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -2418
- package/{templates → dist/templates}/node-lib/package.json +2 -2
- package/{templates → dist/templates}/react-app/README.md +6 -6
- package/{templates → dist/templates}/react-app/config/Identifier/Error.ts +8 -8
- package/dist/templates/react-app/config/Identifier/common.ts +62 -0
- package/dist/templates/react-app/config/Identifier/index.ts +10 -0
- package/dist/templates/react-app/config/Identifier/page.about.ts +181 -0
- package/dist/templates/react-app/config/Identifier/page.executor.ts +267 -0
- package/dist/templates/react-app/config/Identifier/page.home.ts +63 -0
- package/dist/templates/react-app/config/Identifier/page.identifiter.ts +39 -0
- package/dist/templates/react-app/config/Identifier/page.jsonStorage.ts +70 -0
- package/dist/templates/react-app/config/Identifier/page.login.ts +152 -0
- package/dist/templates/react-app/config/Identifier/page.register.ts +147 -0
- package/dist/templates/react-app/config/Identifier/page.request.ts +179 -0
- package/dist/templates/react-app/config/app.router.ts +163 -0
- package/dist/templates/react-app/config/theme.ts +11 -0
- package/{templates → dist/templates}/react-app/package.json +2 -2
- package/{templates → dist/templates}/react-app/public/locales/en/common.json +97 -116
- package/{templates → dist/templates}/react-app/public/locales/zh/common.json +98 -117
- package/{templates → dist/templates}/react-app/src/App.tsx +6 -5
- package/dist/templates/react-app/src/base/cases/I18nKeyErrorPlugin.ts +36 -0
- package/{templates → dist/templates}/react-app/src/base/cases/RouterLoader.ts +2 -1
- package/{templates → dist/templates}/react-app/src/base/services/I18nService.ts +4 -4
- package/{templates/react-app/src/base/services/ProcesserService.ts → dist/templates/react-app/src/base/services/ProcesserExecutor.ts} +15 -5
- package/{templates → dist/templates}/react-app/src/base/services/RouteService.ts +11 -13
- package/{templates → dist/templates}/react-app/src/base/services/UserService.ts +37 -21
- package/{templates → dist/templates}/react-app/src/base/types/Page.ts +12 -2
- package/{templates → dist/templates}/react-app/src/core/bootstrap.ts +1 -1
- package/{templates → dist/templates}/react-app/src/core/bootstraps/index.ts +3 -1
- package/{templates → dist/templates}/react-app/src/core/registers/RegisterCommon.ts +7 -7
- package/{templates → dist/templates}/react-app/src/core/registers/RegisterControllers.ts +7 -2
- package/{templates → dist/templates}/react-app/src/pages/404.tsx +4 -1
- package/{templates → dist/templates}/react-app/src/pages/500.tsx +2 -1
- package/{templates → dist/templates}/react-app/src/pages/auth/Layout.tsx +1 -1
- package/{templates/react-app/src/pages/auth/Login.tsx → dist/templates/react-app/src/pages/auth/LoginPage.tsx} +2 -2
- package/{templates/react-app/src/pages/auth/Register.tsx → dist/templates/react-app/src/pages/auth/RegisterPage.tsx} +3 -4
- package/{templates/react-app/src/pages/base/About.tsx → dist/templates/react-app/src/pages/base/AboutPage.tsx} +4 -4
- package/{templates/react-app/src/pages/base/ErrorIdentifier.tsx → dist/templates/react-app/src/pages/base/ErrorIdentifierPage.tsx} +3 -3
- package/{templates/react-app/src/pages/base/Executor.tsx → dist/templates/react-app/src/pages/base/ExecutorPage.tsx} +3 -3
- package/{templates/react-app/src/pages/base/Home.tsx → dist/templates/react-app/src/pages/base/HomePage.tsx} +15 -45
- package/{templates/react-app/src/pages/base/JSONStorage.tsx → dist/templates/react-app/src/pages/base/JSONStoragePage.tsx} +2 -2
- package/{templates → dist/templates}/react-app/src/pages/base/Layout.tsx +4 -4
- package/{templates/react-app/src/pages/base/Request.tsx → dist/templates/react-app/src/pages/base/RequestPage.tsx} +2 -2
- package/{templates/react-app/src/pages/base → dist/templates/react-app/src/uikit}/components/LogoutButton.tsx +1 -1
- package/{templates → dist/templates}/react-app/src/uikit/components/ThemeSwitcher.tsx +5 -6
- package/{templates → dist/templates}/react-app/src/uikit/contexts/BaseRouteContext.ts +1 -1
- package/{templates → dist/templates}/react-app/src/uikit/controllers/ExecutorController.ts +2 -2
- package/{templates → dist/templates}/react-app/src/uikit/controllers/JSONStorageController.ts +2 -2
- package/{templates → dist/templates}/react-app/src/uikit/controllers/RequestController.ts +1 -1
- package/{templates/react-app/src/uikit/hooks/useLanguageGuard.ts → dist/templates/react-app/src/uikit/hooks/useI18nGuard.ts} +1 -1
- package/{templates → dist/templates}/react-app/src/uikit/hooks/useStore.ts +2 -2
- package/dist/templates/react-app/src/uikit/hooks/userRouterService.ts +12 -0
- package/{templates → dist/templates}/react-app/src/uikit/providers/BaseRouteProvider.tsx +1 -0
- package/dist/templates/react-app/src/uikit/providers/ProcessExecutorProvider.tsx +24 -0
- package/dist/templates/react-app/src/uikit/providers/UserAuthProvider.tsx +16 -0
- package/{templates → dist/templates}/react-app/vite.config.ts +2 -1
- package/package.json +4 -6
- package/templates/react-app/config/Identifier/Auth.ts +0 -13
- package/templates/react-app/config/Identifier/I18n.ts +0 -1366
- package/templates/react-app/config/app.router.json +0 -159
- package/templates/react-app/config/theme.json +0 -9
- package/templates/react-app/src/base/port/LoginInterface.ts +0 -12
- package/templates/react-app/src/base/port/StoreInterface.ts +0 -58
- package/templates/react-app/src/uikit/providers/ProcessProvider.tsx +0 -45
- /package/{configs → dist/configs}/_common/.editorconfig +0 -0
- /package/{configs → dist/configs}/_common/.env.template +0 -0
- /package/{configs → dist/configs}/_common/.gitattributes +0 -0
- /package/{configs → dist/configs}/_common/.github/workflows/general-check.yml +0 -0
- /package/{configs → dist/configs}/_common/.github/workflows/release.yml +0 -0
- /package/{configs → dist/configs}/_common/.gitignore.template +0 -0
- /package/{configs → dist/configs}/_common/.husky/commit-msg +0 -0
- /package/{configs → dist/configs}/_common/.husky/pre-commit +0 -0
- /package/{configs → dist/configs}/_common/.prettierignore +0 -0
- /package/{configs → dist/configs}/_common/.prettierrc.js +0 -0
- /package/{configs → dist/configs}/_common/.vscode/extensions.json +0 -0
- /package/{configs → dist/configs}/_common/.vscode/react.code-snippets +0 -0
- /package/{configs → dist/configs}/_common/.vscode/settings.json +0 -0
- /package/{configs → dist/configs}/_common/commitlint.config.js +0 -0
- /package/{configs → dist/configs}/_common/package.json.template +0 -0
- /package/{configs → dist/configs}/node-lib/eslint.config.js +0 -0
- /package/{configs → dist/configs}/react-app/eslint.config.js +0 -0
- /package/{templates → dist/templates}/node-lib/__tests__/readJson.test.ts +0 -0
- /package/{templates → dist/templates}/node-lib/bin/test.js +0 -0
- /package/{templates → dist/templates}/node-lib/rollup.config.js +0 -0
- /package/{templates → dist/templates}/node-lib/src/index.ts +0 -0
- /package/{templates → dist/templates}/node-lib/src/readJson.ts +0 -0
- /package/{templates → dist/templates}/node-lib/tsconfig.json +0 -0
- /package/{templates → dist/templates}/pack-app/README.md +0 -0
- /package/{templates → dist/templates}/pack-app/eslint.config.js +0 -0
- /package/{templates → dist/templates}/pack-app/fe-config.json +0 -0
- /package/{templates → dist/templates}/pack-app/package.json +0 -0
- /package/{templates → dist/templates}/pack-app/pnpm-workspace.yaml +0 -0
- /package/{templates → dist/templates}/pack-app/tsconfig.json +0 -0
- /package/{templates → dist/templates}/pack-app/tsconfig.test.json +0 -0
- /package/{templates → dist/templates}/pack-app/vite.config.ts +0 -0
- /package/{templates → dist/templates}/react-app/.env.template +0 -0
- /package/{templates → dist/templates}/react-app/config/common.ts +0 -0
- /package/{templates → dist/templates}/react-app/config/feapi.mock.json +0 -0
- /package/{templates → dist/templates}/react-app/config/i18n.ts +0 -0
- /package/{templates → dist/templates}/react-app/index.html +0 -0
- /package/{templates → dist/templates}/react-app/postcss.config.js +0 -0
- /package/{templates → dist/templates}/react-app/public/logo.svg +0 -0
- /package/{templates → dist/templates}/react-app/public/router-root/logo.svg +0 -0
- /package/{templates → dist/templates}/react-app/src/assets/react.svg +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/AiApi.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApi.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApiAdapter.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApiBootstarp.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/feApi/FeApiType.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApi.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApiAdapter.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApiBootstarp.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/apis/userApi/UserApiType.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/cases/AppConfig.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/cases/AppError.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/cases/DialogHandler.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/cases/PublicAssetsPath.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/cases/RequestLogger.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/cases/RequestStatusCatcher.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/port/ApiTransactionInterface.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/port/InteractionHubInterface.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/port/RequestCatcherInterface.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/port/UIDependenciesInterface.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/types/deprecated-antd.d.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/base/types/global.d.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/core/IOC.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/core/bootstraps/BootstrapApp.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/core/bootstraps/PrintBootstrap.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/core/globals.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/core/registers/RegisterApi.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/core/registers/RegisterGlobals.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/core/registers/index.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/main.tsx +0 -0
- /package/{templates → dist/templates}/react-app/src/pages/base/RedirectPathname.tsx +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/_default.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/dark.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/index.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/no-context.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/antd-themes/pink.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/index.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/page.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/tailwind.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/themes/_default.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/themes/dark.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/themes/index.css +0 -0
- /package/{templates → dist/templates}/react-app/src/styles/css/themes/pink.css +0 -0
- /package/{templates/react-app/src/pages/base → dist/templates/react-app/src/uikit}/components/BaseHeader.tsx +0 -0
- /package/{templates → dist/templates}/react-app/src/uikit/components/LanguageSwitcher.tsx +0 -0
- /package/{templates → dist/templates}/react-app/src/uikit/components/Loading.tsx +0 -0
- /package/{templates → dist/templates}/react-app/src/uikit/components/LocaleLink.tsx +0 -0
- /package/{templates → dist/templates}/react-app/src/uikit/components/RouterRenderComponent.tsx +0 -0
- /package/{templates → dist/templates}/react-app/src/uikit/hooks/useDocumentTitle.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/uikit/hooks/useStrictEffect.ts +0 -0
- /package/{templates → dist/templates}/react-app/src/vite-env.d.ts +0 -0
- /package/{templates → dist/templates}/react-app/tailwind.config.js +0 -0
- /package/{templates → dist/templates}/react-app/tsconfig.app.json +0 -0
- /package/{templates → dist/templates}/react-app/tsconfig.json +0 -0
- /package/{templates → dist/templates}/react-app/tsconfig.node.json +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ThemeConfig } from '@qlover/corekit-bridge';
|
|
2
|
+
|
|
3
|
+
export const themeConfig: ThemeConfig = {
|
|
4
|
+
domAttribute: 'data-theme',
|
|
5
|
+
defaultTheme: 'system',
|
|
6
|
+
target: 'html',
|
|
7
|
+
supportedThemes: ['light', 'dark', 'pink'],
|
|
8
|
+
storageKey: 'fe_theme',
|
|
9
|
+
init: true,
|
|
10
|
+
prioritizeStore: true
|
|
11
|
+
};
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@brain-toolkit/antd-theme-override": "^0.0.3",
|
|
57
|
-
"@qlover/corekit-bridge": "^1.
|
|
58
|
-
"@qlover/fe-corekit": "^1.
|
|
57
|
+
"@qlover/corekit-bridge": "^1.1.2",
|
|
58
|
+
"@qlover/fe-corekit": "^1.4.1",
|
|
59
59
|
"@qlover/logger": "^0.1.1",
|
|
60
60
|
"@qlover/slice-store-react": "^1.0.8",
|
|
61
61
|
"@tailwindcss/postcss": "^4.1.8",
|
|
@@ -1,93 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"header.theme.default": "Default Theme",
|
|
3
|
+
"header.theme.dark": "Dark Theme",
|
|
4
|
+
"header.theme.pink": "Pink Theme",
|
|
5
|
+
"auth.logout.dialog.title": "Logout",
|
|
6
|
+
"auth.logout.dialog.content": "Are you sure you want to logout?",
|
|
7
|
+
"page.404.title": "404 Page Not Found",
|
|
8
|
+
"page.404.description": "404 Page Description",
|
|
9
|
+
"page.500.title": "500 Page Error",
|
|
10
|
+
"page.500.description": "500 Page Description",
|
|
3
11
|
"err.local.no.user.token": "Local no user token",
|
|
4
12
|
"err.global.no.window": "Global no window",
|
|
5
13
|
"err.within.page.provider": "Must be used in PageProvider",
|
|
14
|
+
"err.response.no.token": "Response not token value",
|
|
15
|
+
"err.not.found.component": "Not found component",
|
|
6
16
|
"page.about.title": "About",
|
|
7
17
|
"page.about.description": "Learn more about our project and team information",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"about.
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
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",
|
|
18
|
+
"about.message.test": "This is a test message",
|
|
19
|
+
"about.notification.title": "Notification Title",
|
|
20
|
+
"about.notification.description": "This is a test notification",
|
|
21
|
+
"about.button.message": "Show Message",
|
|
22
|
+
"about.button.message2": "Static Message",
|
|
23
|
+
"about.button.notification": "Show Notification",
|
|
24
|
+
"about.button.notification2": "Static Notification",
|
|
25
|
+
"about.tooltip.text": "This is a tooltip text",
|
|
26
|
+
"about.button.tooltip": "Hover to show Tooltip",
|
|
27
|
+
"about.modal.title": "Modal Example",
|
|
28
|
+
"about.modal.content": "This is modal content",
|
|
29
|
+
"about.button.modal": "Show Modal",
|
|
30
|
+
"about.drawer.title": "Drawer Example",
|
|
31
|
+
"about.drawer.content": "This is drawer content",
|
|
32
|
+
"about.button.drawer": "Show Drawer",
|
|
33
|
+
"about.popover.content": "This is a popover card",
|
|
34
|
+
"about.popover.title": "Popover Title",
|
|
35
|
+
"about.button.popover": "Show Popover",
|
|
36
|
+
"about.popconfirm.title": "Confirmation",
|
|
37
|
+
"about.popconfirm.description": "Are you sure you want to perform this action?",
|
|
38
|
+
"about.button.popconfirm": "Show Popconfirm",
|
|
39
|
+
"about.alert.message": "This is a warning alert",
|
|
40
|
+
"about.ok.text": "OK",
|
|
41
|
+
"about.cancel.text": "Cancel",
|
|
56
42
|
"page.executor.title": "Executor Examples",
|
|
57
|
-
"page.error.identifier.title": "Error Identifier",
|
|
58
|
-
"page.error.identifier.description": "Error identifier usage and examples",
|
|
59
|
-
"home.explore": "Explore",
|
|
60
|
-
"home.get_started.title": "Ready to Get Started?",
|
|
61
|
-
"home.get_started.description": "Join us and discover the power of our utilities",
|
|
62
|
-
"home.get_started.button": "Get Started Now",
|
|
63
|
-
"header.theme.default": "Default Theme",
|
|
64
|
-
"header.theme.dark": "Dark Theme",
|
|
65
|
-
"header.theme.pink": "Pink Theme",
|
|
66
|
-
"page.jsonstorage.main_title": "JSONStorage Demo",
|
|
67
|
-
"page.jsonstorage.permanent_title": "Permanent Storage Test",
|
|
68
|
-
"page.jsonstorage.expire_title": "Expire Time Test",
|
|
69
|
-
"page.jsonstorage.timeout_title": "Request Timeout Setting",
|
|
70
|
-
"page.jsonstorage.format_title": "Test key: ${key}, Random value range: ${min}~${max}",
|
|
71
|
-
"page.jsonstorage.set_random": "Set Random Value",
|
|
72
|
-
"page.jsonstorage.current_value": "Current Value",
|
|
73
|
-
"page.jsonstorage.set_expire": "Set Random Value (with expire time)",
|
|
74
|
-
"page.jsonstorage.ms": "ms",
|
|
75
|
-
"page.request.timeout": "Request Timeout",
|
|
76
|
-
"page.request.hello.title": "AI API: Hello",
|
|
77
|
-
"page.request.hello.description": "Functional API using FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger plugins",
|
|
78
|
-
"page.request.hello.button": "Hello",
|
|
79
|
-
"page.request.ip_info.title": "FeApi: IP Information",
|
|
80
|
-
"page.request.ip_info.description": "RequestScheduler class API using FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin plugins, where ApiPickDataPlugin can flatten return types to data field",
|
|
81
|
-
"page.request.random_user.title": "UserApi: Random User",
|
|
82
|
-
"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",
|
|
83
|
-
"page.request.api_catch.title": "UserApi: Api Catch Result",
|
|
84
|
-
"page.request.abort.title": "UserApi: Abort Request",
|
|
85
|
-
"page.request.trigger_abort": "Trigger Abort Request",
|
|
86
|
-
"page.request.stop_abort": "Stop Abort Request",
|
|
87
|
-
"page.request.trigger_api_catch": "Trigger API Catch Result",
|
|
88
|
-
"page.request.stop_api_catch": "Stop API Catch Result",
|
|
89
|
-
"page.executor.main_title": "Executor",
|
|
90
43
|
"page.executor.description": "A powerful task executor supporting multiple task types and state management",
|
|
44
|
+
"page.error_identifier.title": "Error Identifier",
|
|
45
|
+
"page.executor.main_title": "Executor",
|
|
91
46
|
"page.executor.test_plugin.title": "Test Plugin",
|
|
92
47
|
"page.executor.task.status.pending": "Pending",
|
|
93
48
|
"page.executor.task.status.running": "Running",
|
|
@@ -119,35 +74,39 @@
|
|
|
119
74
|
"page.executor.help.description": "Having issues? Check our task execution guide or contact support",
|
|
120
75
|
"page.executor.view_guide": "View Guide",
|
|
121
76
|
"page.executor.contact_support": "Contact Support",
|
|
77
|
+
"page.executor.request.timeout": "Request Timeout",
|
|
78
|
+
"page.home.title": "Home",
|
|
79
|
+
"page.home.description": "A modern frontend utility library collection providing various practical tools and components",
|
|
80
|
+
"home.welcome": "Welcome to the home page",
|
|
81
|
+
"home.description": "A modern frontend utility library collection providing various practical tools and components",
|
|
82
|
+
"page.error.identifier.description": "Error identifier usage and examples",
|
|
83
|
+
"home.explore": "Explore",
|
|
84
|
+
"home.get_started.title": "Ready to Get Started?",
|
|
85
|
+
"home.get_started.description": "Join us and discover the power of our utilities",
|
|
86
|
+
"home.get_started.button": "Get Started Now",
|
|
122
87
|
"page.error.identifier.main_title": "Error Identifier",
|
|
123
|
-
"page.error.identifier.source_description": "Identifier From: '@config/Identifier/
|
|
88
|
+
"page.error.identifier.source_description": "Identifier From: '@config/Identifier/error'",
|
|
124
89
|
"page.error.identifier.help.title": "Need Help?",
|
|
125
90
|
"page.error.identifier.help.description": "If you encounter any issues while using error identifiers, please contact our support team",
|
|
126
91
|
"page.error.identifier.contact_support": "Contact Support",
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"about.popconfirm.title": "Confirmation",
|
|
146
|
-
"about.popconfirm.description": "Are you sure you want to perform this action?",
|
|
147
|
-
"about.button.popconfirm": "Show Popconfirm",
|
|
148
|
-
"about.alert.message": "This is a warning alert",
|
|
149
|
-
"common.ok": "OK",
|
|
150
|
-
"common.cancel": "Cancel",
|
|
92
|
+
"page.jsonstorage.title": "JSONStorage Page",
|
|
93
|
+
"page.jsonstorage.description": "Use JSONStorage for data storage and management",
|
|
94
|
+
"page.jsonstorage.main_title": "JSONStorage Demo",
|
|
95
|
+
"page.jsonstorage.permanent_title": "Permanent Storage Test",
|
|
96
|
+
"page.jsonstorage.expire_title": "Expire Time Test",
|
|
97
|
+
"page.jsonstorage.timeout_title": "Request Timeout Setting",
|
|
98
|
+
"page.jsonstorage.format_title": "Test key: ${key}, Random value range: ${min}~${max}",
|
|
99
|
+
"page.jsonstorage.set_random": "Set Random Value",
|
|
100
|
+
"page.jsonstorage.current_value": "Current Value",
|
|
101
|
+
"page.jsonstorage.set_expire": "Set Random Value (with expire time)",
|
|
102
|
+
"page.jsonstorage.ms": "ms",
|
|
103
|
+
"page.login.title": "Login",
|
|
104
|
+
"page.login.description": "Login Page Description",
|
|
105
|
+
"login.title": "Login",
|
|
106
|
+
"login.email": "Email",
|
|
107
|
+
"login.username": "Username",
|
|
108
|
+
"login.password": "Password",
|
|
109
|
+
"login.login": "Login",
|
|
151
110
|
"login.welcome": "Welcome to the future of learning",
|
|
152
111
|
"login.subtitle": "Unlock personalized AI-powered learning experiences designed to accelerate your knowledge journey.",
|
|
153
112
|
"login.forgot_password": "Forgot your password?",
|
|
@@ -166,6 +125,8 @@
|
|
|
166
125
|
"login.button.title": "Sign in to account",
|
|
167
126
|
"login.with_google.title": "Sign in with Google account",
|
|
168
127
|
"login.create_account.title": "Create new account",
|
|
128
|
+
"page.register.title": "Create Account",
|
|
129
|
+
"page.register.description": "Create Account Page Description",
|
|
169
130
|
"register.title": "Create Account",
|
|
170
131
|
"register.subtitle": "Start your learning journey",
|
|
171
132
|
"register.username": "Username",
|
|
@@ -188,13 +149,33 @@
|
|
|
188
149
|
"register.feature.support": "Expert Support and Guidance",
|
|
189
150
|
"register.feature.community": "Active Learning Community",
|
|
190
151
|
"register.terms_required": "Please agree to the Terms of Service and Privacy Policy",
|
|
191
|
-
"page.
|
|
192
|
-
"page.
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
152
|
+
"page.request.title": "Request Examples",
|
|
153
|
+
"page.request.description": "Demonstrate various request examples and usage",
|
|
154
|
+
"request.requestTimeout": "Request Timeout",
|
|
155
|
+
"request.helloResult": "Hello result is",
|
|
156
|
+
"request.helloError": "Hello error is",
|
|
157
|
+
"request.ipInfoResult": "IpInfo result is",
|
|
158
|
+
"request.ipInfo": "IpInfo",
|
|
159
|
+
"request.randomUser": "RandomUser",
|
|
160
|
+
"request.loading": "Loading...",
|
|
161
|
+
"request.randomUserResult": "RandomUser result is",
|
|
162
|
+
"request.randomUserError": "RandomUser error is",
|
|
163
|
+
"request.triggerAbortRequest": "Trigger Abort Request",
|
|
164
|
+
"request.stopAbortRequest": "Stop Abort Request",
|
|
165
|
+
"request.abortRequestResult": "Abort Request Result",
|
|
166
|
+
"request.abortRequestError": "Abort Request Error",
|
|
167
|
+
"page.request.timeout": "Request Timeout",
|
|
168
|
+
"page.request.hello.title": "AI API: Hello",
|
|
169
|
+
"page.request.hello.description": "Functional API using FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger plugins",
|
|
170
|
+
"page.request.hello.button": "Hello",
|
|
171
|
+
"page.request.ip_info.title": "FeApi: IP Information",
|
|
172
|
+
"page.request.ip_info.description": "RequestScheduler class API using FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin plugins, where ApiPickDataPlugin can flatten return types to data field",
|
|
173
|
+
"page.request.random_user.title": "UserApi: Random User",
|
|
174
|
+
"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",
|
|
175
|
+
"page.request.api_catch.title": "UserApi: Api Catch Result",
|
|
176
|
+
"page.request.abort.title": "UserApi: Abort Request",
|
|
177
|
+
"page.request.trigger_abort": "Trigger Abort Request",
|
|
178
|
+
"page.request.stop_abort": "Stop Abort Request",
|
|
179
|
+
"page.request.trigger_api_catch": "Trigger API Catch Result",
|
|
180
|
+
"page.request.stop_api_catch": "Stop API Catch Result"
|
|
200
181
|
}
|
|
@@ -1,93 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"header.theme.default": "默认主题",
|
|
3
|
+
"header.theme.dark": "暗色主题",
|
|
4
|
+
"header.theme.pink": "粉色主题",
|
|
5
|
+
"auth.logout.dialog.title": "登出",
|
|
6
|
+
"auth.logout.dialog.content": "确定要登出吗?",
|
|
7
|
+
"page.404.title": "404 页面未找到",
|
|
8
|
+
"page.404.description": "404 页面描述",
|
|
9
|
+
"page.500.title": "500 页面错误",
|
|
10
|
+
"page.500.description": "500 页面描述",
|
|
3
11
|
"err.local.no.user.token": "本地未找到 user token",
|
|
4
12
|
"err.global.no.window": "全局未找到 window",
|
|
5
13
|
"err.within.page.provider": "必须在 PageProvider 中使用",
|
|
6
|
-
"
|
|
14
|
+
"err.response.no.token": "响应内容没有 token 值",
|
|
15
|
+
"err.not.found.component": "未找到组件",
|
|
16
|
+
"page.about.title": "关于我们",
|
|
7
17
|
"page.about.description": "了解更多关于我们的项目和团队信息",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"about.
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
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": "展示各种请求示例和用法",
|
|
18
|
+
"about.message.test": "这是一条测试消息",
|
|
19
|
+
"about.notification.title": "通知标题",
|
|
20
|
+
"about.notification.description": "这是一条测试通知",
|
|
21
|
+
"about.button.message": "显示 Message",
|
|
22
|
+
"about.button.message2": "静态消息",
|
|
23
|
+
"about.button.notification": "显示 Notification",
|
|
24
|
+
"about.button.notification2": "静态通知",
|
|
25
|
+
"about.tooltip.text": "这是一个提示文本",
|
|
26
|
+
"about.button.tooltip": "悬停显示 Tooltip",
|
|
27
|
+
"about.modal.title": "模态框示例",
|
|
28
|
+
"about.modal.content": "这是一个模态框的内容",
|
|
29
|
+
"about.button.modal": "显示 Modal",
|
|
30
|
+
"about.drawer.title": "抽屉示例",
|
|
31
|
+
"about.drawer.content": "这是一个抽屉的内容",
|
|
32
|
+
"about.button.drawer": "显示 Drawer",
|
|
33
|
+
"about.popover.content": "这是一个气泡卡片",
|
|
34
|
+
"about.popover.title": "Popover 标题",
|
|
35
|
+
"about.button.popover": "显示 Popover",
|
|
36
|
+
"about.popconfirm.title": "确认提示",
|
|
37
|
+
"about.popconfirm.description": "您确定要执行此操作吗?",
|
|
38
|
+
"about.button.popconfirm": "显示 Popconfirm",
|
|
39
|
+
"about.alert.message": "这是一个警告提示",
|
|
40
|
+
"about.ok.text": "确定",
|
|
41
|
+
"about.cancel.text": "取消",
|
|
56
42
|
"page.executor.title": "执行器示例",
|
|
57
|
-
"page.error.identifier.title": "错误标识符",
|
|
58
|
-
"page.error.identifier.description": "错误标识符的使用和示例",
|
|
59
|
-
"home.explore": "探索",
|
|
60
|
-
"home.get_started.title": "准备开始使用?",
|
|
61
|
-
"home.get_started.description": "加入我们,探索实用工具的力量",
|
|
62
|
-
"home.get_started.button": "立即开始",
|
|
63
|
-
"header.theme.default": "默认主题",
|
|
64
|
-
"header.theme.dark": "暗色主题",
|
|
65
|
-
"header.theme.pink": "粉色主题",
|
|
66
|
-
"page.jsonstorage.main_title": "JSONStorage 演示",
|
|
67
|
-
"page.jsonstorage.permanent_title": "永久存储测试",
|
|
68
|
-
"page.jsonstorage.expire_title": "过期时间测试",
|
|
69
|
-
"page.jsonstorage.timeout_title": "请求超时时间设置",
|
|
70
|
-
"page.jsonstorage.format_title": "测试 key: ${key}, 随机值范围: ${min}~${max}",
|
|
71
|
-
"page.jsonstorage.set_random": "设置随机值",
|
|
72
|
-
"page.jsonstorage.current_value": "当前值",
|
|
73
|
-
"page.jsonstorage.set_expire": "设置随机值(带过期时间)",
|
|
74
|
-
"page.jsonstorage.ms": "毫秒",
|
|
75
|
-
"page.request.timeout": "请求超时时间",
|
|
76
|
-
"page.request.hello.title": "AI API: Hello",
|
|
77
|
-
"page.request.hello.description": "函数式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger 插件",
|
|
78
|
-
"page.request.hello.button": "Hello",
|
|
79
|
-
"page.request.ip_info.title": "FeApi: IP Information",
|
|
80
|
-
"page.request.ip_info.description": "RequestScheduler 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin 插件, 其中 ApiPickDataPlugin 插件可以将返回类型统一扁平到 data 字段",
|
|
81
|
-
"page.request.random_user.title": "UserApi: Random User",
|
|
82
|
-
"page.request.random_user.description": "RequestTransaction 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin 插件, 其中 FetchAbortPlugin 可以中止请求, ApiCatchPlugin 可以将捕获的错误统一到 apiCatchResult 字段",
|
|
83
|
-
"page.request.api_catch.title": "UserApi: Api Catch Result",
|
|
84
|
-
"page.request.abort.title": "UserApi: Abort Request",
|
|
85
|
-
"page.request.trigger_abort": "触发中止请求",
|
|
86
|
-
"page.request.stop_abort": "停止中止请求",
|
|
87
|
-
"page.request.trigger_api_catch": "触发 API 捕获结果",
|
|
88
|
-
"page.request.stop_api_catch": "停止 API 捕获结果",
|
|
89
|
-
"page.executor.main_title": "执行器",
|
|
90
43
|
"page.executor.description": "一个强大的任务执行器,支持多种任务类型和状态管理",
|
|
44
|
+
"page.error_identifier.title": "错误标识符",
|
|
45
|
+
"page.executor.main_title": "执行器",
|
|
91
46
|
"page.executor.test_plugin.title": "测试插件",
|
|
92
47
|
"page.executor.task.status.pending": "等待中",
|
|
93
48
|
"page.executor.task.status.running": "运行中",
|
|
@@ -119,35 +74,39 @@
|
|
|
119
74
|
"page.executor.help.description": "遇到问题?查看我们的任务执行指南或联系支持团队",
|
|
120
75
|
"page.executor.view_guide": "查看指南",
|
|
121
76
|
"page.executor.contact_support": "联系支持",
|
|
77
|
+
"page.executor.request.timeout": "请求超时时间",
|
|
78
|
+
"page.home.title": "首页",
|
|
79
|
+
"page.home.description": "一个现代前端实用库集合,提供各种实用工具和组件",
|
|
80
|
+
"home.welcome": "欢迎来到主页",
|
|
81
|
+
"home.description": "一个现代前端实用库集合,提供各种实用工具和组件",
|
|
82
|
+
"page.error.identifier.description": "错误标识符的使用和示例",
|
|
83
|
+
"home.explore": "探索",
|
|
84
|
+
"home.get_started.title": "准备开始使用?",
|
|
85
|
+
"home.get_started.description": "加入我们,探索实用工具的力量",
|
|
86
|
+
"home.get_started.button": "立即开始",
|
|
122
87
|
"page.error.identifier.main_title": "错误标识符",
|
|
123
|
-
"page.error.identifier.source_description": "来自 '@config/Identifier/
|
|
88
|
+
"page.error.identifier.source_description": "来自 '@config/Identifier/error' 的标识符",
|
|
124
89
|
"page.error.identifier.help.title": "需要帮助?",
|
|
125
90
|
"page.error.identifier.help.description": "如果您在使用错误标识符时遇到问题,请联系我们的支持团队",
|
|
126
91
|
"page.error.identifier.contact_support": "联系支持",
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"about.popconfirm.title": "确认提示",
|
|
146
|
-
"about.popconfirm.description": "您确定要执行此操作吗?",
|
|
147
|
-
"about.button.popconfirm": "显示 Popconfirm",
|
|
148
|
-
"about.alert.message": "这是一个警告提示",
|
|
149
|
-
"common.ok": "确定",
|
|
150
|
-
"common.cancel": "取消",
|
|
92
|
+
"page.jsonstorage.title": "JSONStorage 页面",
|
|
93
|
+
"page.jsonstorage.description": "使用 JSONStorage 进行数据存储和管理",
|
|
94
|
+
"page.jsonstorage.main_title": "JSONStorage 演示",
|
|
95
|
+
"page.jsonstorage.permanent_title": "永久存储测试",
|
|
96
|
+
"page.jsonstorage.expire_title": "过期时间测试",
|
|
97
|
+
"page.jsonstorage.timeout_title": "请求超时时间设置",
|
|
98
|
+
"page.jsonstorage.format_title": "测试 key: ${key}, 随机值范围: ${min}~${max}",
|
|
99
|
+
"page.jsonstorage.set_random": "设置随机值",
|
|
100
|
+
"page.jsonstorage.current_value": "当前值",
|
|
101
|
+
"page.jsonstorage.set_expire": "设置随机值(带过期时间)",
|
|
102
|
+
"page.jsonstorage.ms": "毫秒",
|
|
103
|
+
"page.login.title": "登录",
|
|
104
|
+
"page.login.description": "登录页面描述",
|
|
105
|
+
"login.title": "登录",
|
|
106
|
+
"login.email": "邮箱",
|
|
107
|
+
"login.username": "用户名",
|
|
108
|
+
"login.password": "密码",
|
|
109
|
+
"login.login": "登录",
|
|
151
110
|
"login.welcome": "欢迎来到未来学习",
|
|
152
111
|
"login.subtitle": "解锁个性化 AI 驱动的学习体验,加速您的知识旅程。",
|
|
153
112
|
"login.forgot_password": "忘记密码?",
|
|
@@ -166,6 +125,8 @@
|
|
|
166
125
|
"login.button.title": "登录账号",
|
|
167
126
|
"login.with_google.title": "使用Google账号登录",
|
|
168
127
|
"login.create_account.title": "创建新账号",
|
|
128
|
+
"page.register.title": "创建账号",
|
|
129
|
+
"page.register.description": "创建账号页面描述",
|
|
169
130
|
"register.title": "创建账号",
|
|
170
131
|
"register.subtitle": "开始您的学习之旅",
|
|
171
132
|
"register.username": "用户名",
|
|
@@ -188,13 +149,33 @@
|
|
|
188
149
|
"register.feature.support": "专家支持和指导",
|
|
189
150
|
"register.feature.community": "活跃的学习社区",
|
|
190
151
|
"register.terms_required": "请同意服务条款和隐私政策",
|
|
191
|
-
"page.
|
|
192
|
-
"page.
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
152
|
+
"page.request.title": "请求示例",
|
|
153
|
+
"page.request.description": "展示各种请求示例和用法",
|
|
154
|
+
"request.requestTimeout": "请求超时",
|
|
155
|
+
"request.helloResult": "Hello 结果是",
|
|
156
|
+
"request.helloError": "Hello 错误是",
|
|
157
|
+
"request.ipInfoResult": "IpInfo 结果是",
|
|
158
|
+
"request.ipInfo": "IpInfo",
|
|
159
|
+
"request.randomUser": "随机用户",
|
|
160
|
+
"request.loading": "加载中...",
|
|
161
|
+
"request.randomUserResult": "随机用户 结果是",
|
|
162
|
+
"request.randomUserError": "随机用户 错误是",
|
|
163
|
+
"request.triggerAbortRequest": "触发中止请求",
|
|
164
|
+
"request.stopAbortRequest": "停止中止请求",
|
|
165
|
+
"request.abortRequestResult": "中止请求 结果是",
|
|
166
|
+
"request.abortRequestError": "中止请求 错误是",
|
|
167
|
+
"page.request.timeout": "请求超时时间",
|
|
168
|
+
"page.request.hello.title": "AI API: Hello",
|
|
169
|
+
"page.request.hello.description": "函数式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, RequestLogger 插件",
|
|
170
|
+
"page.request.hello.button": "Hello",
|
|
171
|
+
"page.request.ip_info.title": "FeApi: IP Information",
|
|
172
|
+
"page.request.ip_info.description": "RequestScheduler 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, RequestLogger, ApiPickDataPlugin 插件, 其中 ApiPickDataPlugin 插件可以将返回类型统一扁平到 data 字段",
|
|
173
|
+
"page.request.random_user.title": "UserApi: Random User",
|
|
174
|
+
"page.request.random_user.description": "RequestTransaction 类式 api, 使用了 FetchURLPlugin, RequestCommonPlugin, ApiMockPlugin, FetchAbortPlugin, RequestLogger, ApiCatchPlugin 插件, 其中 FetchAbortPlugin 可以中止请求, ApiCatchPlugin 可以将捕获的错误统一到 apiCatchResult 字段",
|
|
175
|
+
"page.request.api_catch.title": "UserApi: Api Catch Result",
|
|
176
|
+
"page.request.abort.title": "UserApi: Abort Request",
|
|
177
|
+
"page.request.trigger_abort": "触发中止请求",
|
|
178
|
+
"page.request.stop_abort": "停止中止请求",
|
|
179
|
+
"page.request.trigger_api_catch": "触发 API 捕获结果",
|
|
180
|
+
"page.request.stop_api_catch": "停止 API 捕获结果"
|
|
200
181
|
}
|
|
@@ -7,6 +7,7 @@ import { RouteService } from './base/services/RouteService';
|
|
|
7
7
|
import { RouterLoader, type ComponentValue } from '@/base/cases/RouterLoader';
|
|
8
8
|
import { AntdThemeProvider } from '@brain-toolkit/antd-theme-override/react';
|
|
9
9
|
import { routerPrefix } from '@config/common';
|
|
10
|
+
import { useStore } from './uikit/hooks/useStore';
|
|
10
11
|
|
|
11
12
|
function getAllPages() {
|
|
12
13
|
const modules = import.meta.glob('./pages/**/*.tsx');
|
|
@@ -28,15 +29,15 @@ const routerLoader = new RouterLoader({
|
|
|
28
29
|
});
|
|
29
30
|
|
|
30
31
|
function App() {
|
|
32
|
+
const routes = useStore(IOC(RouteService), (state) => state.routes);
|
|
33
|
+
|
|
31
34
|
const routerBase = useMemo(() => {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
.map((route) => routerLoader.toRoute(route));
|
|
35
|
-
const router = createBrowserRouter(routes, {
|
|
35
|
+
const routeList = routes.map((route) => routerLoader.toRoute(route));
|
|
36
|
+
const router = createBrowserRouter(routeList, {
|
|
36
37
|
basename: routerPrefix
|
|
37
38
|
});
|
|
38
39
|
return router;
|
|
39
|
-
}, []);
|
|
40
|
+
}, [routes]);
|
|
40
41
|
|
|
41
42
|
return (
|
|
42
43
|
<AntdThemeProvider
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ExecutorContext, ExecutorPlugin } from '@qlover/fe-corekit';
|
|
2
|
+
import type { LoggerInterface } from '@qlover/logger';
|
|
3
|
+
import { inject } from 'inversify';
|
|
4
|
+
import { I18nService } from '../services/I18nService';
|
|
5
|
+
import { IOCIdentifier } from '@/core/IOC';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* When throw error, it will be converted to i18n key
|
|
9
|
+
*
|
|
10
|
+
* If the error thrown is an i18n key, it will be converted to the corresponding text
|
|
11
|
+
*/
|
|
12
|
+
export class I18nKeyErrorPlugin implements ExecutorPlugin {
|
|
13
|
+
readonly pluginName = 'I18nKeyErrorPlugin';
|
|
14
|
+
|
|
15
|
+
constructor(
|
|
16
|
+
@inject(IOCIdentifier.Logger) private logger: LoggerInterface,
|
|
17
|
+
@inject(I18nService) private i18nService: I18nService
|
|
18
|
+
) {}
|
|
19
|
+
|
|
20
|
+
onError(context: ExecutorContext<unknown>): Error | void {
|
|
21
|
+
const { error } = context;
|
|
22
|
+
|
|
23
|
+
if (error instanceof Error) {
|
|
24
|
+
const i18nKey = error.message;
|
|
25
|
+
|
|
26
|
+
if (i18nKey && typeof i18nKey === 'string') {
|
|
27
|
+
const i18nText = this.i18nService.t(i18nKey);
|
|
28
|
+
|
|
29
|
+
if (i18nText && i18nText !== i18nKey) {
|
|
30
|
+
this.logger.debug('I18nKeyErrorPlugin Error:', i18nText);
|
|
31
|
+
return new Error(i18nText);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentType, LazyExoticComponent, ReactNode } from 'react';
|
|
2
2
|
import { RouteObject } from 'react-router-dom';
|
|
3
3
|
import isString from 'lodash/isString';
|
|
4
|
+
import { RouteMeta } from '../types/Page';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Component mapping type for lazy-loaded components
|
|
@@ -38,7 +39,7 @@ export type RouteConfigValue = Omit<RouteObject, 'element' | 'children'> & {
|
|
|
38
39
|
* Additional metadata for the route
|
|
39
40
|
* @description Can store any route-specific data like permissions, titles, etc.
|
|
40
41
|
*/
|
|
41
|
-
meta?:
|
|
42
|
+
meta?: RouteMeta;
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
/**
|