mirror of
https://github.com/rustfs/console.git
synced 2026-11-02 22:02:07 +08:00
* feat: extract theme module with build-time overrides * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: address theme module review feedback --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Example Theme Verification
This example theme validates all customization capabilities:
manifest:- Brand name and links are replaced from
themes/example/manifest.json.
- Brand name and links are replaced from
components(same-path override):themes/example/components/auth/heroes/hero-static.tsx- Overrides
components/auth/heroes/hero-static.tsx.
assets(same-path override):themes/example/assets/logo.svg- Overrides
assets/logo.svg.
locales(key-level merge override):themes/example/locales/en-US.jsonthemes/example/locales/zh-CN.json- Only specified keys are overridden.
public(same-path override):themes/example/public/backgrounds/scillate.svgthemes/example/public/backgrounds/ttten.svg
Quick Check
NEXT_PUBLIC_THEME_ID=example pnpm dev
Then verify on login/config pages:
- Logo shows
ACME Console. - Hero content is the custom Acme component.
- Background is teal style (from
public/backgrounds/*override). - Brand links use
example.com/docs.example.com. - Texts such as
Login,View Documentationare overridden, while unspecified i18n keys still use default translations.