feat: 自定义版本功能更新
Build and Release / Build (push) Has been cancelled

- 新增家庭共享订阅管理
- 新增用户邀请统计
- 新增签名和订阅模式设置表单
- 更新 API 服务层和国际化文件
- UI 组件优化(enhanced-input、pro-table)
This commit is contained in:
2026-03-19 01:56:13 -07:00
parent 31803a1d24
commit 6b92979c7c
82 changed files with 3266 additions and 739 deletions
@@ -54,6 +54,7 @@ const emailSettingsSchema = z.object({
expiration_email_template: z.string().optional(),
maintenance_email_template: z.string().optional(),
traffic_exceed_email_template: z.string().optional(),
delete_account_email_template: z.string().optional(),
platform: z.string(),
platform_config: z
.object({
@@ -102,6 +103,7 @@ export default function EmailSettingsForm() {
expiration_email_template: "",
maintenance_email_template: "",
traffic_exceed_email_template: "",
delete_account_email_template: "",
platform: "smtp",
platform_config: {
host: "",
@@ -195,6 +197,12 @@ export default function EmailSettingsForm() {
<TabsTrigger value="traffic">
{t("email.trafficTemplate", "Traffic Template")}
</TabsTrigger>
<TabsTrigger value="delete_account">
{t(
"email.deleteAccountTemplate",
"Delete Account Template"
)}
</TabsTrigger>
</TabsList>
<TabsContent className="space-y-2" value="basic">
@@ -840,6 +848,88 @@ export default function EmailSettingsForm() {
)}
/>
</TabsContent>
<TabsContent className="space-y-2" value="delete_account">
<FormField
control={form.control}
name="config.delete_account_email_template"
render={({ field }) => (
<FormItem>
<FormLabel>
{t(
"email.deleteAccountEmailTemplate",
"Delete Account Email Template"
)}
</FormLabel>
<FormControl>
<HTMLEditor
onChange={field.onChange}
placeholder={t(
"email.inputPlaceholder",
"Please enter"
)}
value={field.value}
/>
</FormControl>
<div className="mt-4 space-y-2 border-t pt-4">
<p className="font-medium text-muted-foreground text-sm">
{t(
"email.templateVariables.title",
"Template Variables"
)}
</p>
<div className="space-y-2 text-muted-foreground text-xs">
<div className="flex items-center gap-2">
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-foreground">
{"{{.SiteLogo}}"}
</code>
<span>
{t(
"email.templateVariables.siteLogo.description",
"Site logo URL"
)}
</span>
</div>
<div className="flex items-center gap-2">
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-foreground">
{"{{.SiteName}}"}
</code>
<span>
{t(
"email.templateVariables.siteName.description",
"Site name"
)}
</span>
</div>
<div className="flex items-center gap-2">
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-foreground">
{"{{.Code}}"}
</code>
<span>
{t(
"email.templateVariables.code.description",
"Verification code"
)}
</span>
</div>
<div className="flex items-center gap-2">
<code className="rounded bg-muted px-1.5 py-0.5 font-mono text-foreground">
{"{{.Expire}}"}
</code>
<span>
{t(
"email.templateVariables.expire.description",
"Code expiration time"
)}
</span>
</div>
</div>
</div>
<FormMessage />
</FormItem>
)}
/>
</TabsContent>
</Tabs>
</form>
</Form>