v0.4.1: check-in — one tap for a labeled zone, picker only when unlabeled
All checks were successful
build-apk / build (push) Successful in 32m30s

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) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-03 22:10:42 +00:00
parent 4a5660e7e1
commit 796674bca4
2 changed files with 17 additions and 13 deletions

View file

@ -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",

View file

@ -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() {
</Text>
</TouchableOpacity>
{label?.kind === 'pay_immediate' ? (
<Text style={[styles.note, { color: colors.subtext }]}>Pay immediately no free window here.</Text>
) : (
<TouchableOpacity style={[styles.button, { backgroundColor: '#1b5e20' }]} onPress={onCheckin}>
<Text style={[styles.buttonText, { color: '#fff' }]}>
{labeledHours ? `Check in (free · ${labeledHours}h)` : 'Check in (free timer)'}
</Text>
</TouchableOpacity>
{label?.kind === 'pay_immediate' ? (
<Text style={[styles.note, { color: colors.subtext }]}>Pay immediately no free window here.</Text>
) : null}
)}
<TouchableOpacity style={[styles.button, { backgroundColor: colors.card }]} onPress={onPay}>
<Text style={[styles.buttonText, { color: colors.text }]}>