Add Dismiss label to toast button, reactivate on remind_at change
- Toast dismiss button now shows X icon + 'Dismiss' text to match the snooze button style - Updating remind_at on a dismissed reminder clears is_dismissed and snoozed_until, making the reminder active again Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
38bce21ac3
commit
6cd5b71d1c
@ -139,9 +139,10 @@ async def update_reminder(
|
||||
|
||||
update_data = reminder_update.model_dump(exclude_unset=True)
|
||||
|
||||
# Clear stale snooze if remind_at is being changed
|
||||
if 'remind_at' in update_data:
|
||||
# Reactivate reminder if remind_at is being changed
|
||||
if 'remind_at' in update_data and update_data['remind_at'] is not None:
|
||||
reminder.snoozed_until = None
|
||||
reminder.is_dismissed = False
|
||||
|
||||
for key, value in update_data.items():
|
||||
setattr(reminder, key, value)
|
||||
|
||||
@ -114,9 +114,10 @@ export function AlertsProvider({ children }: { children: ReactNode }) {
|
||||
<button
|
||||
onClick={() => dismissRef.current(reminder.id)}
|
||||
aria-label={`Dismiss "${reminder.title}"`}
|
||||
className="p-1 rounded hover:bg-accent/10 hover:text-accent text-muted-foreground transition-colors"
|
||||
className="flex items-center gap-1 px-1.5 py-1 rounded hover:bg-accent/10 hover:text-accent text-muted-foreground transition-colors"
|
||||
>
|
||||
<X className="h-3.5 w-3.5" />
|
||||
<span className="text-[11px] font-medium">Dismiss</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user