From dc40847371974daa9008b7f0667c3eb319365cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C4=B0pek?= Date: Sat, 28 Feb 2026 11:10:41 +0300 Subject: [PATCH] feat(notifications): enhance notification preferences with new version and approval event options --- app/onboarding/onboarding-wizard.tsx | 40 +++++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/app/onboarding/onboarding-wizard.tsx b/app/onboarding/onboarding-wizard.tsx index 2ff8488..7a85bf6 100644 --- a/app/onboarding/onboarding-wizard.tsx +++ b/app/onboarding/onboarding-wizard.tsx @@ -68,7 +68,7 @@ function ToggleButton({ type="button" onClick={onToggle} className={cn( - 'flex items-center justify-between w-full p-3 rounded-lg border transition-colors text-left', + 'flex items-center justify-between w-full px-3 py-2 rounded-lg border transition-colors text-left', enabled ? 'border-primary/50 bg-primary/5' : 'border-border hover:bg-accent/50' )} > @@ -431,8 +431,10 @@ function StepNotifications({ onFinish }: { onFinish: () => Promise }) { const [emailEnabled, setEmailEnabled] = useState(false); const [events, setEvents] = useState({ onNewVideo: true, + onNewVersion: true, onNewComment: true, onNewReply: true, + onApprovalEvents: true, }); const handleSave = async () => { @@ -447,10 +449,10 @@ function StepNotifications({ onFinish }: { onFinish: () => Promise }) { telegramBotToken: null, telegramChatId: null, onNewVideo: events.onNewVideo, - onNewVersion: true, + onNewVersion: events.onNewVersion, onNewComment: events.onNewComment, onNewReply: events.onNewReply, - onApprovalEvents: true, + onApprovalEvents: events.onApprovalEvents, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC', }), }); @@ -461,19 +463,19 @@ function StepNotifications({ onFinish }: { onFinish: () => Promise }) { }; return ( -
-
-
- +
+
+
+
-

Notification preferences

-

+

Notification preferences

+

Choose when you want to be notified. Email and Telegram are both supported — you can configure Telegram anytime in Settings.

-
-
+
+
Channels @@ -486,7 +488,7 @@ function StepNotifications({ onFinish }: { onFinish: () => Promise }) { />
-
+
Events @@ -497,6 +499,12 @@ function StepNotifications({ onFinish }: { onFinish: () => Promise }) { label="New Video Added" description="When a new video is added to one of your projects" /> + setEvents((e) => ({ ...e, onNewVersion: !e.onNewVersion }))} + label="New Version Added" + description="When a new version is added to an existing video" + /> setEvents((e) => ({ ...e, onNewComment: !e.onNewComment }))} @@ -509,10 +517,16 @@ function StepNotifications({ onFinish }: { onFinish: () => Promise }) { label="New Reply" description="When someone replies to a comment thread" /> + setEvents((e) => ({ ...e, onApprovalEvents: !e.onApprovalEvents }))} + label="Approval Workflow" + description="When approval requests are created, responded to, or finalized" + />
-
+