mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 11:45:21 -05:00
FIX: Update logic for displaying admin palette warning (#34121)
Follow-up to https://github.com/discourse/discourse/commit/7a9cf9356e486cf3eb6a2c2bf6cd6927a6ef59e4, `_initialUserColorSchemeId` no longer exists — we can simplify to only showing this warning if the admin isn't using the default theme <img width="700" alt="image" src="https://github.com/user-attachments/assets/b32617e6-be1c-4238-847b-0e03f04204d9" />
This commit is contained in:
@@ -64,20 +64,9 @@ export default class AdminCustomizeColorsController extends Controller {
|
||||
}
|
||||
|
||||
get changedThemePreferences() {
|
||||
// can't check against null, because the default scheme ID is null
|
||||
if (
|
||||
this._initialUserLightColorSchemeId === undefined &&
|
||||
this.defaultTheme
|
||||
) {
|
||||
this._captureInitialState();
|
||||
}
|
||||
|
||||
const changedColors =
|
||||
this._initialUserColorSchemeId !==
|
||||
this._initialDefaultThemeLightColorSchemeId;
|
||||
const changedTheme = this.defaultTheme?.id !== currentThemeId(this.site);
|
||||
|
||||
return changedColors || changedTheme;
|
||||
return changedTheme;
|
||||
}
|
||||
|
||||
get isUsingDarkMode() {
|
||||
|
||||
Reference in New Issue
Block a user