6b92979c7c
Build and Release / Build (push) Has been cancelled
- 新增家庭共享订阅管理 - 新增用户邀请统计 - 新增签名和订阅模式设置表单 - 更新 API 服务层和国际化文件 - UI 组件优化(enhanced-input、pro-table)
74 lines
2.2 KiB
TypeScript
74 lines
2.2 KiB
TypeScript
import {
|
|
Table,
|
|
TableBody,
|
|
TableCell,
|
|
TableRow,
|
|
} from "@workspace/ui/components/table";
|
|
import { useTranslation } from "react-i18next";
|
|
import CurrencyForm from "./basic-settings/currency-form";
|
|
import PrivacyPolicyForm from "./basic-settings/privacy-policy-form";
|
|
import SiteForm from "./basic-settings/site-form";
|
|
import TosForm from "./basic-settings/tos-form";
|
|
import LogCleanupForm from "./log-cleanup/log-cleanup-form";
|
|
import InviteForm from "./user-security/invite-form";
|
|
import RegisterForm from "./user-security/register-form";
|
|
import SignatureForm from "./user-security/signature-form";
|
|
import SubscribeModeForm from "./user-security/subscribe-mode-form";
|
|
import VerifyCodeForm from "./user-security/verify-code-form";
|
|
import VerifyForm from "./user-security/verify-form";
|
|
|
|
export default function System() {
|
|
const { t } = useTranslation("system");
|
|
|
|
const formSections = [
|
|
{
|
|
title: t("basicSettings", "Basic Settings"),
|
|
forms: [
|
|
{ component: SiteForm },
|
|
{ component: CurrencyForm },
|
|
{ component: TosForm },
|
|
{ component: PrivacyPolicyForm },
|
|
],
|
|
},
|
|
{
|
|
title: t("userSecuritySettings", "User & Security"),
|
|
forms: [
|
|
{ component: RegisterForm },
|
|
{ component: InviteForm },
|
|
{ component: VerifyForm },
|
|
{ component: VerifyCodeForm },
|
|
{ component: SignatureForm },
|
|
{ component: SubscribeModeForm },
|
|
],
|
|
},
|
|
{
|
|
title: t("logSettings", "Log Settings"),
|
|
forms: [{ component: LogCleanupForm }],
|
|
},
|
|
];
|
|
|
|
return (
|
|
<div className="space-y-8">
|
|
{formSections.map((section, sectionIndex) => (
|
|
<div key={sectionIndex}>
|
|
<h2 className="mb-4 font-semibold text-lg">{section.title}</h2>
|
|
<Table>
|
|
<TableBody>
|
|
{section.forms.map((form, formIndex) => {
|
|
const FormComponent = form.component;
|
|
return (
|
|
<TableRow key={formIndex}>
|
|
<TableCell>
|
|
<FormComponent />
|
|
</TableCell>
|
|
</TableRow>
|
|
);
|
|
})}
|
|
</TableBody>
|
|
</Table>
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|