FIX: add the required widget for admin-problems notification item (#22602)

This commit is contained in:
Faizaan Gagan 2023-07-14 10:37:01 +05:30 committed by GitHub
parent dc547e39aa
commit 24ab2f42b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { DefaultNotificationItem } from "discourse/widgets/default-notification-item";
import I18n from "I18n";
import { createWidgetFrom } from "discourse/widgets/widget";
import getURL from "discourse-common/lib/get-url";
import { iconNode } from "discourse-common/lib/icon-library";
createWidgetFrom(DefaultNotificationItem, "admin-problems-notification-item", {
text() {
return I18n.t("notifications.admin_problems");
},
url() {
return getURL("/admin");
},
icon() {
return iconNode("gift");
},
});