UX: removes color on categories if no style chosen (#9346)

* UX: removes color on categories if no style chosen

* Update app/assets/javascripts/discourse/templates/components/categories-only.hbs

* Update messages.hbs

Co-authored-by: Robin Ward <robin.ward@gmail.com>
This commit is contained in:
Jordan Vidrine 2020-04-03 15:09:01 -05:00 committed by GitHub
parent ad6709772a
commit 751f229665
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,7 @@
import Component from "@ember/component";
import { equal } from "@ember/object/computed";
export default Component.extend({
tagName: ""
tagName: "",
noCategoryStyle: equal("siteSettings.category_style", "none")
});

View File

@ -12,7 +12,7 @@
<tbody aria-labelledby="categories-only-category">
{{#each categories as |c|}}
<tr data-category-id={{c.id}} data-notification-level={{c.notificationLevelString}} class="{{if c.description_excerpt 'has-description' 'no-description'}} {{if c.uploaded_logo.url 'has-logo' 'no-logo'}}">
<td class="category {{if c.isMuted 'muted'}}" style={{border-color c.color}}>
<td class="category {{if c.isMuted 'muted'}} {{if noCategoryStyle "no-category-style"}}" style={{unless noCategoryStyle (border-color c.color)}}>
{{category-title-link category=c}}
{{#unless c.isMuted}}
{{#if c.description_excerpt}}

View File

@ -94,6 +94,11 @@
tbody {
.category {
&.no-category-style {
border-color: transparent;
border-left: 0px;
padding-left: 0px;
}
border-left: 6px solid;
h3,
h4 {