From adc46ac56cbe2aab00c60371607e4fbb808eb671 Mon Sep 17 00:00:00 2001 From: OsamaSayegh Date: Tue, 6 Mar 2018 01:26:50 +0300 Subject: [PATCH] UX: Improvements for theme UI (#5650) * Don't display "Settings: YAML" in Custom CSS/HTML section * Don't show the settings tab for remote/imported themes --- .../admin/controllers/admin-customize-themes-edit.js.es6 | 4 ++-- .../admin/controllers/admin-customize-themes-show.js.es6 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 index e5c21b4c6fb..c4407b53d49 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-themes-edit.js.es6 @@ -37,9 +37,9 @@ export default Ember.Controller.extend({ return this.shouldShow('mobile'); }, - @computed('onlyOverridden') + @computed('onlyOverridden', 'model.remote_theme') showSettings() { - return this.shouldShow('settings'); + return this.shouldShow('settings') && !this.get('model.remote_theme'); }, @observes('onlyOverridden') diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 index b1cf6b1eddb..b8850b10f8f 100644 --- a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 @@ -31,7 +31,7 @@ export default Ember.Controller.extend({ return text + ": " + localized.join(" , "); } }; - ['common', 'desktop', 'mobile', 'settings'].forEach(target => { + ['common', 'desktop', 'mobile'].forEach(target => { descriptions.push(description(target)); }); return descriptions.reject(d=>Em.isBlank(d));