From f9b432ea796cb2ce1c9300e3ac4bae44c88d453e Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Mon, 17 Aug 2020 16:30:57 -0400 Subject: [PATCH] Override lock icon in category-title-link component --- javascripts/discourse/initializers/category-icons.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/javascripts/discourse/initializers/category-icons.js b/javascripts/discourse/initializers/category-icons.js index 4533c5f..845ceb3 100644 --- a/javascripts/discourse/initializers/category-icons.js +++ b/javascripts/discourse/initializers/category-icons.js @@ -5,6 +5,7 @@ import { iconHTML, iconNode } from "discourse-common/lib/icon-library"; 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"; export default { name: "category-icons", @@ -13,6 +14,11 @@ export default { withPluginApi("0.8.26", (api) => { let categoryThemeList = settings.category_icon_list.split("|"); let lockIcon = settings.category_lock_icon || "lock"; + + categoryTitleLink.reopen({ + lockIcon: lockIcon, + }); + var get = Em.get, escapeExpression = Handlebars.Utils.escapeExpression;