FIX: hide theme selector if only 1 theme
This commit is contained in:
parent
2d96a0785d
commit
3113a6a18a
|
@ -26,6 +26,11 @@ export default Ember.Controller.extend(PreferencesTabController, {
|
|||
return listThemes(this.site);
|
||||
}.property(),
|
||||
|
||||
@computed("userSelectableThemes")
|
||||
showThemeSelector(themes) {
|
||||
return themes && themes.length > 1;
|
||||
},
|
||||
|
||||
@observes("model.user_option.theme_key")
|
||||
themeKeyChanged() {
|
||||
let key = this.get("model.user_option.theme_key");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#if userSelectableThemes}}
|
||||
{{#if showThemeSelector}}
|
||||
<div class="control-group theme">
|
||||
<label class="control-label">{{i18n 'user.theme'}}</label>
|
||||
<div class="controls">
|
||||
|
|
Loading…
Reference in New Issue