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 RenderGlimmer from "discourse/widgets/render-glimmer";
|
||||||
import { hbs } from "ember-cli-htmlbars";
|
import { hbs } from "ember-cli-htmlbars";
|
||||||
|
|
||||||
const _extraHeaderIcons = [];
|
let _extraHeaderIcons = [];
|
||||||
|
|
||||||
export function addToHeaderIcons(icon) {
|
export function addToHeaderIcons(icon) {
|
||||||
_extraHeaderIcons.push(icon);
|
_extraHeaderIcons.push(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function clearExtraHeaderIcons() {
|
||||||
|
_extraHeaderIcons = [];
|
||||||
|
}
|
||||||
|
|
||||||
const dropdown = {
|
const dropdown = {
|
||||||
buildClasses(attrs) {
|
buildClasses(attrs) {
|
||||||
let classes = attrs.classNames || [];
|
let classes = attrs.classNames || [];
|
||||||
|
|
|
@ -71,6 +71,7 @@ import {
|
||||||
} from "discourse/lib/to-markdown";
|
} from "discourse/lib/to-markdown";
|
||||||
import { clearTagsHtmlCallbacks } from "discourse/lib/render-tags";
|
import { clearTagsHtmlCallbacks } from "discourse/lib/render-tags";
|
||||||
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
||||||
|
import { clearExtraHeaderIcons } from "discourse/widgets/header";
|
||||||
import { resetSidebarSection } from "discourse/lib/sidebar/custom-sections";
|
import { resetSidebarSection } from "discourse/lib/sidebar/custom-sections";
|
||||||
import { resetNotificationTypeRenderers } from "discourse/lib/notification-item";
|
import { resetNotificationTypeRenderers } from "discourse/lib/notification-item";
|
||||||
|
|
||||||
|
@ -202,6 +203,7 @@ export function testCleanup(container, app) {
|
||||||
clearToolbarCallbacks();
|
clearToolbarCallbacks();
|
||||||
resetSidebarSection();
|
resetSidebarSection();
|
||||||
resetNotificationTypeRenderers();
|
resetNotificationTypeRenderers();
|
||||||
|
clearExtraHeaderIcons();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function discourseModule(name, options) {
|
export function discourseModule(name, options) {
|
||||||
|
|
Loading…
Reference in New Issue