diff --git a/src/components/TriggerPad.tsx b/src/components/TriggerPad.tsx index 0498e4a..7ac50af 100644 --- a/src/components/TriggerPad.tsx +++ b/src/components/TriggerPad.tsx @@ -92,6 +92,7 @@ export function TriggerPad({ confirmTitle, }: TriggerPadProps) { const [confirming, setConfirming] = useState(false); + const [confirmingDisarm, setConfirmingDisarm] = useState(false); const [width, setWidth] = useState(0); const fill = useRef(new Animated.Value(0)).current; const scale = useRef(new Animated.Value(1)).current; @@ -179,12 +180,52 @@ export function TriggerPad({ label="Disarm" variant="secondary" height={56} - onPress={onDisarm} + onPress={() => setConfirmingDisarm(true)} disabled={disabled} icon={OctagonX} - accessibilityLabel="Disarm the alarm on every device" + accessibilityLabel="Disarm the alarm and end this alert" /> - Disarm stops the alarm on every device. One tap, no confirm. + + Disarm stops the alarm for everyone and ends the alert. + + + {/* Disarm is destructive now: a triggered alert is destroyed, and an armed + one is destroyed too, so it always takes a confirmation. */} + setConfirmingDisarm(false)} + statusBarTranslucent + > + + + + {ringing ? 'Disarm and end this alert?' : 'Delete this alert by disarming?'} + + + {ringing + ? 'Disarm stops the alarm for everyone and ends the alert. It cannot be triggered again.' + : 'Disarming deletes this alert for every subscriber — they will not be able to join again, and the QR code stops working.'} + +