No category styles (#9359)

* UI: "No category styles" apply to category boxes
This commit is contained in:
Jordan Vidrine 2020-04-06 12:02:33 -05:00 committed by GitHub
parent 3814ca06a8
commit 30983021e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 9 deletions

View File

@ -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() {

View File

@ -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() {

View File

@ -1,5 +1,5 @@
{{#each categories as |c|}}
<div data-notification-level={{c.notificationLevelString}} class='category category-box category-box-{{c.slug}} {{if c.isMuted "muted"}}' style={{border-color c.color}}>
<div data-notification-level={{c.notificationLevelString}} class='category category-box category-box-{{c.slug}} {{if c.isMuted "muted"}} {{if noCategoryStyle "no-category-boxes-style"}}' style={{unless noCategoryStyle (border-color c.color)}}>
<div class='category-box-inner'>
<div class='category-box-heading'>
<a href={{c.url}}>

View File

@ -1,5 +1,5 @@
{{#each categories as |c|}}
<div class='category category-box category-box-{{c.slug}} {{if c.isMuted "muted"}}' style={{border-color c.color}} data-category-id={{c.id}} data-notification-level={{c.notificationLevelString}}
<div class='category category-box category-box-{{c.slug}} {{if c.isMuted "muted"}} {{if noCategoryStyle "no-category-boxes-style"}}' style={{unless noCategoryStyle (border-color c.color)}} data-category-id={{c.id}} data-notification-level={{c.notificationLevelString}}
data-url={{c.url}}>
<div class='category-box-inner'>
{{#unless c.isMuted}}

View File

@ -1,7 +1,7 @@
{{#d-section class="user-secondary-navigation" pageClass="user-messages"}}
{{#unless site.mobileView}}
{{#if showNewPM}}
{{d-button class="btn-primary new-private-message" action=(route-action "composePrivateMessage") icon="envelope" label="user.new_private_message"}}
{{d-button class="btn-primary new-" action=(route-action "composePrivateMessage") icon="envelope" label="user.new_private_message"}}
{{/if}}
{{/unless}}
@ -72,7 +72,7 @@
{{#if site.mobileView}}
{{#if showNewPM}}
{{d-button
class="btn-primary new-private-message"
class="btn-primary new-"
action=(route-action "composePrivateMessage")
icon="envelope"
label="user.new_private_message"}}

View File

@ -324,3 +324,19 @@
color: $primary-medium;
}
}
.category-list {
tbody {
.category {
&.no-category-style {
border-color: transparent;
border-left: 0px;
padding-left: 0px;
}
}
}
}
.category-box.no-category-boxes-style {
border-left-width: 2px;
}

View File

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