mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:13:22 +08:00
DEV: Clear extra header buttons (#17829)
This commit is contained in:
parent
e0f469eab8
commit
9645cbea26
|
@ -14,12 +14,16 @@ import { logSearchLinkClick } from "discourse/lib/search";
|
|||
import RenderGlimmer from "discourse/widgets/render-glimmer";
|
||||
import { hbs } from "ember-cli-htmlbars";
|
||||
|
||||
const _extraHeaderIcons = [];
|
||||
let _extraHeaderIcons = [];
|
||||
|
||||
export function addToHeaderIcons(icon) {
|
||||
_extraHeaderIcons.push(icon);
|
||||
}
|
||||
|
||||
export function clearExtraHeaderIcons() {
|
||||
_extraHeaderIcons = [];
|
||||
}
|
||||
|
||||
const dropdown = {
|
||||
buildClasses(attrs) {
|
||||
let classes = attrs.classNames || [];
|
||||
|
|
|
@ -71,6 +71,7 @@ import {
|
|||
} from "discourse/lib/to-markdown";
|
||||
import { clearTagsHtmlCallbacks } from "discourse/lib/render-tags";
|
||||
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
||||
import { clearExtraHeaderIcons } from "discourse/widgets/header";
|
||||
import { resetSidebarSection } from "discourse/lib/sidebar/custom-sections";
|
||||
import { resetNotificationTypeRenderers } from "discourse/lib/notification-item";
|
||||
|
||||
|
@ -202,6 +203,7 @@ export function testCleanup(container, app) {
|
|||
clearToolbarCallbacks();
|
||||
resetSidebarSection();
|
||||
resetNotificationTypeRenderers();
|
||||
clearExtraHeaderIcons();
|
||||
}
|
||||
|
||||
export function discourseModule(name, options) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user