Skip to content

Commit eba5d54

Browse files
committed
feat: show info banner for email notifications in local mode
Display a banner on the Notifications page when running in local mode, informing users that email delivery requires the cloud version. Rules can still be created and managed — they take effect once email is configured.
1 parent d6a4d7c commit eba5d54

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/frontend/src/pages/Notifications.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
createSignal,
33
createResource,
4+
onMount,
45
Show,
56
For,
67
type Component,
@@ -16,6 +17,7 @@ import {
1617
} from "../services/api.js";
1718
import { formatMetricType } from "../services/formatters.js";
1819
import { toast } from "../services/toast-store.js";
20+
import { checkLocalMode, isLocalMode } from "../services/local-mode.js";
1921
import NotificationRuleModal from "../components/NotificationRuleModal.jsx";
2022

2123
function formatThreshold(rule: NotificationRule): string {
@@ -34,6 +36,10 @@ const Notifications: Component = () => {
3436
const [modalOpen, setModalOpen] = createSignal(false);
3537
const [editingRule, setEditingRule] = createSignal<NotificationRule | null>(null);
3638

39+
onMount(() => {
40+
checkLocalMode();
41+
});
42+
3743
const [rules, { refetch }] = createResource(
3844
() => agentName(),
3945
(name) => getNotificationRules(name),
@@ -88,6 +94,17 @@ const Notifications: Component = () => {
8894
</button>
8995
</div>
9096

97+
<Show when={isLocalMode()}>
98+
<div class="waiting-banner" role="status">
99+
<i class="bxd bx-info-circle" />
100+
<p>
101+
Email notifications are available on the cloud version of Manifest.
102+
You can still create and manage alert rules here -- they will be
103+
stored and will take effect once email delivery is configured.
104+
</p>
105+
</div>
106+
</Show>
107+
91108
<Show
92109
when={!rules.loading}
93110
fallback={<div class="empty-state"><p>Loading...</p></div>}

0 commit comments

Comments
 (0)