mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-22 03:49:18 +02:00
Add first layer complete notification with camera snapshot (#679)
Notify users when the first layer finishes printing so they can check adhesion remotely. Triggers once per print when layer 2 begins (layer_num >= 2, capped at <= 5 to handle reconnects). Includes a camera snapshot attachment. Adds the on_first_layer_complete toggle to all notification providers, with backend/frontend/i18n support across all 7 locales.
This commit is contained in:
@@ -158,6 +158,9 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
|
||||
{provider.on_bed_cooled && (
|
||||
<span className="px-2 py-0.5 bg-teal-500/20 text-teal-400 text-xs rounded">{t('notifications.bedCooled')}</span>
|
||||
)}
|
||||
{provider.on_first_layer_complete && (
|
||||
<span className="px-2 py-0.5 bg-emerald-600/20 text-emerald-300 text-xs rounded">{t('notifications.firstLayer')}</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" />
|
||||
@@ -282,6 +285,17 @@ export function NotificationProviderCard({ provider, onEdit }: NotificationProvi
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="text-sm text-white">{t('notifications.firstLayerCompleteLabel')}</p>
|
||||
<p className="text-xs text-bambu-gray">{t('notifications.firstLayerCompleteDescription')}</p>
|
||||
</div>
|
||||
<Toggle
|
||||
checked={provider.on_first_layer_complete ?? false}
|
||||
onChange={(checked) => updateMutation.mutate({ on_first_layer_complete: checked })}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<p className="text-sm text-white">{t('notifications.printFailed')}</p>
|
||||
<Toggle
|
||||
|
||||
Reference in New Issue
Block a user