mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 04:07:14 +08:00
This allows themes to set a modifier in their `about.json` that
restricts a theme's color palettes to only what's defined within the
theme.
```json
"modifiers": {
"only_theme_color_schemes": true
}
```
Once set, a theme's color palette settings will only list the palettes
included in about.json. A banner is shown indicating that the theme
restricts palettes.
<img width="700" alt="image"
src="https://github.com/user-attachments/assets/cfb4433c-c7c9-4923-a121-fddd572c29ea"
/>
<img width="300" alt="image"
src="https://github.com/user-attachments/assets/67ec1f72-d408-4e3b-911f-a2d0e4db9a37"
/>
If there's only 1 palette defined by the theme, it will be set to both
light and dark settings.
If there are more than 1 palettes defined, we check to see if one is
dark and will use the first dark palette for the dark setting.
If there are no color palettes defined by the theme, the color selection
will be unrestricted.
---------
Co-authored-by: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| activerecord_preventing_writes_spec.rb | ||
| api_keys_spec.rb | ||
| auto_reject_reviewable_users_spec.rb | ||
| blocked_hotlinked_media_spec.rb | ||
| category_tag_spec.rb | ||
| content_security_policy_spec.rb | ||
| discord_omniauth_spec.rb | ||
| discourse_cookie_store_spec.rb | ||
| email_outbound_spec.rb | ||
| email_style_spec.rb | ||
| facebook_omniauth_spec.rb | ||
| flags_spec.rb | ||
| github_omniauth_spec.rb | ||
| group_spec.rb | ||
| invalid_request_spec.rb | ||
| invite_only_registration_spec.rb | ||
| message_bus_spec.rb | ||
| multisite_cookies_spec.rb | ||
| multisite_spec.rb | ||
| rate_limiting_spec.rb | ||
| remote_theme_color_schemes_spec.rb | ||
| request_tracker_spec.rb | ||
| same_ip_spammers_spec.rb | ||
| secure_uploads_spec.rb | ||
| smtp_spec.rb | ||
| spam_rules_spec.rb | ||
| tag_counts_spec.rb | ||
| topic_auto_close_spec.rb | ||
| topic_thumbnail_spec.rb | ||
| twitter_omniauth_spec.rb | ||
| watched_words_spec.rb | ||