From 30983021e266489b65a12c1ad32d3e42806d2186 Mon Sep 17 00:00:00 2001 From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Date: Mon, 6 Apr 2020 12:02:33 -0500 Subject: [PATCH] No category styles (#9359) * UI: "No category styles" apply to category boxes --- .../components/categories-boxes-with-topics.js | 2 ++ .../discourse/components/categories-boxes.js | 2 ++ .../components/categories-boxes-with-topics.hbs | 2 +- .../templates/components/categories-boxes.hbs | 2 +- .../discourse/templates/user/messages.hbs | 4 ++-- .../stylesheets/common/base/category-list.scss | 16 ++++++++++++++++ .../stylesheets/desktop/category-list.scss | 5 ----- 7 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js b/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js index ffd3a77ca87..40fb4df22f8 100644 --- a/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js +++ b/app/assets/javascripts/discourse/components/categories-boxes-with-topics.js @@ -1,6 +1,7 @@ import discourseComputed from "discourse-common/utils/decorators"; import { isEmpty } from "@ember/utils"; import Component from "@ember/component"; +import { equal } from "@ember/object/computed"; export default Component.extend({ tagName: "section", @@ -8,6 +9,7 @@ export default Component.extend({ ":category-boxes-with-topics", "anyLogos:with-logos:no-logos" ], + noCategoryStyle: equal("siteSettings.category_style", "none"), @discourseComputed("categories.[].uploaded_logo.url") anyLogos() { diff --git a/app/assets/javascripts/discourse/components/categories-boxes.js b/app/assets/javascripts/discourse/components/categories-boxes.js index c3aadd638c4..331d06c216d 100644 --- a/app/assets/javascripts/discourse/components/categories-boxes.js +++ b/app/assets/javascripts/discourse/components/categories-boxes.js @@ -1,6 +1,7 @@ import discourseComputed from "discourse-common/utils/decorators"; import { isEmpty } from "@ember/utils"; import Component from "@ember/component"; +import { equal } from "@ember/object/computed"; export default Component.extend({ tagName: "section", @@ -9,6 +10,7 @@ export default Component.extend({ "anyLogos:with-logos:no-logos", "hasSubcategories:with-subcategories" ], + noCategoryStyle: equal("siteSettings.category_style", "none"), @discourseComputed("categories.[].uploaded_logo.url") anyLogos() { diff --git a/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs b/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs index d4a40fc5a97..fc718918543 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-boxes-with-topics.hbs @@ -1,5 +1,5 @@ {{#each categories as |c|}} -