fix(webui): reorder appearance settings and trim preview

This commit is contained in:
chengyongru authored and chengyongru committed 2026-11-12 17:23:14 +08:00
1 parent 0ce10533d3
commit c3403e6a6f
14 files changed
+31 -27

No files matched your search

@@ -67,6 +67,19 @@ export function AppearanceSettingsView({ themePreference, onChangeTheme, localPr
</div>
</section>
<section>
<SettingsSectionTitle>{t("settings.sections.interface")}</SettingsSectionTitle>
<SettingsGroup>
<SettingsRow title={t("settings.rows.language")}><LanguageSwitcher /></SettingsRow>
<SettingsRow title={t("settings.rows.brandLogos")} description={t("settings.legal.thirdPartyBrands")}>
<ToggleButton checked={localPrefs.brandLogos}
onChange={(brandLogos) => onChangeLocalPrefs((previous) => ({ ...previous, brandLogos }))}
ariaLabel={t("settings.rows.brandLogos")}
label={t(localPrefs.brandLogos ? "settings.values.on" : "settings.values.off")} />
</SettingsRow>
</SettingsGroup>
</section>
<section>
<SettingsSectionTitle>
<SettingsHint description={t("settings.appearance.processHelp")}>{t("settings.appearance.process")}</SettingsHint>
@@ -94,18 +107,5 @@ export function AppearanceSettingsView({ themePreference, onChangeTheme, localPr
</div>
</SettingsGroup>
</section>
<section>
<SettingsSectionTitle>{t("settings.sections.interface")}</SettingsSectionTitle>
<SettingsGroup>
<SettingsRow title={t("settings.rows.language")}><LanguageSwitcher /></SettingsRow>
<SettingsRow title={t("settings.rows.brandLogos")} description={t("settings.legal.thirdPartyBrands")}>
<ToggleButton checked={localPrefs.brandLogos}
onChange={(brandLogos) => onChangeLocalPrefs((previous) => ({ ...previous, brandLogos }))}
ariaLabel={t("settings.rows.brandLogos")}
label={t(localPrefs.brandLogos ? "settings.values.on" : "settings.values.off")} />
</SettingsRow>
</SettingsGroup>
</section>
</div>;
}
@@ -135,9 +135,6 @@ export function ReadingSettings({ preferences, onChange }: {
<div className="reading-typography appearance-reading-preview"
data-reading-text-size={preferences.readingTextSize}
style={{ "--custom-reading-size": `${preferences.customReadingTextSize}px` } as CSSProperties}>
<div className="mb-4 flex items-center gap-2 text-caption font-medium text-foreground">
<img src="/brand/nanobot_mark.svg" className="h-5 w-5" alt="" />nanobot
</div>
<div data-reading-preview-content>
<MarkdownText>{t("settings.appearance.previewText")}</MarkdownText>
<div className="mt-4 overflow-x-auto rounded-control bg-muted/60 px-4 py-3">