fix(mobile): ui over lapping
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 3m1s

the ui elements would over lap and cause visual issues with the scanning and seeing the old labels

closes #25
This commit is contained in:
2026-05-27 20:57:49 -05:00
parent bcdf9566bc
commit db28635c8c
9 changed files with 5290 additions and 39 deletions

View File

@@ -0,0 +1,3 @@
export default function LogoutScreen() {
return null;
}

View File

@@ -5,12 +5,15 @@ import "../../global.css";
import { useEffect } from "react"; import { useEffect } from "react";
import Toast from "react-native-toast-message"; import Toast from "react-native-toast-message";
import useDeviceLock from "../hooks/useDeviceCheck"; import useDeviceLock from "../hooks/useDeviceCheck";
import { connectSocket } from "../lib/socket.io";
import { zebraScanner } from "../lib/ZebraScanner"; import { zebraScanner } from "../lib/ZebraScanner";
export default function RootLayout() { export default function RootLayout() {
useDeviceLock(); useDeviceLock();
useEffect(() => { useEffect(() => {
zebraScanner.ensureProfile(); zebraScanner.ensureProfile();
connectSocket();
}, []); }, []);
return ( return (

View File

@@ -182,14 +182,17 @@ export default function LSTScanner() {
}, [handleScan]), }, [handleScan]),
); );
return ( return (
<View className={`${bgColor ?? ""} flex-1 w-screen`}> <View className={`${bgColor ?? ""} flex-1 w-full`}>
<View style={{ alignItems: "center", margin: 5 }}> <View className="flex gap-2 items-center">
<View className="flex flex-col gap-2 items-center">
<Text style={{ fontSize: 14, fontWeight: "600" }}> <Text style={{ fontSize: 14, fontWeight: "600" }}>
User: {formatName(user?.name ?? "")} Lst user: {formatName(user?.name ?? "")}
</Text> </Text>
<Text style={{ fontSize: 18, fontWeight: "600" }}> {/* <Text style={{ fontSize: 14, fontWeight: "600" }}>
LST Scanner id: {user?.scannerId} LST Scanner id: {user?.scannerId}
</Text> </Text> */}
</View>
<View <View
style={{ style={{
marginTop: 5, marginTop: 5,
@@ -197,8 +200,8 @@ export default function LSTScanner() {
}} }}
> >
{!lastScan ? ( {!lastScan ? (
<View style={{ marginTop: 10, alignItems: "center" }}> <View style={{ marginTop: 2, alignItems: "center" }}>
<Text className="text-xl font-bold">Ready to scan</Text> <Text className="text-lg font-bold">Ready to scan</Text>
<Text>Please Scan a command to start scanning...</Text> <Text>Please Scan a command to start scanning...</Text>
<Text className="text-sm"> <Text className="text-sm">
Scanning a label could cause errors due to incorrect previous Scanning a label could cause errors due to incorrect previous
@@ -208,7 +211,7 @@ export default function LSTScanner() {
) : ( ) : (
<View <View
style={{ style={{
marginTop: 10, marginTop: 2,
alignItems: "center", alignItems: "center",
}} }}
> >
@@ -217,10 +220,10 @@ export default function LSTScanner() {
.map((i) => { .map((i) => {
return ( return (
<View <View
style={{ marginTop: 10, alignItems: "center" }} style={{ marginTop: 2, alignItems: "center" }}
key={i} key={i}
> >
<Text style={{ fontSize: 18, fontWeight: "600" }}> <Text style={{ fontSize: 12, fontWeight: "600" }}>
{i} {i}
</Text> </Text>
</View> </View>
@@ -237,18 +240,17 @@ export default function LSTScanner() {
color={bgColor} color={bgColor}
clearScan={clearScans} clearScan={clearScans}
/> />
<GlobalFooter />
</View> </View>
<View className="m-2"> {/* <View className="m-2">
{user && ( {user && (
<View className="items-center"> <View className="items-center">
<Button title="Logout" onPress={logoutScanner} /> <Button title="Logout" onPress={logoutScanner} />
</View> </View>
)} )}
</View> </View> */}
<View> {/* <View style={{ maxHeight: 75 }} className="flex-1 bg-slate-500"></View> */}
<GlobalFooter />
</View>
</View> </View>
); );
} }

View File

@@ -13,28 +13,30 @@ export function GlobalFooter() {
if (serverVersion && serverVersion?.versionCode <= build) return; if (serverVersion && serverVersion?.versionCode <= build) return;
return ( return (
<View> <View>
<View> {(hasUpdate || shouldUpdate) && (
<View className="bg-slate-500">
{hasUpdate && ( {hasUpdate && (
<View className="items-center h-[75px] bg-[#EB091A]"> <View className="items-center h-[75px] bg-[#EB091A] justify-center">
<Link href={"/updateScreen"}> <Link href="/updateScreen">
<Text className="h-[75px] font-medium text-base text-wrap text-center"> <Text className="font-medium text-base text-center">
Critical updates pending, once you are completed with your task Critical updates pending, once you are completed with your
please click me for instructions to update task please click me for instructions to update
</Text> </Text>
</Link> </Link>
</View> </View>
)} )}
{!hasUpdate && shouldUpdate && ( {!hasUpdate && shouldUpdate && (
<View className="bg-[#FDBA74]"> <View className="bg-[#FDBA74] py-2 items-center">
<Link href={"/updateScreen"}> <Link href="/updateScreen">
<Text className="h-[16] font-medium text-base text-wrap text-center"> <Text className="font-medium text-base text-center">
There is an update click me for instructions There is an update click me for instructions
</Text> </Text>
</Link> </Link>
</View> </View>
)} )}
</View> </View>
)}
</View> </View>
); );
} }

View File

@@ -0,0 +1,14 @@
CREATE TABLE "dock_door_scanners" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"ip" text NOT NULL,
"name" text,
"dock_id" text,
"dock_name" text NOT NULL,
"active" boolean DEFAULT true,
"current_loading_order" text DEFAULT '',
"add_date" timestamp DEFAULT now(),
"add_user" text DEFAULT 'lst-system',
"upd_date" timestamp DEFAULT now(),
"upd_user" text DEFAULT 'lst-system',
CONSTRAINT "dock_door_scanners_name_unique" UNIQUE("name")
);

View File

@@ -0,0 +1 @@
ALTER TABLE "dock_door_scanners" DROP COLUMN "dock_name";

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -400,6 +400,20 @@
"when": 1779454561527, "when": 1779454561527,
"tag": "0056_shallow_chimera", "tag": "0056_shallow_chimera",
"breakpoints": true "breakpoints": true
},
{
"idx": 57,
"version": "7",
"when": 1779843750556,
"tag": "0057_worthless_trish_tilby",
"breakpoints": true
},
{
"idx": 58,
"version": "7",
"when": 1779846894283,
"tag": "0058_damp_donald_blake",
"breakpoints": true
} }
] ]
} }