feat(mobile): shadcn like and tailwind added to make things look yummy
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m21s
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m21s
This commit is contained in:
@@ -1,19 +1,39 @@
|
||||
import { Tabs } from "expo-router";
|
||||
import { Home, Settings } from "lucide-react-native";
|
||||
import { useAppStore } from "../../hooks/useAppStore";
|
||||
|
||||
export default function TabsLayout() {
|
||||
const serverPort = useAppStore((s) => s.serverPort);
|
||||
return (
|
||||
<Tabs
|
||||
screenOptions={{
|
||||
headerShown: false, // Hides the header for all screens in this navigator
|
||||
}}>
|
||||
<Tabs.Screen name="scanner" options={{ title: "Scan" }} />
|
||||
<Tabs.Screen name="config" options={{ title: "settings" }} />
|
||||
<Tabs.Screen name="logs" options={{ title: "Logs",
|
||||
href: parseInt(serverPort || "0", 10) >= 50000 ? null : "/(tabs)/logs",
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
const serverPort = useAppStore((s) => s.serverPort);
|
||||
return (
|
||||
<Tabs
|
||||
screenOptions={{
|
||||
headerShown: false, // Hides the header for all screens in this navigator
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen
|
||||
name="scanner"
|
||||
options={{
|
||||
title: "Scan",
|
||||
tabBarIcon: ({ color, size }) => <Home size={size} color={color} />,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="config"
|
||||
options={{
|
||||
title: "settings",
|
||||
tabBarIcon: ({ color, size }) => (
|
||||
<Settings size={size} color={color} />
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="logs"
|
||||
options={{
|
||||
title: "Logs",
|
||||
href:
|
||||
parseInt(serverPort || "0", 10) >= 50000 ? null : "/(tabs)/logs",
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Stack } from "expo-router";
|
||||
import { StatusBar } from "expo-status-bar";
|
||||
import "../../global.css";
|
||||
import { PortalHost } from "@rn-primitives/portal";
|
||||
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
@@ -9,6 +11,7 @@ export default function RootLayout() {
|
||||
<Stack.Screen name="index" />
|
||||
{/* <Stack.Screen name="(tabs)" /> */}
|
||||
</Stack>
|
||||
<PortalHost />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,17 +42,17 @@ export default function Index() {
|
||||
);
|
||||
await devDelay(1500);
|
||||
//router.replace("/scanner");
|
||||
setReady(true)
|
||||
setReady(true);
|
||||
return;
|
||||
}
|
||||
|
||||
setMessage(<Text>Checking for updates</Text>)
|
||||
await devDelay(1500)
|
||||
setMessage(<Text>Checking for updates</Text>);
|
||||
await devDelay(1500);
|
||||
// TODO if theres an update go to update screen message :D
|
||||
setMessage(<Text>Opening LST scan app</Text>);
|
||||
await devDelay(3250);
|
||||
//router.replace("/scanner");
|
||||
setReady(true)
|
||||
setReady(true);
|
||||
} catch (error) {
|
||||
console.log("Startup error", error);
|
||||
setMessage(<Text>Something went wrong during startup.</Text>);
|
||||
@@ -62,9 +62,9 @@ export default function Index() {
|
||||
startup();
|
||||
}, [hasHydrated, hasValidSetup, serverPort, router]);
|
||||
|
||||
if (ready) {
|
||||
return <Redirect href="/(tabs)/scanner" />;
|
||||
}
|
||||
if (ready) {
|
||||
return <Redirect href="/(tabs)/scanner" />;
|
||||
}
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user