diff --git a/app.json b/app.json index 59cb5497..71adc8e7 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "Streamyfin", "slug": "streamyfin", - "version": "0.6.0", + "version": "0.6.1", "orientation": "default", "icon": "./assets/images/icon.png", "scheme": "streamyfin", diff --git a/app/_layout.tsx b/app/_layout.tsx index 5a889ba7..785d1fe2 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -15,6 +15,7 @@ import { useJobProcessor } from "@/utils/atoms/queue"; import { JobQueueProvider } from "@/providers/JobQueueProvider"; import { useKeepAwake } from "expo-keep-awake"; import { useSettings } from "@/utils/atoms/settings"; +import { GestureHandlerRootView } from "react-native-gesture-handler"; // Prevent the splash screen from auto-hiding before asset loading is complete. SplashScreen.preventAutoHideAsync(); @@ -74,106 +75,108 @@ function Layout() { }, [settings]); return ( - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); } diff --git a/babel.config.js b/babel.config.js index dc4f6e15..98ac332d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,7 +1,7 @@ module.exports = function (api) { api.cache(true); return { - presets: ['babel-preset-expo'], - plugins: ["nativewind/babel"], + presets: ["babel-preset-expo"], + plugins: ["nativewind/babel", "react-native-reanimated/plugin"], }; }; diff --git a/bun.lockb b/bun.lockb index 78213683..e500cc50 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/common/ColumnItem.tsx b/components/common/ColumnItem.tsx new file mode 100644 index 00000000..bafd2f6a --- /dev/null +++ b/components/common/ColumnItem.tsx @@ -0,0 +1,34 @@ +import { StyleSheet, View, ViewProps } from "react-native"; + +const getItemStyle = (index: number, numColumns: number) => { + const alignItems = (() => { + if (numColumns < 2 || index % numColumns === 0) return "flex-start"; + if ((index + 1) % numColumns === 0) return "flex-end"; + + return "center"; + })(); + + return { + alignItems, + width: "100%", + } as const; +}; + +type ColumnItemProps = ViewProps & { + children: React.ReactNode; + index: number; + numColumns: number; +}; +export const ColumnItem = ({ + children, + index, + numColumns, + ...rest +}: ColumnItemProps) => ( + + {children} + +); diff --git a/components/common/TouchableItemRouter.tsx b/components/common/TouchableItemRouter.tsx new file mode 100644 index 00000000..9bd6a546 --- /dev/null +++ b/components/common/TouchableItemRouter.tsx @@ -0,0 +1,36 @@ +import { + TouchableOpacity, + TouchableOpacityProps, + View, + ViewProps, +} from "react-native"; +import { Text } from "@/components/common/Text"; +import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models"; +import { PropsWithChildren } from "react"; +import { useRouter } from "expo-router"; + +interface Props extends TouchableOpacityProps { + item: BaseItemDto; +} + +export const TouchableItemRouter: React.FC> = ({ + item, + children, + ...props +}) => { + const router = useRouter(); + return ( + { + if (item.Type === "Series") router.push(`/series/${item.Id}`); + if (item.Type === "Episode") router.push(`/items/${item.Id}`); + if (item.Type === "MusicAlbum") router.push(`/albums/${item.Id}`); + if (item.Type === "Movie") router.push(`/songs/${item.Id}`); + if (item.Type === "BoxSet") router.push(`/collections/${item.Id}`); + }} + {...props} + > + {children} + + ); +}; diff --git a/components/navigation/TabBarIcon.tsx b/components/navigation/TabBarIcon.tsx index b7302c3f..17c2ebed 100644 --- a/components/navigation/TabBarIcon.tsx +++ b/components/navigation/TabBarIcon.tsx @@ -1,9 +1,12 @@ // You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/ -import Ionicons from '@expo/vector-icons/Ionicons'; -import { type IconProps } from '@expo/vector-icons/build/createIconSet'; -import { type ComponentProps } from 'react'; +import Ionicons from "@expo/vector-icons/Ionicons"; +import { type IconProps } from "@expo/vector-icons/build/createIconSet"; +import { type ComponentProps } from "react"; -export function TabBarIcon({ style, ...rest }: IconProps['name']>) { - return ; +export function TabBarIcon({ + style, + ...rest +}: IconProps["name"]>) { + return ; } diff --git a/eas.json b/eas.json index f7494f3d..77e272b3 100644 --- a/eas.json +++ b/eas.json @@ -21,13 +21,13 @@ } }, "production": { - "channel": "0.6.0", + "channel": "0.6.1", "android": { "image": "latest" } }, "production-apk": { - "channel": "0.6.0", + "channel": "0.6.1", "android": { "buildType": "apk", "image": "latest" diff --git a/package.json b/package.json index 1abc2565..cf2270c8 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@react-native-community/netinfo": "11.3.1", "@react-native-menu/menu": "^1.1.2", "@react-navigation/native": "^6.0.2", + "@shopify/flash-list": "1.6.4", "@tanstack/react-query": "^5.51.16", "@types/uuid": "^10.0.0", "axios": "^1.7.3", @@ -31,7 +32,7 @@ "expo-blur": "~13.0.2", "expo-build-properties": "~0.12.5", "expo-constants": "~16.0.2", - "expo-dev-client": "~4.0.22", + "expo-dev-client": "~4.0.23", "expo-device": "~6.0.2", "expo-font": "~12.0.9", "expo-haptics": "~13.0.1", @@ -61,6 +62,7 @@ "react-native-ios-context-menu": "^2.5.1", "react-native-ios-utilities": "^4.4.5", "react-native-reanimated": "~3.10.1", + "react-native-reanimated-carousel": "4.0.0-alpha.12", "react-native-safe-area-context": "4.10.5", "react-native-screens": "3.31.1", "react-native-svg": "15.2.0",