Custom Preview for Header Logo

This commit is contained in:
Robin Ward
2016-09-16 16:12:56 -04:00
parent 69325fbe02
commit a318b18236
7 changed files with 298 additions and 121 deletions

View File

@ -5,7 +5,28 @@ import computed from 'ember-addons/ember-computed-decorators';
const Wizard = Ember.Object.extend({
@computed('steps.length')
totalSteps: length => length
totalSteps: length => length,
// A bit clunky, but get the current colors from the appropriate step
getCurrentColors() {
const colorStep = this.get('steps').findProperty('id', 'colors');
if (!colorStep) { return; }
const themeChoice = colorStep.get('fieldsById.theme_id');
if (!themeChoice) { return; }
const themeId = themeChoice.get('value');
if (!themeId) { return; }
const choices = themeChoice.get('choices');
if (!choices) { return; }
const option = choices.findProperty('id', themeId);
if (!option) { return; }
return option.data.colors;
}
});
export function findWizard() {