feat(intial auth): intial auth setup for the scanner
Some checks failed
Build and Push LST Docker Image / docker (push) Has been cancelled

This commit is contained in:
2026-05-05 19:48:36 -05:00
parent 4e0cf8c54c
commit cd13360cfb
46 changed files with 7847 additions and 206 deletions

View File

@@ -0,0 +1,28 @@
import { create } from "zustand";
type MobileUser = {
id: string;
name: string;
role: "user" | "lead" | "manager" | "admin";
excludedCommand: string[];
};
type AuthState = {
user: MobileUser | null;
isUnlocked: boolean;
setUser: (user: MobileUser) => void;
lock: () => void;
logout: () => void;
};
export const useMobileAuthStore = create<AuthState>((set) => ({
user: null,
isUnlocked: false,
setUser: (user) => set({ user, isUnlocked: true }),
lock: () => set({ isUnlocked: false }),
logout: () => set({ user: null, isUnlocked: false }),
}));