diff --git a/frontend/src/pages/settings/PublicPageTab.tsx b/frontend/src/pages/settings/PublicPageTab.tsx index 1108f0b..c8dbb57 100644 --- a/frontend/src/pages/settings/PublicPageTab.tsx +++ b/frontend/src/pages/settings/PublicPageTab.tsx @@ -69,13 +69,13 @@ interface NotifySettingsWire { notifyGrace: number; notifyTraffic: number; notifyExpiry: number; - notifyLogin: string; + notifyLogin: boolean; notifyTelegramText: string; notifyWebhookBody: string; telegramConfigured: boolean; webhookConfigured: boolean; - webhookUrlSet: boolean; - webhookHeadersSet: boolean; + notifyWebhookUrlSet: boolean; + notifyWebhookHeadersSet: boolean; } interface CoverageRow { @@ -232,12 +232,12 @@ export default function PublicPageTab() { async function testNotify() { setNotifyTesting(true); try { - const msg = await HttpUtil.post('/panel/api/probe/notify/test', undefined, { + const msg = await HttpUtil.post<{ sent: string[] }>('/panel/api/probe/notify/test', undefined, { silent: true, }); if (msg?.success) { messageApi.success( - t('pages.settings.probeNotify.testSent', { channels: (msg.obj ?? []).join('、') }), + t('pages.settings.probeNotify.testSent', { channels: (msg.obj?.sent ?? []).join('、') }), ); } else { messageApi.error(msg?.msg || t('pages.settings.probeThemes.saveFailed')); @@ -627,8 +627,8 @@ export default function PublicPageTab() {
{t('pages.settings.probeNotify.loginAlert')}
setNotify({ ...notify, notifyLogin: v ? 'on' : 'off' })} + checked={notify.notifyLogin} + onChange={(v) => setNotify({ ...notify, notifyLogin: v })} /> @@ -670,14 +670,14 @@ export default function PublicPageTab() { { setWebhookUrl(e.target.value); setUrlTouched(true); }} /> - {notify.webhookUrlSet && !urlTouched ? ( + {notify.notifyWebhookUrlSet && !urlTouched ? (