@oj-module/cli 0.2.63 → 0.2.66
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/devkit/README.md +9 -3
- package/devkit/SKILL.md +5 -2
- package/devkit/framework-dev.md +12 -7
- package/devkit/manual.md +123 -56
- package/devkit/menu-rules.md +4 -1
- package/package.json +3 -2
- package/shell-dist/assets/ahooks.2l850ymmh0.js +18 -0
- package/shell-dist/assets/antd-es-locale-zh_CN.1gjjsvxbf0.js +1 -0
- package/shell-dist/assets/antd-img-crop.196rkty480.js +99 -0
- package/shell-dist/assets/antd-locale-en_US.561tozx860.js +1 -0
- package/shell-dist/assets/antd-locale-zh_CN.1cmpmgzh70.js +1 -0
- package/shell-dist/assets/antd.uw1coq15l0.js +348 -0
- package/shell-dist/assets/clsx.jotilrt2e0.js +1 -0
- package/shell-dist/assets/contract-errors.2o17vz9u50.js +1 -0
- package/shell-dist/assets/contract.3h327o3mj0.js +57 -0
- package/shell-dist/assets/cssinjs.atgmhan7m0.js +3 -0
- package/shell-dist/assets/dayjs-plugin-advancedFormat.3vsyd2eis0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-customParseFormat.13xhghv1d0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-isoWeek.1fn1tw82p0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-localeData.2rwbjp9nk0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.2oqo1lcx80.js +1 -0
- package/shell-dist/assets/dayjs-plugin-relativeTime.2pqs3et4y0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekOfYear.gvn9iph080.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekYear.2u78l3ex10.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekday.2d56a4tml0.js +1 -0
- package/shell-dist/assets/dayjs.pa60l6wjo0.js +1 -0
- package/shell-dist/assets/dnd-kit-core.1xyreig6r0.js +5 -0
- package/shell-dist/assets/dnd-kit-sortable.s94qciuft0.js +1 -0
- package/shell-dist/assets/dnd-kit-utilities.1umw4xphb0.js +1 -0
- package/shell-dist/assets/i18next.33zqofapj0.js +1 -0
- package/shell-dist/assets/icons-es-components-Context.365qmflwg0.js +1 -0
- package/shell-dist/assets/icons.159wjwals0.js +57 -0
- package/shell-dist/assets/{index-BKtXxIXz.js → index.i0kqbxp050.js} +11 -6
- package/shell-dist/assets/jsx-dev-runtime.3uibuc82f0.js +14 -0
- package/shell-dist/assets/jsx-runtime.h40xu4o5b0.js +14 -0
- package/shell-dist/assets/keepalive-for-react.xenu5vam70.js +1 -0
- package/shell-dist/assets/kit.37kr8ui390.js +1 -0
- package/shell-dist/assets/ky.1cgch7gu60.js +6 -0
- package/shell-dist/assets/motion-react.pjsxytvjs0.js +12 -0
- package/shell-dist/assets/motion.21tciqutg0.js +4 -0
- package/shell-dist/assets/nprogress.2nz76n9ny0.js +7 -0
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.3vr3beiyp0.js +9 -0
- package/shell-dist/assets/pinyin-pro.3v0mnxczn0.js +1 -0
- package/shell-dist/assets/pro-components.2kyot1vcl0.js +83 -0
- package/shell-dist/assets/react-countup.2x8idnr8y0.js +10 -0
- package/shell-dist/assets/react-dom-client.ick0v05ob0.js +43 -0
- package/shell-dist/assets/react-dom.2so9uxg3f0.js +22 -0
- package/shell-dist/assets/react-error-boundary.2dncdfj3b0.js +1 -0
- package/shell-dist/assets/react-i18next.auhvjhqv00.js +1 -0
- package/shell-dist/assets/react-jss.1ei6dr9e00.js +29 -0
- package/shell-dist/assets/react-query.3rln45ow00.js +1 -0
- package/shell-dist/assets/react-router-dom.3c6zld8h40.js +44 -0
- package/shell-dist/assets/react-router.2h9rebcv50.js +56 -0
- package/shell-dist/assets/react.1ew63mwts0.js +14 -0
- package/shell-dist/assets/runtime.1xfsxcajj0.js +21702 -0
- package/shell-dist/assets/simplebar-react.2g739uvai0.js +1 -0
- package/shell-dist/assets/spin-delay.yjeyj6iwp0.js +9 -0
- package/shell-dist/assets/tailwind-merge.125ehiqjw0.js +1 -0
- package/shell-dist/assets/use-sync-external-store-shim.1nz1pi9bb0.js +22 -0
- package/shell-dist/assets/zustand-middleware.1xaxjueme0.js +6 -0
- package/shell-dist/assets/zustand-react-shallow.pybayv1hx0.js +1 -0
- package/shell-dist/assets/zustand-react.9fsl9brxy0.js +1 -0
- package/shell-dist/assets/zustand-shallow.6cz0yyv9x0.js +1 -0
- package/shell-dist/assets/zustand-vanilla-shallow.3424monv50.js +1 -0
- package/shell-dist/assets/zustand-vanilla.1mo3ka3g30.js +1 -0
- package/shell-dist/assets/zustand.3gjgzlnqo0.js +1 -0
- package/shell-dist/index.html +67 -118
- package/shell-dist/versions.json +3 -3
- package/src/build/module-def.ts +1 -0
- package/src/esm-exports.ts +152 -70
- package/src/market/__tests__/bootstrap.test.ts +36 -1
- package/src/shared-deps.ts +69 -19
- package/src/site-base.ts +4 -0
- package/templates/src/app/web/home/pages/components/bar-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/echarts-setup.ts +30 -0
- package/templates/src/app/web/home/pages/components/line-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/pie-chart.tsx +6 -3
- package/templates/src/app/web/home/pages/index.tsx +3 -2
- package/templates/src/app/web/home/routes.ts +3 -2
- package/templates/src/app/web/personal-center/locales/en-US.json +15 -0
- package/templates/src/app/web/personal-center/locales/zh-CN.json +15 -0
- package/templates/src/app/web/personal-center/pages/my-profile/index.tsx +15 -13
- package/templates/src/app/web/system/locales/en-US.json +24 -3
- package/templates/src/app/web/system/locales/zh-CN.json +24 -3
- package/templates/src/app/web/system/pages/roles/index.tsx +13 -6
- package/templates/src/app/web/system/pages/settings/index.tsx +1 -1
- package/templates/src/app/web/system/pages/users/index.tsx +3 -3
- package/templates/src/app/web/system/pages/users/roles.tsx +1 -1
- package/templates/src/oj-market/web/locales/en-US.json +14 -1
- package/templates/src/oj-market/web/locales/zh-CN.json +14 -1
- package/vendor/host-versions.json +3 -3
- package/shell-dist/assets/ahooks.js +0 -6909
- package/shell-dist/assets/antd-es-locale-zh_CN.js +0 -257
- package/shell-dist/assets/antd-img-crop.js +0 -1495
- package/shell-dist/assets/antd-locale-en_US.js +0 -374
- package/shell-dist/assets/antd-locale-zh_CN.js +0 -379
- package/shell-dist/assets/antd.js +0 -106874
- package/shell-dist/assets/clsx.js +0 -33
- package/shell-dist/assets/contract-errors.js +0 -30
- package/shell-dist/assets/contract.js +0 -18900
- package/shell-dist/assets/cssinjs.js +0 -2595
- package/shell-dist/assets/dayjs-plugin-advancedFormat.js +0 -98
- package/shell-dist/assets/dayjs-plugin-customParseFormat.js +0 -173
- package/shell-dist/assets/dayjs-plugin-isoWeek.js +0 -77
- package/shell-dist/assets/dayjs-plugin-localeData.js +0 -126
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.js +0 -77
- package/shell-dist/assets/dayjs-plugin-relativeTime.js +0 -92
- package/shell-dist/assets/dayjs-plugin-weekOfYear.js +0 -73
- package/shell-dist/assets/dayjs-plugin-weekYear.js +0 -63
- package/shell-dist/assets/dayjs-plugin-weekday.js +0 -63
- package/shell-dist/assets/dayjs.js +0 -326
- package/shell-dist/assets/dnd-kit-core.js +0 -3601
- package/shell-dist/assets/dnd-kit-sortable.js +0 -717
- package/shell-dist/assets/dnd-kit-utilities.js +0 -340
- package/shell-dist/assets/i18next.js +0 -2321
- package/shell-dist/assets/icons-es-components-Context.js +0 -20
- package/shell-dist/assets/icons.js +0 -34961
- package/shell-dist/assets/jsx-dev-runtime.js +0 -75
- package/shell-dist/assets/jsx-runtime.js +0 -97
- package/shell-dist/assets/keepalive-for-react.js +0 -283
- package/shell-dist/assets/kit.js +0 -151
- package/shell-dist/assets/ky.js +0 -1427
- package/shell-dist/assets/motion-react.js +0 -13589
- package/shell-dist/assets/motion.js +0 -9959
- package/shell-dist/assets/nprogress.js +0 -314
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-BarsOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CalendarOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretUpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ClockCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CopyOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DeleteOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EditOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EllipsisOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EnterOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ExclamationCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeInvisibleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileTextOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FilterFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOpenOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-HolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-InfoCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LoadingOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PaperClipOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PictureOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-QuestionCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ReloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SearchOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-StarFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-UpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-VerticalAlignTopOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-WarningFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomInOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomOutOutlined.js +0 -7
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.js +0 -81
- package/shell-dist/assets/pinyin-pro.js +0 -25175
- package/shell-dist/assets/pro-components.js +0 -44627
- package/shell-dist/assets/react-countup.js +0 -525
- package/shell-dist/assets/react-dom-client.js +0 -12134
- package/shell-dist/assets/react-dom.js +0 -266
- package/shell-dist/assets/react-error-boundary.js +0 -141
- package/shell-dist/assets/react-i18next.js +0 -1773
- package/shell-dist/assets/react-jss.js +0 -4089
- package/shell-dist/assets/react-query.js +0 -3072
- package/shell-dist/assets/react-router-dom.js +0 -9927
- package/shell-dist/assets/react-router.js +0 -14584
- package/shell-dist/assets/react.js +0 -590
- package/shell-dist/assets/runtime.js +0 -28294
- package/shell-dist/assets/simplebar-react.js +0 -1119
- package/shell-dist/assets/spin-delay.js +0 -111
- package/shell-dist/assets/tailwind-merge.js +0 -3364
- package/shell-dist/assets/use-sync-external-store-shim.js +0 -130
- package/shell-dist/assets/zustand-middleware.js +0 -513
- package/shell-dist/assets/zustand-react-shallow.js +0 -27
- package/shell-dist/assets/zustand-react.js +0 -39
- package/shell-dist/assets/zustand-shallow.js +0 -22
- package/shell-dist/assets/zustand-vanilla-shallow.js +0 -71
- package/shell-dist/assets/zustand-vanilla.js +0 -40
- package/shell-dist/assets/zustand.js +0 -32
- /package/shell-dist/assets/{nprogress-css.js → nprogress-css.1cq2pzkre0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-button.js → ojm-antd-es-button.2uriphio50.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-modal.js → ojm-antd-es-modal.bf3tgdh8v0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-slider.js → ojm-antd-es-slider.xyvptuhid0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-upload.js → ojm-antd-es-upload.13gx45e0g0.js} +0 -0
|
@@ -2,5 +2,20 @@
|
|
|
2
2
|
"menu": {
|
|
3
3
|
"personalCenter": "个人中心",
|
|
4
4
|
"profile": "我的资料"
|
|
5
|
+
},
|
|
6
|
+
"profile": {
|
|
7
|
+
"title": "我的资料",
|
|
8
|
+
"avatar": "头像",
|
|
9
|
+
"avatarRequired": "请上传头像!",
|
|
10
|
+
"username": "用户名",
|
|
11
|
+
"usernameRequired": "请输入您的用户名!",
|
|
12
|
+
"email": "邮箱",
|
|
13
|
+
"emailRequired": "请输入您的邮箱!",
|
|
14
|
+
"phoneNumber": "联系电话",
|
|
15
|
+
"phoneNumberRequired": "请输入您的联系电话!",
|
|
16
|
+
"description": "个人简介",
|
|
17
|
+
"descriptionPlaceholder": "个人简介",
|
|
18
|
+
"updated": "更新基本信息成功",
|
|
19
|
+
"updateFailed": "更新基本信息失败:{{message}}"
|
|
5
20
|
}
|
|
6
21
|
}
|
|
@@ -6,10 +6,12 @@ import {
|
|
|
6
6
|
} from "@ant-design/pro-components";
|
|
7
7
|
import { BasicContent, FormAvatarItem, useUserStore } from "@oj-module/runtime";
|
|
8
8
|
import { App, Form, Input } from "antd";
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
9
10
|
|
|
10
11
|
import { personalCenterProfilePost } from "../../__client";
|
|
11
12
|
|
|
12
13
|
export default function Profile() {
|
|
14
|
+
const { t } = useTranslation();
|
|
13
15
|
const currentUser = useUserStore();
|
|
14
16
|
const { message } = App.useApp();
|
|
15
17
|
const getAvatarURL = () => {
|
|
@@ -39,16 +41,16 @@ export default function Profile() {
|
|
|
39
41
|
description: values.description,
|
|
40
42
|
});
|
|
41
43
|
await useUserStore.getState().getUserInfo();
|
|
42
|
-
message.success("
|
|
44
|
+
message.success(t("personal-center:profile.updated"));
|
|
43
45
|
}
|
|
44
46
|
catch (e) {
|
|
45
|
-
message.error(
|
|
47
|
+
message.error(t("personal-center:profile.updateFailed", { message: e instanceof Error ? e.message : String(e) }));
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
return (
|
|
50
52
|
<BasicContent className="max-w-md ml-10">
|
|
51
|
-
<h3
|
|
53
|
+
<h3>{t("personal-center:profile.title")}</h3>
|
|
52
54
|
<ProForm
|
|
53
55
|
layout="vertical"
|
|
54
56
|
onFinish={handleFinish}
|
|
@@ -60,11 +62,11 @@ export default function Profile() {
|
|
|
60
62
|
>
|
|
61
63
|
<Form.Item
|
|
62
64
|
name="avatar"
|
|
63
|
-
label="
|
|
65
|
+
label={t("personal-center:profile.avatar")}
|
|
64
66
|
rules={[
|
|
65
67
|
{
|
|
66
68
|
required: true,
|
|
67
|
-
message: "
|
|
69
|
+
message: t("personal-center:profile.avatarRequired"),
|
|
68
70
|
},
|
|
69
71
|
]}
|
|
70
72
|
>
|
|
@@ -72,31 +74,31 @@ export default function Profile() {
|
|
|
72
74
|
</Form.Item>
|
|
73
75
|
<ProFormText
|
|
74
76
|
name="username"
|
|
75
|
-
label="
|
|
77
|
+
label={t("personal-center:profile.username")}
|
|
76
78
|
rules={[
|
|
77
79
|
{
|
|
78
80
|
required: true,
|
|
79
|
-
message: "
|
|
81
|
+
message: t("personal-center:profile.usernameRequired"),
|
|
80
82
|
},
|
|
81
83
|
]}
|
|
82
84
|
/>
|
|
83
85
|
<ProFormText
|
|
84
86
|
name="email"
|
|
85
|
-
label="
|
|
87
|
+
label={t("personal-center:profile.email")}
|
|
86
88
|
rules={[
|
|
87
89
|
{
|
|
88
90
|
required: true,
|
|
89
|
-
message: "
|
|
91
|
+
message: t("personal-center:profile.emailRequired"),
|
|
90
92
|
},
|
|
91
93
|
]}
|
|
92
94
|
/>
|
|
93
95
|
<ProFormDigit
|
|
94
96
|
name="phoneNumber"
|
|
95
|
-
label="
|
|
97
|
+
label={t("personal-center:profile.phoneNumber")}
|
|
96
98
|
rules={[
|
|
97
99
|
{
|
|
98
100
|
required: true,
|
|
99
|
-
message: "
|
|
101
|
+
message: t("personal-center:profile.phoneNumberRequired"),
|
|
100
102
|
},
|
|
101
103
|
]}
|
|
102
104
|
>
|
|
@@ -105,8 +107,8 @@ export default function Profile() {
|
|
|
105
107
|
<ProFormTextArea
|
|
106
108
|
allowClear
|
|
107
109
|
name="description"
|
|
108
|
-
label="
|
|
109
|
-
placeholder="
|
|
110
|
+
label={t("personal-center:profile.description")}
|
|
111
|
+
placeholder={t("personal-center:profile.descriptionPlaceholder")}
|
|
110
112
|
/>
|
|
111
113
|
</ProForm>
|
|
112
114
|
</BasicContent>
|
|
@@ -40,12 +40,15 @@
|
|
|
40
40
|
"departments": "Departments"
|
|
41
41
|
},
|
|
42
42
|
"mainDept": "Main dept",
|
|
43
|
-
"filterDept": "Filter by department (incl. sub-depts)"
|
|
43
|
+
"filterDept": "Filter by department (incl. sub-depts)",
|
|
44
|
+
"password": "Password",
|
|
45
|
+
"usernameHint": "ldap:/ sso:/ wecom: prefixes are reserved for external identity sources"
|
|
44
46
|
},
|
|
45
47
|
"userRoles": {
|
|
46
48
|
"title": "Membership",
|
|
47
49
|
"saved": "Roles updated",
|
|
48
|
-
"none": "(no roles)"
|
|
50
|
+
"none": "(no roles)",
|
|
51
|
+
"deprecated": " (deprecated)"
|
|
49
52
|
},
|
|
50
53
|
"rolesPage": {
|
|
51
54
|
"tabRoles": "Roles",
|
|
@@ -55,7 +58,18 @@
|
|
|
55
58
|
"holders": "Holders",
|
|
56
59
|
"permissions": "Bound Permissions",
|
|
57
60
|
"titleKey": "Title Key",
|
|
58
|
-
"readonlyHint": "Read-only view: roles and bindings are managed by solution tooling (upsertSolutionPerms)"
|
|
61
|
+
"readonlyHint": "Read-only view: roles and bindings are managed by solution tooling (upsertSolutionPerms)",
|
|
62
|
+
"columns": {
|
|
63
|
+
"module": "Module",
|
|
64
|
+
"title": "Title",
|
|
65
|
+
"code": "Code"
|
|
66
|
+
},
|
|
67
|
+
"roleTitle": {
|
|
68
|
+
"superadmin": "Super Admin",
|
|
69
|
+
"admin": "Administrator",
|
|
70
|
+
"editor": "Editor",
|
|
71
|
+
"viewer": "Viewer"
|
|
72
|
+
}
|
|
59
73
|
},
|
|
60
74
|
"departments": {
|
|
61
75
|
"create": "New Department",
|
|
@@ -256,7 +270,14 @@
|
|
|
256
270
|
}
|
|
257
271
|
},
|
|
258
272
|
"setting": {
|
|
273
|
+
"group": {
|
|
274
|
+
"general": "General",
|
|
275
|
+
"security": "Security",
|
|
276
|
+
"login": "Login Methods",
|
|
277
|
+
"ldap": "LDAP"
|
|
278
|
+
},
|
|
259
279
|
"site_title": "Site Title",
|
|
280
|
+
"market_cdn_url": "Market CDN URL",
|
|
260
281
|
"ldap_enabled": "Enable LDAP login",
|
|
261
282
|
"sso_enabled": "Enable SSO login",
|
|
262
283
|
"wecom_enabled": "Enable WeCom login",
|
|
@@ -40,12 +40,15 @@
|
|
|
40
40
|
"departments": "所属部门"
|
|
41
41
|
},
|
|
42
42
|
"mainDept": "主部门",
|
|
43
|
-
"filterDept": "按部门筛选(含子部门)"
|
|
43
|
+
"filterDept": "按部门筛选(含子部门)",
|
|
44
|
+
"password": "口令",
|
|
45
|
+
"usernameHint": "ldap:/ sso:/ wecom: 为外部身份源保留"
|
|
44
46
|
},
|
|
45
47
|
"userRoles": {
|
|
46
48
|
"title": "成员资格",
|
|
47
49
|
"saved": "角色已更新",
|
|
48
|
-
"none": "(无角色)"
|
|
50
|
+
"none": "(无角色)",
|
|
51
|
+
"deprecated": "(已废弃)"
|
|
49
52
|
},
|
|
50
53
|
"rolesPage": {
|
|
51
54
|
"tabRoles": "角色",
|
|
@@ -55,7 +58,18 @@
|
|
|
55
58
|
"holders": "持有者",
|
|
56
59
|
"permissions": "已绑定权限点",
|
|
57
60
|
"titleKey": "标题键",
|
|
58
|
-
"readonlyHint": "只读视图:角色与绑定由解决方案工具链(upsertSolutionPerms)管理"
|
|
61
|
+
"readonlyHint": "只读视图:角色与绑定由解决方案工具链(upsertSolutionPerms)管理",
|
|
62
|
+
"columns": {
|
|
63
|
+
"module": "模块",
|
|
64
|
+
"title": "标题",
|
|
65
|
+
"code": "编码"
|
|
66
|
+
},
|
|
67
|
+
"roleTitle": {
|
|
68
|
+
"superadmin": "超级管理员",
|
|
69
|
+
"admin": "系统管理员",
|
|
70
|
+
"editor": "编辑",
|
|
71
|
+
"viewer": "访客"
|
|
72
|
+
}
|
|
59
73
|
},
|
|
60
74
|
"departments": {
|
|
61
75
|
"create": "新建部门",
|
|
@@ -256,7 +270,14 @@
|
|
|
256
270
|
}
|
|
257
271
|
},
|
|
258
272
|
"setting": {
|
|
273
|
+
"group": {
|
|
274
|
+
"general": "常规",
|
|
275
|
+
"security": "安全",
|
|
276
|
+
"login": "登录方式",
|
|
277
|
+
"ldap": "LDAP"
|
|
278
|
+
},
|
|
259
279
|
"site_title": "站点标题",
|
|
280
|
+
"market_cdn_url": "市场 CDN 地址",
|
|
260
281
|
"ldap_enabled": "启用 LDAP 登录",
|
|
261
282
|
"sso_enabled": "启用 SSO 登录",
|
|
262
283
|
"wecom_enabled": "启用企业微信登录",
|
|
@@ -37,13 +37,20 @@ export default function RolesPage() {
|
|
|
37
37
|
</Space>
|
|
38
38
|
),
|
|
39
39
|
},
|
|
40
|
-
{ title: "module", dataIndex: "module" },
|
|
40
|
+
{ title: t("system:rolesPage.columns.module"), dataIndex: "module" },
|
|
41
41
|
{
|
|
42
42
|
// R2:solution 角色带 title_key → 按当前语言实时翻译,title(安装期解析文本)兜底;
|
|
43
|
-
//
|
|
44
|
-
title
|
|
43
|
+
// 内置角色(builtin)的 title 是种子里的站点默认语言文本,按角色名再兜一层 locale;
|
|
44
|
+
// custom 角色无 key 原样显示 title(对齐下方权限点 title_key 的渲染先例)
|
|
45
|
+
title: t("system:rolesPage.columns.title"),
|
|
45
46
|
dataIndex: "title",
|
|
46
|
-
render: (_: string, row: RoleRow) =>
|
|
47
|
+
render: (_: string, row: RoleRow) => {
|
|
48
|
+
if (row.title_key)
|
|
49
|
+
return t(row.title_key, { defaultValue: row.title ?? "" });
|
|
50
|
+
return row.builtin
|
|
51
|
+
? t(`system:rolesPage.roleTitle.${row.name}`, { defaultValue: row.title ?? row.name })
|
|
52
|
+
: row.title;
|
|
53
|
+
},
|
|
47
54
|
},
|
|
48
55
|
{ title: t("system:rolesPage.holders"), dataIndex: "holders" },
|
|
49
56
|
{
|
|
@@ -55,11 +62,11 @@ export default function RolesPage() {
|
|
|
55
62
|
|
|
56
63
|
const permColumns = [
|
|
57
64
|
{
|
|
58
|
-
title: "code",
|
|
65
|
+
title: t("system:rolesPage.columns.code"),
|
|
59
66
|
dataIndex: "code",
|
|
60
67
|
render: (code: string, row: PermRow) => (row.deprecated ? <Tag color="default">{code}</Tag> : <span>{code}</span>),
|
|
61
68
|
},
|
|
62
|
-
{ title: "module", dataIndex: "module" },
|
|
69
|
+
{ title: t("system:rolesPage.columns.module"), dataIndex: "module" },
|
|
63
70
|
{
|
|
64
71
|
// title_key 是跨模块 namespace(如 wiki:perm.*),本模块 locale 不命中回退 code(R6)
|
|
65
72
|
title: t("system:rolesPage.titleKey"),
|
|
@@ -93,7 +93,7 @@ export default function SettingsPage() {
|
|
|
93
93
|
return (
|
|
94
94
|
<Space direction="vertical" style={{ width: "100%", paddingTop: 16 }}>
|
|
95
95
|
{groups.map(g => (
|
|
96
|
-
<Card key={g.group} title={g.group}>
|
|
96
|
+
<Card key={g.group} title={t(`system:setting.group.${g.group}`, { defaultValue: g.group })}>
|
|
97
97
|
<Space direction="vertical" style={{ width: "100%" }}>
|
|
98
98
|
{g.items.map(item => (
|
|
99
99
|
<SettingRow key={item.key} item={item} t={t} onSave={(key, value) => putMut.mutate({ key, value })} />
|
|
@@ -188,10 +188,10 @@ export default function UsersPage() {
|
|
|
188
188
|
onOk={() => createForm.submit()}
|
|
189
189
|
>
|
|
190
190
|
<Form form={createForm} layout="vertical" onFinish={values => createMut.mutate(values)}>
|
|
191
|
-
<Form.Item name="username" label={t("system:users.columns.username")} rules={[{ required: true }]} extra="
|
|
191
|
+
<Form.Item name="username" label={t("system:users.columns.username")} rules={[{ required: true }]} extra={t("system:users.usernameHint")}>
|
|
192
192
|
<Input />
|
|
193
193
|
</Form.Item>
|
|
194
|
-
<Form.Item name="password" label="
|
|
194
|
+
<Form.Item name="password" label={t("system:users.password")} rules={[{ required: true }, { min: 6 }]} extra={t("system:users.pwdPlaceholder")}>
|
|
195
195
|
<Input.Password />
|
|
196
196
|
</Form.Item>
|
|
197
197
|
<Form.Item name="displayName" label={t("system:users.columns.displayName")}>
|
|
@@ -211,7 +211,7 @@ export default function UsersPage() {
|
|
|
211
211
|
onOk={() => pwdForm.submit()}
|
|
212
212
|
>
|
|
213
213
|
<Form form={pwdForm} layout="vertical" onFinish={values => pwdTarget && pwdMut.mutate({ uid: pwdTarget.id, password: values.password })}>
|
|
214
|
-
<Form.Item name="password" label="
|
|
214
|
+
<Form.Item name="password" label={t("system:users.password")} rules={[{ required: true }, { min: 6 }]} extra={t("system:users.pwdPlaceholder")}>
|
|
215
215
|
<Input.Password />
|
|
216
216
|
</Form.Item>
|
|
217
217
|
</Form>
|
|
@@ -58,7 +58,7 @@ export default function UserRolesPage() {
|
|
|
58
58
|
<Space direction="vertical">
|
|
59
59
|
<Checkbox.Group
|
|
60
60
|
options={(rolesQuery.data ?? []).map(r => ({
|
|
61
|
-
label: `${r.name}${r.deprecated ? "
|
|
61
|
+
label: `${r.name}${r.deprecated ? t("system:userRoles.deprecated") : ""}`,
|
|
62
62
|
value: r.name,
|
|
63
63
|
// 非 superadmin 授不了平台级角色:置灰,提交后 403 太晚也太含糊
|
|
64
64
|
disabled: r.name === "superadmin" && !isSuper,
|
|
@@ -45,7 +45,20 @@
|
|
|
45
45
|
"installing": "Installing",
|
|
46
46
|
"uninstalling": "Uninstalling",
|
|
47
47
|
"progress": "Progress",
|
|
48
|
-
"stage":
|
|
48
|
+
"stage": {
|
|
49
|
+
"preflight": "Preflight",
|
|
50
|
+
"downloading": "Downloading",
|
|
51
|
+
"verifying": "Verifying",
|
|
52
|
+
"extracting": "Extracting",
|
|
53
|
+
"migrating": "Migrating data",
|
|
54
|
+
"lock_commit": "Committing version lock",
|
|
55
|
+
"registering": "Registering module",
|
|
56
|
+
"deploying_web": "Deploying web assets",
|
|
57
|
+
"reloading": "Reloading config",
|
|
58
|
+
"smoke": "Smoke check",
|
|
59
|
+
"audit": "Final audit",
|
|
60
|
+
"done": "Done"
|
|
61
|
+
},
|
|
49
62
|
"status": {
|
|
50
63
|
"running": "Running",
|
|
51
64
|
"done": "Done",
|
|
@@ -45,7 +45,20 @@
|
|
|
45
45
|
"installing": "安装中",
|
|
46
46
|
"uninstalling": "卸载中",
|
|
47
47
|
"progress": "进度",
|
|
48
|
-
"stage":
|
|
48
|
+
"stage": {
|
|
49
|
+
"preflight": "预检",
|
|
50
|
+
"downloading": "下载中",
|
|
51
|
+
"verifying": "校验中",
|
|
52
|
+
"extracting": "解包中",
|
|
53
|
+
"migrating": "数据迁移",
|
|
54
|
+
"lock_commit": "提交版本锁",
|
|
55
|
+
"registering": "注册模块",
|
|
56
|
+
"deploying_web": "部署前端",
|
|
57
|
+
"reloading": "重载配置",
|
|
58
|
+
"smoke": "冒烟探活",
|
|
59
|
+
"audit": "终态审计",
|
|
60
|
+
"done": "完成"
|
|
61
|
+
},
|
|
49
62
|
"status": {
|
|
50
63
|
"running": "进行中",
|
|
51
64
|
"done": "完成",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"react-router": "7.18.2",
|
|
9
9
|
"react-router/dom": "7.18.2",
|
|
10
10
|
"@tanstack/react-query": "5.102.8",
|
|
11
|
-
"@oj-module/runtime": "0.2.
|
|
12
|
-
"@oj-module/runtime/contract": "0.2.
|
|
13
|
-
"@oj-module/runtime/contract/errors": "0.2.
|
|
11
|
+
"@oj-module/runtime": "0.2.66",
|
|
12
|
+
"@oj-module/runtime/contract": "0.2.66",
|
|
13
|
+
"@oj-module/runtime/contract/errors": "0.2.66",
|
|
14
14
|
"@plane/kit": "0.1.20",
|
|
15
15
|
"@plane/editor": "0.1.20",
|
|
16
16
|
"antd": "6.6.1",
|