mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Preview multiple color schemes in wizard (#6151)
It was a dropdown to provide choices of color schemes, and only one scheme could be shown. With this commit, multiple color scheme previews can be displayed on one page at the same time, making admins choose color schemes more easily. Theme preview windows are shrinked. Imported default color schemes. Co-Authored-By: Misaka 0x4e21 <misaka4e21@gmail.com>
This commit is contained in:
@@ -23,18 +23,18 @@ const Wizard = Ember.Object.extend({
|
||||
},
|
||||
|
||||
// A bit clunky, but get the current colors from the appropriate step
|
||||
getCurrentColors() {
|
||||
getCurrentColors(schemeId) {
|
||||
const colorStep = this.get("steps").findBy("id", "colors");
|
||||
if (!colorStep) {
|
||||
return;
|
||||
}
|
||||
|
||||
const themeChoice = colorStep.get("fieldsById.base_scheme_id");
|
||||
const themeChoice = colorStep.get("fieldsById.theme_previews");
|
||||
if (!themeChoice) {
|
||||
return;
|
||||
}
|
||||
|
||||
const themeId = themeChoice.get("value");
|
||||
const themeId = schemeId ? schemeId : themeChoice.get("value");
|
||||
if (!themeId) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user