From 796674bca4cf8d8e374d2194e0003cbea2f81ec3 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 3 Aug 2026 22:10:42 +0000 Subject: [PATCH] =?UTF-8?q?v0.4.1:=20check-in=20=E2=80=94=20one=20tap=20fo?= =?UTF-8?q?r=20a=20labeled=20zone,=20picker=20only=20when=20unlabeled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A zone labeled free_2h/3h/4h checks in straight at that limit (no prompt); an unlabeled zone shows the 2h/3h/4h picker; pay-immediate zones show no check-in. Co-Authored-By: Claude Opus 4.8 (1M context) --- app/app.json | 4 ++-- app/src/screens/MeterDetailScreen.tsx | 26 +++++++++++++++----------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/app.json b/app/app.json index 5215ecc..9738ac2 100644 --- a/app/app.json +++ b/app/app.json @@ -3,14 +3,14 @@ "name": "BigBrainParking", "slug": "bigbrainparking", "scheme": "bigbrainparking", - "version": "0.4.0", + "version": "0.4.1", "orientation": "portrait", "userInterfaceStyle": "automatic", "newArchEnabled": true, "icon": "./assets/icon.png", "android": { "package": "top.mowden.bigbrainparking", - "versionCode": 18, + "versionCode": 19, "edgeToEdgeEnabled": true, "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", diff --git a/app/src/screens/MeterDetailScreen.tsx b/app/src/screens/MeterDetailScreen.tsx index 39e8494..f5d3fec 100644 --- a/app/src/screens/MeterDetailScreen.tsx +++ b/app/src/screens/MeterDetailScreen.tsx @@ -159,12 +159,16 @@ export function MeterDetailScreen() { navigation.navigate('StartSession', { zone: z }); }; - // Always available — pick a duration (defaults to the labeled limit if any). + // Labeled free zone → check in straight at its known limit. Unlabeled → pick. const onCheckin = () => { + if (labeledHours) { + void doCheckin(labeledHours); + return; + } Alert.alert('Free check-in', 'Start a local timer for the free limit here:', [ - { text: labeledHours === 2 ? '2 hours ✓' : '2 hours', onPress: () => doCheckin(2) }, - { text: labeledHours === 3 ? '3 hours ✓' : '3 hours', onPress: () => doCheckin(3) }, - { text: labeledHours === 4 ? '4 hours ✓' : '4 hours', onPress: () => doCheckin(4) }, + { text: '2 hours', onPress: () => doCheckin(2) }, + { text: '3 hours', onPress: () => doCheckin(3) }, + { text: '4 hours', onPress: () => doCheckin(4) }, { text: 'Cancel', style: 'cancel' }, ]); }; @@ -280,15 +284,15 @@ export function MeterDetailScreen() { - - - {labeledHours ? `Check in (free · ${labeledHours}h)` : 'Check in (free timer)'} - - - {label?.kind === 'pay_immediate' ? ( Pay immediately — no free window here. - ) : null} + ) : ( + + + {labeledHours ? `Check in (free · ${labeledHours}h)` : 'Check in (free timer)'} + + + )}