feat: componentize User Agreement and Privacy Policy display

Extracted the User Agreement and Privacy Policy presentation into a
reusable DocumentRenderer component (web/src/components/common/DocumentRenderer).
Unified rendering logic and i18n source for these documents, removed the
legacy contentDetector utility, and updated the related pages to use the
new component. Adjusted controller/backend (controller/misc.go) and locale
files to support the new rendering approach.

This improves reuse, maintainability, and future extensibility.
This commit is contained in:
キュビビイ
2025-10-08 11:12:49 +08:00
parent 6891057647
commit 4d0a9d9494
9 changed files with 280 additions and 532 deletions

View File

@@ -108,6 +108,8 @@ func GetStatus(c *gin.Context) {
"passkey_user_verification": passkeySetting.UserVerification,
"passkey_attachment": passkeySetting.AttachmentPreference,
"setup": constant.Setup,
"user_agreement_enabled": common.OptionMap["UserAgreement"] != "",
"privacy_policy_enabled": common.OptionMap["PrivacyPolicy"] != "",
}
// 根据启用状态注入可选内容