feat(mobile): auth added in
Some checks failed
Build and Push LST Docker Image / docker (push) Has been cancelled

This commit is contained in:
2026-05-06 05:07:16 -05:00
parent 2ad78e22f1
commit ba30281e59
23 changed files with 4875 additions and 176 deletions

View File

@@ -2,12 +2,13 @@ import { createAudioPlayer } from "expo-audio";
import * as Haptics from "expo-haptics";
export type ScanFeedback = {
type: "good" | "bad";
type: "good" | "bad" | "scan";
sound?: boolean;
vibrate?: boolean;
led?: boolean;
};
const scan = createAudioPlayer(require("../../assets/sounds/scan.wav"));
const goodSound = createAudioPlayer(require("../../assets/sounds/good.wav"));
const badSound = createAudioPlayer(require("../../assets/sounds/bad.wav"));
@@ -18,14 +19,15 @@ export async function scannerFeedback({
led = true,
}: ScanFeedback) {
if (sound) {
const player = type === "good" ? goodSound : badSound;
const player =
type === "scan" ? scan : type === "good" ? goodSound : badSound;
player.seekTo(0);
player.play();
}
if (vibrate) {
await Haptics.notificationAsync(
type === "good"
type === "good" || type === "scan"
? Haptics.NotificationFeedbackType.Success
: Haptics.NotificationFeedbackType.Error,
);