added command to clear all notifications

closes #4002
This commit is contained in:
Miodec 2023-02-17 11:18:44 +01:00
parent 528c0e79a2
commit 58cad70f6d
2 changed files with 12 additions and 0 deletions

View file

@ -380,6 +380,14 @@ export const commands: MonkeyTypes.CommandsSubgroup = {
return JSON.stringify(Config);
},
},
{
id: "clearNotifications",
display: "Clear all notifications",
icon: "fa-trash-alt",
exec: async (): Promise<void> => {
Notifications.clearAllNotifications();
},
},
{
id: "clearSwCache",
display: "Clear SW cache",

View file

@ -277,6 +277,10 @@ export function addBanner(
return banner.id;
}
export function clearAllNotifications(): void {
$("#notificationCenter .notif").remove();
}
const debouncedMarginUpdate = debounce(100, updateMargin);
$(window).on("resize", () => {