mobile: consistent dark theme as desktop
This commit is contained in:
@@ -31,7 +31,7 @@ export default function App() {
|
||||
<RootNavigator />
|
||||
</NavigationContainer>
|
||||
<Toaster />
|
||||
<StatusBar style="auto" />
|
||||
<StatusBar style="light" />
|
||||
</SafeAreaProvider>
|
||||
</PusherProvider>
|
||||
</QueryClientProvider>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
|
||||
import { View } from "react-native";
|
||||
|
||||
/**
|
||||
* Inset hairline separator for edge-to-edge list rows. Pass to a FlatList
|
||||
* via `ItemSeparatorComponent` so it renders only between rows, not after
|
||||
* the last one. Mirrors desktop's <Separator className="mx-4" /> pattern.
|
||||
*/
|
||||
export function ListSeparator() {
|
||||
return <View className="bg-border mx-4 h-px" />;
|
||||
}
|
||||
@@ -13,6 +13,8 @@ import { useNetworks } from "@/hooks/use-networks";
|
||||
import { useAuthStore } from "@/stores/auth-store";
|
||||
import { toUserMessage } from "@/lib/errors";
|
||||
import type { RootStackScreenProps } from "@/navigation/types";
|
||||
import { FlowyLogo } from "@/components/FlowyLogo";
|
||||
import { ListSeparator } from "@/components/ListSeparator";
|
||||
import { Drawer } from "./Drawer";
|
||||
|
||||
export function NetworkListScreen({
|
||||
@@ -48,7 +50,7 @@ export function NetworkListScreen({
|
||||
{initials}
|
||||
</Text>
|
||||
</Pressable>
|
||||
<Text className="text-foreground text-base font-semibold">Flowy</Text>
|
||||
<FlowyLogo />
|
||||
<View className="w-9" />
|
||||
</View>
|
||||
|
||||
@@ -71,10 +73,10 @@ export function NetworkListScreen({
|
||||
<FlatList
|
||||
data={data}
|
||||
keyExtractor={(item) => item.id}
|
||||
contentContainerClassName="p-4 gap-2"
|
||||
refreshControl={
|
||||
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
|
||||
}
|
||||
ItemSeparatorComponent={ListSeparator}
|
||||
renderItem={({ item }) => (
|
||||
<NetworkCard
|
||||
network={item}
|
||||
@@ -106,10 +108,10 @@ function NetworkCard({
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
className="bg-card border-border active:bg-accent rounded-lg border px-4 py-4 flex-row items-center justify-between"
|
||||
className="active:bg-accent flex-row items-center justify-between px-4 py-4"
|
||||
>
|
||||
<View className="flex-1">
|
||||
<Text className="text-card-foreground text-base font-semibold">
|
||||
<Text className="text-foreground text-base font-semibold">
|
||||
{network.name}
|
||||
</Text>
|
||||
<Text className="text-muted-foreground text-sm">
|
||||
|
||||
@@ -96,10 +96,7 @@ export const StreamCard = memo(function StreamCard({
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
android_ripple={{ color: "rgba(0,0,0,0.05)" }}
|
||||
className={cn(
|
||||
"bg-card border-b px-3.5 py-3 flex-row items-center gap-3 active:bg-accent",
|
||||
isUnseen ? "border-primary" : "border-border",
|
||||
)}
|
||||
className="bg-card flex-row items-center gap-3 px-4 py-3 active:bg-accent"
|
||||
>
|
||||
<View
|
||||
className={cn(
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
View,
|
||||
} from "react-native";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import { ListSeparator } from "@/components/ListSeparator";
|
||||
import { toUserMessage } from "@/lib/errors";
|
||||
import { particlePath } from "@/lib/particle-path";
|
||||
import { useNetwork } from "@/hooks/use-networks";
|
||||
@@ -43,7 +44,7 @@ export function StreamListScreen({
|
||||
<FlatList
|
||||
data={streams}
|
||||
keyExtractor={(s) => s.id}
|
||||
contentContainerClassName=""
|
||||
ItemSeparatorComponent={ListSeparator}
|
||||
renderItem={({ item }) => (
|
||||
<StreamCard
|
||||
particle={item}
|
||||
|
||||
Reference in New Issue
Block a user