feat(mobile): update notifications and more error handling added
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m24s
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 1m24s
This commit is contained in:
@@ -1,9 +1,47 @@
|
||||
import Constants from "expo-constants";
|
||||
import { Link } from "expo-router";
|
||||
import { Text, View } from "react-native";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
} from "../components/ui/card";
|
||||
import { Separator } from "../components/ui/separator";
|
||||
import { useServerStore } from "../hooks/useServerCheck";
|
||||
|
||||
export default function blocked() {
|
||||
export default function Update() {
|
||||
const version = Constants.expoConfig?.version;
|
||||
const build = Constants.expoConfig?.android?.versionCode ?? 1;
|
||||
const server = useServerStore((s) => s.serverVersion);
|
||||
return (
|
||||
<View>
|
||||
<Text>Blocked</Text>
|
||||
<View className="flex-1 mt-5 p-5">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<Text className="text-center underline">Update Required</Text>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Text>Your app is out of date and needs to be updated</Text>
|
||||
<Separator className="mt-5 mb-5" />
|
||||
<Text>
|
||||
App version - v{version}-{build}
|
||||
</Text>
|
||||
<Text>
|
||||
Server version - v{server?.versionName}-{server?.versionCode}
|
||||
</Text>
|
||||
<Separator className="mt-5 mb-5" />
|
||||
<Text>
|
||||
To update the app please head go to a computer and open LST.
|
||||
</Text>
|
||||
<Text>Then head to Scan.</Text>
|
||||
<Text>Click update Then follow the instructions on screen</Text>
|
||||
</CardContent>
|
||||
</Card>
|
||||
{server && server?.versionCode >= build && (
|
||||
<Link href={"/"}>
|
||||
<Text className="text-center underline">Home</Text>
|
||||
</Link>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user