The best way to control Claude Code, Codex and more from any computer or phone

main
tsx 36 lines 1.43 KB
Raw
1 import { StatusBar, View } from "react-native";
2 import { useSafeAreaInsets } from "react-native-safe-area-context";
3 import { AppActivityIndicator } from "./ui/AppActivityIndicator";
4 import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
5
6 import { AppText as Text } from "./ui/AppText";
7 import { BrandMark } from "./BrandMark";
8
9 export function LoadingScreen(props: {
10 readonly message: string;
11 readonly embedded?: boolean;
12 readonly messagePlacement?: "above-spinner" | "below-spinner";
13 }) {
14 const { themeAppearance: colorScheme } = useAppearancePreferences();
15 const insets = useSafeAreaInsets();
16 const messagePlacement = props.messagePlacement ?? "below-spinner";
17
18 return (
19 <View
20 className={props.embedded ? "flex-1" : "flex-1 bg-screen"}
21 style={{ paddingTop: props.embedded ? 0 : insets.top }}
22 >
23 <StatusBar barStyle={colorScheme === "dark" ? "light-content" : "dark-content"} />
24 <View className="flex-1 items-center justify-center gap-5 px-6">
25 <BrandMark compact />
26 {messagePlacement === "above-spinner" ? (
27 <Text className="font-t3-bold text-lg text-foreground">{props.message}</Text>
28 ) : null}
29 <AppActivityIndicator size="large" />
30 {messagePlacement === "below-spinner" ? (
31 <Text className="font-t3-bold text-lg text-foreground">{props.message}</Text>
32 ) : null}
33 </View>
34 </View>
35 );
36 }