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
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:
parent
4a5660e7e1
commit
796674bca4
2 changed files with 17 additions and 13 deletions
|
|
@ -3,14 +3,14 @@
|
||||||
"name": "BigBrainParking",
|
"name": "BigBrainParking",
|
||||||
"slug": "bigbrainparking",
|
"slug": "bigbrainparking",
|
||||||
"scheme": "bigbrainparking",
|
"scheme": "bigbrainparking",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"userInterfaceStyle": "automatic",
|
"userInterfaceStyle": "automatic",
|
||||||
"newArchEnabled": true,
|
"newArchEnabled": true,
|
||||||
"icon": "./assets/icon.png",
|
"icon": "./assets/icon.png",
|
||||||
"android": {
|
"android": {
|
||||||
"package": "top.mowden.bigbrainparking",
|
"package": "top.mowden.bigbrainparking",
|
||||||
"versionCode": 18,
|
"versionCode": 19,
|
||||||
"edgeToEdgeEnabled": true,
|
"edgeToEdgeEnabled": true,
|
||||||
"adaptiveIcon": {
|
"adaptiveIcon": {
|
||||||
"foregroundImage": "./assets/adaptive-icon.png",
|
"foregroundImage": "./assets/adaptive-icon.png",
|
||||||
|
|
|
||||||
|
|
@ -159,12 +159,16 @@ export function MeterDetailScreen() {
|
||||||
navigation.navigate('StartSession', { zone: z });
|
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 = () => {
|
const onCheckin = () => {
|
||||||
|
if (labeledHours) {
|
||||||
|
void doCheckin(labeledHours);
|
||||||
|
return;
|
||||||
|
}
|
||||||
Alert.alert('Free check-in', 'Start a local timer for the free limit here:', [
|
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: '2 hours', onPress: () => doCheckin(2) },
|
||||||
{ text: labeledHours === 3 ? '3 hours ✓' : '3 hours', onPress: () => doCheckin(3) },
|
{ text: '3 hours', onPress: () => doCheckin(3) },
|
||||||
{ text: labeledHours === 4 ? '4 hours ✓' : '4 hours', onPress: () => doCheckin(4) },
|
{ text: '4 hours', onPress: () => doCheckin(4) },
|
||||||
{ text: 'Cancel', style: 'cancel' },
|
{ text: 'Cancel', style: 'cancel' },
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
@ -280,15 +284,15 @@ export function MeterDetailScreen() {
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</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}>
|
<TouchableOpacity style={[styles.button, { backgroundColor: '#1b5e20' }]} onPress={onCheckin}>
|
||||||
<Text style={[styles.buttonText, { color: '#fff' }]}>
|
<Text style={[styles.buttonText, { color: '#fff' }]}>
|
||||||
{labeledHours ? `Check in (free · ${labeledHours}h)` : 'Check in (free timer)'}
|
{labeledHours ? `Check in (free · ${labeledHours}h)` : 'Check in (free timer)'}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</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}>
|
<TouchableOpacity style={[styles.button, { backgroundColor: colors.card }]} onPress={onPay}>
|
||||||
<Text style={[styles.buttonText, { color: colors.text }]}>
|
<Text style={[styles.buttonText, { color: colors.text }]}>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue