diff --git a/extensions/tags/js/src/components/move-discussion-modal.js b/extensions/tags/js/src/components/move-discussion-modal.js index 54d4456ee..f83ff5336 100644 --- a/extensions/tags/js/src/components/move-discussion-modal.js +++ b/extensions/tags/js/src/components/move-discussion-modal.js @@ -1,6 +1,7 @@ import Component from 'flarum/component'; import DiscussionPage from 'flarum/components/discussion-page'; import icon from 'flarum/helpers/icon'; +import categoryLabel from 'categories/helpers/category-label'; export default class MoveDiscussionModal extends Component { constructor(props) { @@ -16,7 +17,7 @@ export default class MoveDiscussionModal extends Component { m('div.modal-content', [ m('button.btn.btn-icon.btn-link.close.back-control', {onclick: app.modal.close.bind(app.modal)}, icon('times')), m('div.modal-header', m('h3.title-control', discussion - ? ['Move ', m('em', discussion.title()), ' from ', m('span.category', {style: 'color: '+discussion.category().color()}, discussion.category().title()), ' to...'] + ? ['Move ', m('em', discussion.title()), ' from ', categoryLabel(discussion.category()), ' to...'] : ['Start a Discussion In...'])), m('div', [ m('ul.category-list', [ diff --git a/extensions/tags/js/src/helpers/category-label.js b/extensions/tags/js/src/helpers/category-label.js index 8a39188d2..73f8ad398 100644 --- a/extensions/tags/js/src/helpers/category-label.js +++ b/extensions/tags/js/src/helpers/category-label.js @@ -1,3 +1,3 @@ export default function categoryLabel(category) { - return m('span.category-label', {style: {color: category.color()}}, category.title()); + return m('span.category-label', {style: {backgroundColor: category.color()}}, category.title()); } diff --git a/extensions/tags/less/categories.less b/extensions/tags/less/categories.less index 8b5fe5dde..9a40a5d02 100644 --- a/extensions/tags/less/categories.less +++ b/extensions/tags/less/categories.less @@ -1,11 +1,14 @@ .category-label { text-transform: uppercase; font-size: 80%; - font-weight: bold; + font-weight: 600; display: inline-block; + color: #fff; + padding: 1px 5px; + border-radius: 4px; .discussion-summary & { - margin-right: 10px; + margin-right: 5px; font-size: 11px; }