From 2567bb4a67431e1738277b1318bf2f6e8bda1e5b Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Mon, 17 Aug 2020 16:08:08 -0400 Subject: [PATCH] DEV: Facilitate replacing category lock icon in components --- .../discourse/app/components/category-title-link.js | 4 +++- .../app/templates/components/category-title-link.hbs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/category-title-link.js b/app/assets/javascripts/discourse/app/components/category-title-link.js index c6dacce317d..7cdf243d0a6 100644 --- a/app/assets/javascripts/discourse/app/components/category-title-link.js +++ b/app/assets/javascripts/discourse/app/components/category-title-link.js @@ -1,4 +1,6 @@ import Component from "@ember/component"; export default Component.extend({ - tagName: "h3" + tagName: "h3", + // icon name defined here so it can be easily overriden in theme components + lockIcon: "lock" }); diff --git a/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs b/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs index a37e55354f7..9de2a6a09b5 100644 --- a/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/category-title-link.hbs @@ -2,7 +2,7 @@
{{category-title-before category=category}} {{#if category.read_restricted}} - {{d-icon "lock"}} + {{d-icon lockIcon}} {{/if}} {{dir-span category.name}}