mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-23 18:23:46 +08:00
Various fixes and improvements for the color palettes admin page... * Live previews stopped working because we were never running `_captureInitialState()` so we had no comparison to see if we could live preview * `canPreviewColorScheme` also needed to check against "theme default" user preference (-1) * Refactors warning messages if admin user preferences differ from defaults <img width="2036" height="260" alt="image" src="https://github.com/user-attachments/assets/30b6957a-6009-42e7-9cb7-01610536fd1c" /> We now warn on: * Theme is different from the default (overrides color difference warnings) * Light and/or dark palette are different from the default * Added specs for toasts on palette change, which is a light way to check if live preview is working (when the conditions are met for the live preview, we don't show the toast) * If a color palette isn't editable, make the button say "view" and not "edit" — we can improve this some more, but this is a simple iterative step |
||
|---|---|---|
| .. | ||
| db/migrate | ||
| fabricators | ||
| fixtures | ||
| generator | ||
| helpers | ||
| import_export | ||
| initializers | ||
| integration | ||
| integrity | ||
| jobs | ||
| lib | ||
| mailers | ||
| models | ||
| multisite | ||
| queries/reports | ||
| requests | ||
| script/import_scripts | ||
| serializers | ||
| services | ||
| support | ||
| system | ||
| tasks | ||
| views | ||
| rails_helper.rb | ||
| regenerate_swagger_docs | ||
| swagger_helper.rb | ||