FIX: hide theme selector if only 1 theme

This commit is contained in:
Sam 2017-05-12 12:50:56 -04:00
parent 2d96a0785d
commit 3113a6a18a
2 changed files with 6 additions and 1 deletions

View File

@ -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");

View File

@ -1,4 +1,4 @@
{{#if userSelectableThemes}}
{{#if showThemeSelector}}
<div class="control-group theme">
<label class="control-label">{{i18n 'user.theme'}}</label>
<div class="controls">