mobile v0.1 with deployment for ios (#191)
* stage 1: project init * stage 2: skeleton with navigation * step 2.5: streams list * step 4: stream playback experience * step 5-6: compose experience * fix: broken record * transcode media particles to mp4 * build: reproducible go generate * build: rename skaffold module for particle processor worker * infra: increase particle processor worker resources Was dealing with OOM errors * tweaks to mobile * log transcode work * view on desktop placeholder * tweak padding * cap video resolution to save on memory * infra: bump memory limits as insurance * ux improvements * update bundle id for mobile * config for mobile
This commit was merged in pull request #191.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
||||
import { ActivityIndicator, View } from "react-native";
|
||||
import { useAuthStore } from "@/stores/auth-store";
|
||||
import { SignInScreen } from "@/features/auth/SignInScreen";
|
||||
import { NetworkListScreen } from "@/features/networks/NetworkListScreen";
|
||||
import { StreamListScreen } from "@/features/streams/StreamListScreen";
|
||||
import { NewStreamScreen } from "@/features/streams/NewStreamScreen";
|
||||
import { StreamViewScreen } from "@/features/stream-view/StreamViewScreen";
|
||||
import { SettingsScreen } from "@/features/settings/SettingsScreen";
|
||||
import { AccountScreen } from "@/features/settings/AccountScreen";
|
||||
import type { RootStackParamList } from "./types";
|
||||
|
||||
const Stack = createNativeStackNavigator<RootStackParamList>();
|
||||
|
||||
export function RootNavigator() {
|
||||
const status = useAuthStore((s) => s.status);
|
||||
|
||||
if (status === "idle" || status === "restoring") {
|
||||
return (
|
||||
<View className="flex-1 items-center justify-center bg-background">
|
||||
<ActivityIndicator />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
if (status === "unauthenticated") {
|
||||
return (
|
||||
<Stack.Navigator screenOptions={{ headerShown: false }}>
|
||||
<Stack.Screen name="SignIn" component={SignInScreen} />
|
||||
</Stack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack.Navigator
|
||||
initialRouteName="NetworkList"
|
||||
screenOptions={{ headerShown: false }}
|
||||
>
|
||||
<Stack.Screen name="NetworkList" component={NetworkListScreen} />
|
||||
<Stack.Screen name="StreamList" component={StreamListScreen} />
|
||||
<Stack.Screen
|
||||
name="StreamView"
|
||||
component={StreamViewScreen}
|
||||
options={{ animation: "fade", gestureEnabled: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="NewStream"
|
||||
component={NewStreamScreen}
|
||||
options={{ animation: "slide_from_bottom" }}
|
||||
/>
|
||||
<Stack.Screen name="Settings" component={SettingsScreen} />
|
||||
<Stack.Screen name="Account" component={AccountScreen} />
|
||||
</Stack.Navigator>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import type { NativeStackScreenProps } from "@react-navigation/native-stack";
|
||||
|
||||
// Pure stack model from PRD §5. Drawer affordance lives inside the
|
||||
// NetworkList screen itself, not the navigator — see Drawer.tsx.
|
||||
export type RootStackParamList = {
|
||||
SignIn: undefined;
|
||||
NetworkList: undefined;
|
||||
StreamList: { networkId: string };
|
||||
StreamView: { networkId: string; streamId: string };
|
||||
NewStream: { networkId: string };
|
||||
Settings: undefined;
|
||||
Account: undefined;
|
||||
};
|
||||
|
||||
export type RootStackScreenProps<T extends keyof RootStackParamList> =
|
||||
NativeStackScreenProps<RootStackParamList, T>;
|
||||
|
||||
declare global {
|
||||
namespace ReactNavigation {
|
||||
interface RootParamList extends RootStackParamList {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user