mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-09 07:25:44 +02:00
implemented pr (worth fixing) feedback
update commit
This commit is contained in:
@@ -36,6 +36,7 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
|
||||
const [onPrintFailed, setOnPrintFailed] = useState(provider?.on_print_failed ?? true);
|
||||
const [onPrintStopped, setOnPrintStopped] = useState(provider?.on_print_stopped ?? true);
|
||||
const [onPrintProgress, setOnPrintProgress] = useState(provider?.on_print_progress ?? false);
|
||||
const [onBillingChargeFailed, setOnBillingChargeFailed] = useState(provider?.on_billing_charge_failed ?? true);
|
||||
const [onPrinterOffline, setOnPrinterOffline] = useState(provider?.on_printer_offline ?? false);
|
||||
const [onPrinterError, setOnPrinterError] = useState(provider?.on_printer_error ?? false);
|
||||
const [onAiFailureDetection, setOnAiFailureDetection] = useState(provider?.on_ai_failure_detection ?? false);
|
||||
@@ -192,6 +193,7 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
|
||||
on_print_failed: onPrintFailed,
|
||||
on_print_stopped: onPrintStopped,
|
||||
on_print_progress: onPrintProgress,
|
||||
on_billing_charge_failed: onBillingChargeFailed,
|
||||
on_printer_offline: onPrinterOffline,
|
||||
on_printer_error: onPrinterError,
|
||||
on_ai_failure_detection: onAiFailureDetection,
|
||||
@@ -605,6 +607,13 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
|
||||
</div>
|
||||
<Toggle checked={onPrintProgress} onChange={setOnPrintProgress} />
|
||||
</div>
|
||||
<div className="flex items-center justify-between col-span-2">
|
||||
<div>
|
||||
<span className="text-sm text-white">{t('notifications.billingChargeFailedLabel')}</span>
|
||||
<span className="text-xs text-bambu-gray ml-1">{t('notifications.billingChargeFailedDescription')}</span>
|
||||
</div>
|
||||
<Toggle checked={onBillingChargeFailed} onChange={setOnBillingChargeFailed} />
|
||||
</div>
|
||||
<div className="flex items-center justify-between col-span-2">
|
||||
<div>
|
||||
<span className="text-sm text-white">{t('notifications.plateClearRequired')}</span>
|
||||
@@ -692,6 +701,7 @@ export function AddNotificationModal({ provider, onClose }: AddNotificationModal
|
||||
if (onPrintFailed) enabledEvents.push({ key: 'on_print_failed', label: t('notifications.failed') });
|
||||
if (onPrintStopped) enabledEvents.push({ key: 'on_print_stopped', label: t('notifications.stopped') });
|
||||
if (onPrintProgress) enabledEvents.push({ key: 'on_print_progress', label: t('notifications.progress') });
|
||||
if (onBillingChargeFailed) enabledEvents.push({ key: 'on_billing_charge_failed', label: t('notifications.billingChargeFailedLabel') });
|
||||
if (onPlateClearRequired) enabledEvents.push({ key: 'on_plate_clear_required', label: t('notifications.plateClearRequired') });
|
||||
if (onBedCooled) enabledEvents.push({ key: 'on_bed_cooled', label: t('notifications.bedCooled') });
|
||||
if (onFirstLayerComplete) enabledEvents.push({ key: 'on_first_layer_complete', label: t('notifications.firstLayerCompleteLabel') });
|
||||
|
||||
Reference in New Issue
Block a user