From 3fdf9083dc6bfc47fc2ad0de3fac327d749d778d Mon Sep 17 00:00:00 2001 From: CaIon Date: Sat, 19 Sep 2026 20:32:52 +0800 Subject: [PATCH] fix(settings): move documentation link to site settings --- .../system-settings/billing/index.tsx | 1 - .../billing/section-registry.tsx | 3 -- .../general/quota-settings-section.tsx | 23 --------------- .../general/system-info-section.tsx | 29 +++++++++++++++++++ .../features/system-settings/site/index.tsx | 1 + .../system-settings/site/section-registry.tsx | 3 ++ web/src/features/system-settings/types.ts | 2 +- 7 files changed, 34 insertions(+), 28 deletions(-) diff --git a/web/src/features/system-settings/billing/index.tsx b/web/src/features/system-settings/billing/index.tsx index cb2f181af..5c2d67146 100644 --- a/web/src/features/system-settings/billing/index.tsx +++ b/web/src/features/system-settings/billing/index.tsx @@ -30,7 +30,6 @@ const defaultBillingSettings: BillingSettings = { QuotaForInviter: 0, QuotaForInvitee: 0, TopUpLink: '', - 'general_setting.docs_link': '', 'quota_setting.enable_free_model_pre_consume': true, QuotaPerUnit: 500000, USDExchangeRate: 7, diff --git a/web/src/features/system-settings/billing/section-registry.tsx b/web/src/features/system-settings/billing/section-registry.tsx index c0c980827..c0978efdb 100644 --- a/web/src/features/system-settings/billing/section-registry.tsx +++ b/web/src/features/system-settings/billing/section-registry.tsx @@ -65,9 +65,6 @@ const BILLING_SECTIONS = [ QuotaForInviter: settings.QuotaForInviter, QuotaForInvitee: settings.QuotaForInvitee, TopUpLink: settings.TopUpLink, - general_setting: { - docs_link: settings['general_setting.docs_link'], - }, quota_setting: { enable_free_model_pre_consume: settings['quota_setting.enable_free_model_pre_consume'], diff --git a/web/src/features/system-settings/general/quota-settings-section.tsx b/web/src/features/system-settings/general/quota-settings-section.tsx index b72838ace..7dcbae27f 100644 --- a/web/src/features/system-settings/general/quota-settings-section.tsx +++ b/web/src/features/system-settings/general/quota-settings-section.tsx @@ -56,9 +56,6 @@ const quotaSchema = z.object({ QuotaForInviter: z.coerce.number().min(0), QuotaForInvitee: z.coerce.number().min(0), TopUpLink: z.string(), - general_setting: z.object({ - docs_link: z.string(), - }), quota_setting: z.object({ enable_free_model_pre_consume: z.boolean(), }), @@ -282,26 +279,6 @@ export function QuotaSettingsSection({ )} /> - - ( - - {t('Documentation Link')} - - - - - {t('Link to your documentation site')} - - - - )} - /> diff --git a/web/src/features/system-settings/general/system-info-section.tsx b/web/src/features/system-settings/general/system-info-section.tsx index 3758b369f..f0b218765 100644 --- a/web/src/features/system-settings/general/system-info-section.tsx +++ b/web/src/features/system-settings/general/system-info-section.tsx @@ -54,6 +54,9 @@ const _systemInfoSchema = z.object({ Footer: z.string().optional(), About: z.string().optional(), HomePageContent: z.string().optional(), + general_setting: z.object({ + docs_link: z.string(), + }), legal: z.object({ user_agreement: z.string().optional(), privacy_policy: z.string().optional(), @@ -83,6 +86,9 @@ export function SystemInfoSection({ defaultValues }: SystemInfoSectionProps) { Footer: normalizeValue(defaultValues.Footer), About: normalizeValue(defaultValues.About), HomePageContent: normalizeValue(defaultValues.HomePageContent), + general_setting: { + docs_link: normalizeValue(defaultValues.general_setting?.docs_link), + }, legal: { user_agreement: normalizeValue(defaultValues.legal?.user_agreement), privacy_policy: normalizeValue(defaultValues.legal?.privacy_policy), @@ -104,6 +110,9 @@ export function SystemInfoSection({ defaultValues }: SystemInfoSectionProps) { Footer: z.string().optional(), About: z.string().optional(), HomePageContent: z.string().optional(), + general_setting: z.object({ + docs_link: z.string(), + }), legal: z.object({ user_agreement: z.string().optional(), privacy_policy: z.string().optional(), @@ -225,6 +234,26 @@ export function SystemInfoSection({ defaultValues }: SystemInfoSectionProps) { )} /> + ( + + {t('Documentation Link')} + + + + + {t('Link to your documentation site')} + + + + )} + /> +