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 Toast from "react-native-toast-message";
import useDeviceLock from "../hooks/useDeviceCheck";
import { connectSocket } from "../lib/socket.io";
import { zebraScanner } from "../lib/ZebraScanner";
export default function RootLayout() {
useDeviceLock();
useEffect(() => {
zebraScanner.ensureProfile();
connectSocket();
}, []);
return (

View File

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

View File

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