Icon packs are the owner's pick: the theme choice carries it, Appearance offers it

- ThemeChoice gains an optional icons field (absent: follow the theme's pack; site: the site's
  own icons; else a pack id), validated natively as a slug (waybetter-host theme.rs, with a
  test) and kept by per-theme choices; variants is an override group natively too.
- Appearance: an Icons row (Follow the theme / the site's own icons / the site's packs) when the
  site lists packs; English words in the catalog.
- The chrome's glyphs follow the owner's pick as well as the theme's suggestion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
CRTkafa 2026-10-01 04:19:55 +07:00
parent e88339bda6
commit 8a0ab6d3a1
8 changed files with 50 additions and 12 deletions

View file

@ -206,6 +206,11 @@ export function Appearance({ notify }: { notify: Notify }) {
<Row label={t('wb.appearance.accent')} hint={t('wb.appearance.accentHint')} keywords="color colour highlight link" wide>
<ColorField label={t('wb.appearance.accentColor')} value={choice.accent} swatches={[...themes.accents]} autoLabel={t('wb.appearance.theme')} onChange={accent => void update({ ...choice, accent })}/>
</Row>
{themes.iconPacks?.length ? <Row label={t('wb.appearance.icons')} hint={t('wb.appearance.iconsHint')} keywords="icon pack glyphs symbols pixel">
<Select label={t('wb.appearance.icons')} value={choice.icons ?? 'theme'} width={220}
onChange={icons => void update({ ...choice, icons: icons === 'theme' ? undefined : icons })}
options={[{ value: 'theme', label: t('wb.appearance.icons.theme') }, { value: 'site', label: t('wb.appearance.icons.site') }, ...themes.iconPacks.map(pack => ({ value: pack.id, label: pack.name }))]}/>
</Row> : null}
<Row label={t('wb.appearance.fonts')} hint={t('wb.appearance.fontsHint')}
keywords="typeface typography family font google fonts post text heading numbers code interface window dialogs" wide>
<FontRoles font={effective.font} onRole={setRole} compact/>