UX: allow component to change lock icons in category boxes (#9)
This commit is contained in:
parent
c94585bac0
commit
e378f4dcc7
|
@ -6,6 +6,8 @@ import { isRTL } from "discourse/lib/text-direction";
|
|||
import { h } from "virtual-dom";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import categoryTitleLink from "discourse/components/category-title-link";
|
||||
import categoriesBoxes from "discourse/components/categories-boxes";
|
||||
import categoriesBoxesWithTopics from "discourse/components/categories-boxes-with-topics";
|
||||
import I18n from "I18n";
|
||||
import { get } from "@ember/object";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
|
@ -22,6 +24,14 @@ export default {
|
|||
lockIcon: lockIcon,
|
||||
});
|
||||
|
||||
categoriesBoxes.reopen({
|
||||
lockIcon: lockIcon,
|
||||
});
|
||||
|
||||
categoriesBoxesWithTopics.reopen({
|
||||
lockIcon: lockIcon,
|
||||
});
|
||||
|
||||
function categoryStripe(color, classes) {
|
||||
var style = color ? "style='background-color: #" + color + ";'" : "";
|
||||
return "<span class='" + classes + "' " + style + "></span>";
|
||||
|
|
Loading…
Reference in New Issue