# 是否可以为某些类别移除锁定徽章，而为其他类别保留？

**URL:** <https://meta.discourse.org/t/is-there-a-way-to-remove-the-lock-badge-for-some-categories-but-not-for-others/92610>\
**Category:** UX\
**Created:** [2018年七月18日 09:03 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-lock-badge-for-some-categories-but-not-for-others/92610 "2018-07-18T09:03:23Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年八月27日 16:20 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-the-lock-badge-for-some-categories-but-not-for-others/92610/12 "2023-08-27T16:20:32Z")

</div>

我注意到在某些地方使用 CSS 来处理锁定图标有点棘手，因此我创建了一个主题组件，可以轻松完成此操作，它会隐藏面包屑下拉选择器、标题栏面包屑、导航侧边栏菜单以及相应聊天频道中选定安全类别的锁定图标。 🙂

> [@隐藏锁定徽章图标](https://meta.discourse.org/t/hide-lock-badge-icon/276831):
>
> information_source摘要 隐藏安全分类和聊天频道的锁定徽章图标hammer_and_wrench代码仓库 [https://github.com/Lillinator/hide-lock-badge-icon](https://github.com/Lillinator/hide-lock-badge-icon)question安装指南 [如何安装主题或主题组件](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) 安装此主题组件 概述 这个简单的主题组件可以隐藏下拉分类选择器、标题面包屑导航、侧边栏导航菜单、搜索结果以及对应的分类聊天频道中安全分类的锁定徽章图标。 有些人觉得锁定图标容易产生误导，误以为该分类已被锁定且无法访问。在 Discourse 中，用户只能看到自己有权限访问的内容，因此锁定图标仅表示该分类对其他用户受限。此外，锁定图标也用于表示话题已关闭（本组件不会隐藏此类图标）。因此，一些管理员可能希望完全隐藏分类的锁定图标，这正是本组件的功能。 设置 本组件仅有一个设置项：为工作人员提供开关选项，因为查看锁定图标对工作人员而言可能是一个有用的指示。 截图play_button 组件效果 [查看我的其他 Discourse 相关内容](https://meta.discourse.org/filter?q=category%3Acustomization%20created-by%3ALilly%20order%3Acreated)

---

_[View the full topic](https://meta.discourse.org/t/is-there-a-way-to-remove-the-lock-badge-for-some-categories-but-not-for-others/92610)._
