No category styles (#9359)
* UI: "No category styles" apply to category boxes
This commit is contained in:
parent
3814ca06a8
commit
30983021e2
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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}}>
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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"}}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -94,11 +94,6 @@
|
|||
|
||||
tbody {
|
||||
.category {
|
||||
&.no-category-style {
|
||||
border-color: transparent;
|
||||
border-left: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
border-left: 6px solid;
|
||||
h3,
|
||||
h4 {
|
||||
|
|
Loading…
Reference in New Issue