feat: deprecate old notification module and introduce new notifier module

This commit is contained in:
Fu Diwei
2025-04-24 20:27:20 +08:00
parent 2d17501072
commit 7478dd7f47
27 changed files with 692 additions and 265 deletions

View File

@@ -185,10 +185,12 @@ const AccessList = () => {
const handleTabChange = (key: string) => {
setFilters((prev) => ({ ...prev, range: key }));
setPage(1);
};
const handleSearch = (value: string) => {
setFilters((prev) => ({ ...prev, keyword: value }));
setPage(1);
};
const handleReloadClick = () => {
@@ -251,10 +253,10 @@ const AccessList = () => {
key: "ca-only",
label: t("access.props.range.ca_only"),
},
// {
// key: "notify-only",
// label: t("access.props.range.notify_only"),
// },
{
key: "notify-only",
label: t("access.props.range.notify_only"),
},
]}
activeTabKey={filters["range"] as string}
onTabChange={(key) => handleTabChange(key)}

View File

@@ -251,6 +251,7 @@ const CertificateList = () => {
const handleSearch = (value: string) => {
setFilters((prev) => ({ ...prev, keyword: value.trim() }));
setPage(1);
};
const handleReloadClick = () => {

View File

@@ -1,11 +1,14 @@
import { useTranslation } from "react-i18next";
import { Card, Divider } from "antd";
import { Alert, Card, Divider } from "antd";
import NotifyChannels from "@/components/notification/NotifyChannels";
import NotifyTemplate from "@/components/notification/NotifyTemplate";
import { useZustandShallowSelector } from "@/hooks";
import { useNotifyChannelsStore } from "@/stores/notify";
/**
* @deprecated
*/
const SettingsNotification = () => {
const { t } = useTranslation();
@@ -22,6 +25,7 @@ const SettingsNotification = () => {
<Divider />
<Card className="shadow" styles={{ body: loadedAtOnce ? { padding: 0 } : {} }} title={t("settings.notification.channels.card.title")}>
<Alert type="warning" banner message="本页面相关功能即将在后续版本中废弃,请使用「授权管理」页面来管理通知渠道。" />
<NotifyChannels classNames={{ form: "md:max-w-[40rem]" }} />
</Card>
</div>

View File

@@ -281,6 +281,7 @@ const WorkflowList = () => {
const handleSearch = (value: string) => {
setFilters((prev) => ({ ...prev, keyword: value.trim() }));
setPage(1);
};
const handleCreateClick = () => {