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);
|
return listThemes(this.site);
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
|
@computed("userSelectableThemes")
|
||||||
|
showThemeSelector(themes) {
|
||||||
|
return themes && themes.length > 1;
|
||||||
|
},
|
||||||
|
|
||||||
@observes("model.user_option.theme_key")
|
@observes("model.user_option.theme_key")
|
||||||
themeKeyChanged() {
|
themeKeyChanged() {
|
||||||
let key = this.get("model.user_option.theme_key");
|
let key = this.get("model.user_option.theme_key");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{#if userSelectableThemes}}
|
{{#if showThemeSelector}}
|
||||||
<div class="control-group theme">
|
<div class="control-group theme">
|
||||||
<label class="control-label">{{i18n 'user.theme'}}</label>
|
<label class="control-label">{{i18n 'user.theme'}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
|
Loading…
Reference in New Issue