mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-21 10:15:04 +02:00
feat: add bed cooled notification after print completes (#378)
Notify users when the print bed cools below a configurable threshold (default 35°C) after a print finishes, so they know when to remove parts. - Backend: DB migration, model, schemas, notification template, service method, background cooldown monitor (polls every 15s, 30min timeout) - Frontend: event toggle in provider card/modal, threshold setting in Settings > Notifications, i18n keys for all 5 locales - Tests: 4 backend + 4 frontend tests - Docs: README, website, wiki updated
This commit is contained in:
@@ -163,6 +163,9 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
|
||||
{provider.on_ams_ht_temperature_high && (
|
||||
<span className="px-2 py-0.5 bg-amber-600/20 text-amber-300 text-xs rounded">AMS-HT Temp</span>
|
||||
)}
|
||||
{provider.on_bed_cooled && (
|
||||
<span className="px-2 py-0.5 bg-teal-500/20 text-teal-400 text-xs rounded">Bed Cooled</span>
|
||||
)}
|
||||
{provider.quiet_hours_enabled && (
|
||||
<span className="px-2 py-0.5 bg-indigo-500/20 text-indigo-400 text-xs rounded flex items-center gap-1">
|
||||
<Moon className="w-3 h-3" />
|
||||
@@ -276,6 +279,17 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="text-sm text-white">Bed Cooled</p>
|
||||
<p className="text-xs text-bambu-gray">Bed cooled below threshold after print</p>
|
||||
</div>
|
||||
<Toggle
|
||||
checked={provider.on_bed_cooled ?? false}
|
||||
onChange={(checked) => updateMutation.mutate({ on_bed_cooled: checked })}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<p className="text-sm text-white">Print Failed</p>
|
||||
<Toggle
|
||||
|
||||
Reference in New Issue
Block a user