Initial Camp Scan ticketing system
Backend (Fastify + TS): FluentForms webhook -> NocoDB row + QR + MailerSend email; PIN auth; scan/lookup/redeem with per-code serialization; reusable QR codes with count-based check-in; admin search. App (Expo, one codebase): Android APK + iPhone PWA. Login, camera scanner (native + web barcode-detector split), green/red overlay with sound + haptics, admin lookup/redeem. Session token persisted per device. Ops: multi-stage Dockerfile serving API + PWA same-origin, compose bound to 127.0.0.1; Forgejo Actions runner + tag-triggered signed APK build for Obtainium. Docs in README.md and INSTALL.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
commit
3397e3e3ec
60 changed files with 14703 additions and 0 deletions
32
app/components/ResultOverlay.tsx
Normal file
32
app/components/ResultOverlay.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { ReactNode } from "react";
|
||||
import { StyleSheet, View, Pressable } from "react-native";
|
||||
import { theme } from "../lib/theme";
|
||||
|
||||
export type OverlayStatus = "success" | "error" | "neutral";
|
||||
|
||||
const BG: Record<OverlayStatus, string> = {
|
||||
success: theme.success,
|
||||
error: theme.danger,
|
||||
neutral: theme.card,
|
||||
};
|
||||
|
||||
export default function ResultOverlay({
|
||||
status,
|
||||
onDismiss,
|
||||
children,
|
||||
}: {
|
||||
status: OverlayStatus;
|
||||
onDismiss?: () => void;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<Pressable style={[styles.fill, { backgroundColor: BG[status] }]} onPress={onDismiss}>
|
||||
<View style={styles.inner}>{children}</View>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
fill: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, zIndex: 10 },
|
||||
inner: { flex: 1, alignItems: "center", justifyContent: "center", padding: 24 },
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue