This commit is contained in:
Fredrik Burmester
2025-11-14 20:05:39 +01:00
parent 2be78a232c
commit e6dd433821
46 changed files with 187 additions and 270 deletions

View File

@@ -353,7 +353,7 @@ export const DownloadItems: React.FC<DownloadProps> = ({
keyboardBlurBehavior='restore'
>
<BottomSheetView>
<View className='flex flex-col space-y-4 px-4 pb-8 pt-2'>
<View className='flex flex-col gap-y-4 px-4 pb-8 pt-2'>
<View>
<Text className='font-bold text-2xl text-neutral-100'>
{title}
@@ -365,7 +365,7 @@ export const DownloadItems: React.FC<DownloadProps> = ({
})}
</Text>
</View>
<View className='flex flex-col space-y-2 w-full'>
<View className='flex flex-col gap-y-2 w-full'>
<View className='items-start'>
<BitrateSelector
inverted
@@ -404,7 +404,7 @@ export const DownloadItems: React.FC<DownloadProps> = ({
/>
</View>
{selectedOptions?.mediaSource && (
<View className='flex flex-col space-y-2 items-start'>
<View className='flex flex-col gap-y-2 items-start'>
<AudioTrackSelector
source={selectedOptions.mediaSource}
onChange={(val) => {

View File

@@ -124,10 +124,10 @@ export const ItemContent: React.FC<ItemContentProps> = React.memo(
)}
</View>
) : (
<View className='flex flex-row items-center space-x-2'>
<View className='flex flex-row items-center gap-x-2'>
<Chromecast.Chromecast width={22} height={22} />
{item.Type !== "Program" && (
<View className='flex flex-row items-center space-x-2'>
<View className='flex flex-row items-center gap-x-2'>
{!Platform.isTV && (
<DownloadSingleItem item={item} size='large' />
)}
@@ -201,7 +201,7 @@ export const ItemContent: React.FC<ItemContentProps> = React.memo(
}
>
<View className='flex flex-col bg-transparent shrink'>
<View className='flex flex-col px-4 w-full space-y-2 pt-2 mb-2 shrink'>
<View className='flex flex-col px-4 w-full gap-y-2 pt-2 mb-2 shrink'>
<ItemHeader item={item} className='mb-2' />
{item.Type !== "Program" && !Platform.isTV && !isOffline && (
<View className='flex flex-row items-center justify-start w-full h-16 mb-2'>

View File

@@ -15,7 +15,7 @@ export const ItemHeader: React.FC<Props> = ({ item, ...props }) => {
if (!item)
return (
<View
className='flex flex-col space-y-1.5 w-full items-start h-32'
className='flex flex-col gap-y-1.5 w-full items-start h-32'
{...props}
>
<View className='w-1/3 h-6 bg-neutral-900 rounded' />

View File

@@ -29,7 +29,7 @@ export const ItemTechnicalDetails: React.FC<Props> = ({ source }) => {
<View className='px-4 mt-2 mb-4'>
<Text className='text-lg font-bold mb-4'>{t("item_card.video")}</Text>
<TouchableOpacity onPress={() => bottomSheetModalRef.current?.present()}>
<View className='flex flex-row space-x-2'>
<View className='flex flex-row gap-x-2'>
<VideoStreamInfo source={source} />
</View>
<Text className='text-purple-600'>{t("item_card.more_details")}</Text>
@@ -52,12 +52,12 @@ export const ItemTechnicalDetails: React.FC<Props> = ({ source }) => {
)}
>
<BottomSheetScrollView>
<View className='flex flex-col space-y-2 p-4 mb-4'>
<View className='flex flex-col gap-y-2 p-4 mb-4'>
<View>
<Text className='text-lg font-bold mb-4'>
{t("item_card.video")}
</Text>
<View className='flex flex-row space-x-2'>
<View className='flex flex-row gap-x-2'>
<VideoStreamInfo source={source} />
</View>
</View>

View File

@@ -377,7 +377,7 @@ export const PlayButton: React.FC<Props> = ({
// color={effectiveColors.primary}
// modifiers={[fixedSize()]}
// >
// <View className='flex flex-row items-center space-x-2 h-full w-full justify-center -mb-3.5 '>
// <View className='flex flex-row items-center gap-x-2 h-full w-full justify-center -mb-3.5 '>
// <Animated.Text style={[animatedTextStyle, { fontWeight: "bold" }]}>
// {runtimeTicksToMinutes(
// (item?.RunTimeTicks || 0) -
@@ -440,7 +440,7 @@ export const PlayButton: React.FC<Props> = ({
}}
className='flex flex-row items-center justify-center bg-transparent rounded-full z-20 h-12 w-full '
>
<View className='flex flex-row items-center space-x-2'>
<View className='flex flex-row items-center gap-x-2'>
<Animated.Text style={[animatedTextStyle, { fontWeight: "bold" }]}>
{runtimeTicksToMinutes(
(item?.RunTimeTicks || 0) -

View File

@@ -200,7 +200,7 @@ export const PlayButton: React.FC<Props> = ({
}}
className='flex flex-row items-center justify-center bg-transparent rounded-xl z-20 h-12 w-full '
>
<View className='flex flex-row items-center space-x-2'>
<View className='flex flex-row items-center gap-x-2'>
<Animated.Text style={[animatedTextStyle, { fontWeight: "bold" }]}>
{runtimeTicksToMinutes(item?.RunTimeTicks)}
</Animated.Text>

View File

@@ -21,7 +21,7 @@ interface Props extends ViewProps {
export const Ratings: React.FC<Props> = ({ item, ...props }) => {
if (!item) return null;
return (
<View className='flex flex-row items-center mt-2 space-x-2' {...props}>
<View className='flex flex-row items-center mt-2 gap-x-2' {...props}>
{item.OfficialRating && (
<Badge text={item.OfficialRating} variant='gray' />
)}
@@ -79,7 +79,7 @@ export const JellyserrRatings: React.FC<{
!!result.voteCount ||
(data?.criticsRating && !!data?.criticsScore) ||
(data?.audienceRating && !!data?.audienceScore)) && (
<View className='flex flex-row flex-wrap space-x-1'>
<View className='flex flex-row flex-wrap gap-x-1'>
{data?.criticsRating && !!data?.criticsScore && (
<Badge
text={`${data.criticsScore}%`}

View File

@@ -1,54 +0,0 @@
import { StyleSheet, Text, type TextProps } from "react-native";
export type ThemedTextProps = TextProps & {
lightColor?: string;
darkColor?: string;
type?: "default" | "title" | "defaultSemiBold" | "subtitle" | "link";
};
export function ThemedText({
style,
type = "default",
...rest
}: ThemedTextProps) {
return (
<Text
style={[
{ color: "white" },
type === "default" ? styles.default : undefined,
type === "title" ? styles.title : undefined,
type === "defaultSemiBold" ? styles.defaultSemiBold : undefined,
type === "subtitle" ? styles.subtitle : undefined,
type === "link" ? styles.link : undefined,
style,
]}
{...rest}
/>
);
}
const styles = StyleSheet.create({
default: {
fontSize: 16,
lineHeight: 24,
},
defaultSemiBold: {
fontSize: 16,
lineHeight: 24,
fontWeight: "600",
},
title: {
fontSize: 32,
fontWeight: "bold",
lineHeight: 32,
},
subtitle: {
fontSize: 20,
fontWeight: "bold",
},
link: {
lineHeight: 30,
fontSize: 16,
color: "#0a7ea4",
},
});

View File

@@ -1,15 +0,0 @@
import { View, type ViewProps } from "react-native";
export type ThemedViewProps = ViewProps & {
lightColor?: string;
darkColor?: string;
};
export function ThemedView({
style,
lightColor,
darkColor,
...otherProps
}: ThemedViewProps) {
return <View style={[{ backgroundColor: "black" }, style]} {...otherProps} />;
}

View File

@@ -1,20 +1,16 @@
import { Platform, Text as RNText, type TextProps } from "react-native";
export function Text(props: TextProps) {
const { style, ...otherProps } = props;
export function Text({ className, ...props }: TextProps) {
if (Platform.isTV)
return (
<RNText
allowFontScaling={false}
style={[{ color: "white" }, style]}
{...otherProps}
/>
<RNText allowFontScaling={false} style={{ color: "white" }} {...props} />
);
return (
<RNText
allowFontScaling={false}
style={[{ color: "white" }, style]}
{...otherProps}
className={`text-white ${className}`}
{...props}
/>
);
}

View File

@@ -51,7 +51,7 @@ export const FilterButton = <T,>({
>
<View
className={`
px-3 py-1.5 rounded-full flex flex-row items-center space-x-1
px-3 py-1.5 rounded-full flex flex-row items-center gap-x-1
${
values.length > 0
? "bg-purple-600 border border-purple-700"

View File

@@ -76,10 +76,6 @@ export const Home = () => {
const invalidateCache = useInvalidatePlaybackProgressCache();
const [scrollY, setScrollY] = useState(0);
useEffect(() => {
console.log("scrollY", scrollY);
}, [scrollY]);
useEffect(() => {
if (isConnected && !prevIsConnected.current) {
invalidateCache();
@@ -101,19 +97,20 @@ export const Home = () => {
}
navigation.setOptions({
headerLeft: () => (
<TouchableOpacity
onPress={() => {
router.push("/(auth)/downloads");
}}
className='ml-1.5'
style={{ marginRight: Platform.OS === "android" ? 16 : 0 }}
>
<Feather
name='download'
color={hasDownloads ? Colors.primary : "white"}
size={24}
/>
</TouchableOpacity>
<View className='flex flex-row items-center ml-1.5'>
<TouchableOpacity
onPress={() => {
router.push("/(auth)/downloads");
}}
style={{ marginRight: Platform.OS === "android" ? 16 : 0 }}
>
<Feather
name='download'
color={hasDownloads ? Colors.primary : "white"}
size={24}
/>
</TouchableOpacity>
</View>
),
});
}, [navigation, router, hasDownloads]);
@@ -474,8 +471,7 @@ export const Home = () => {
}}
>
<View
className='flex flex-col space-y-4'
style={{ paddingTop: Platform.OS === "android" ? 10 : 0 }}
className={`flex flex-col gap-y-4 ${Platform.OS === "android" ? "pt-4" : ""}`}
>
{sections.map((section, index) => {
if (section.type === "InfiniteScrollingCollectionList") {

View File

@@ -475,7 +475,7 @@ export const HomeWithCarousel = () => {
paddingTop: 0,
}}
>
<View className='flex flex-col space-y-4'>
<View className='flex flex-col gap-y-4'>
{sections.map((section, index) => {
if (section.type === "InfiniteScrollingCollectionList") {
return (

View File

@@ -84,9 +84,9 @@ export const InfiniteScrollingCollectionList: React.FC<Props> = ({
return (
<View {...props}>
<Text className='px-4 text-lg font-bold mb-2 text-neutral-100'>
{title}
</Text>
<View className='px-4 mb-2'>
<Text className='text-lg font-bold text-neutral-100'>{title}</Text>
</View>
{isLoading === false && allItems.length === 0 && (
<View className='px-4'>
<Text className='text-neutral-500'>{t("home.no_items")}</Text>

View File

@@ -154,7 +154,7 @@ const DetailFacts: React.FC<
<Facts
title={t("jellyseerr.release_dates")}
facts={filteredReleases?.map?.((r: Release, idx) => (
<View key={idx} className='flex flex-row space-x-2 items-center'>
<View key={idx} className='flex flex-row gap-x-2 items-center'>
{r.type === 3 ? (
// Theatrical
<Ionicons name='ticket' size={16} color='white' />
@@ -189,7 +189,7 @@ const DetailFacts: React.FC<
<Facts
title={t("jellyseerr.production_country")}
facts={details?.productionCountries?.map((n, idx) => (
<View key={idx} className='flex flex-row items-center space-x-2'>
<View key={idx} className='flex flex-row items-center gap-x-2'>
<CountryFlag isoCode={n.iso_3166_1} size={10} />
<Text>{n.name}</Text>
</View>

View File

@@ -118,7 +118,7 @@ const ParallaxSlideShow = <T,>({
}
logo={logo}
>
<View className='flex flex-col space-y-4 px-4'>
<View className='flex flex-col gap-y-4 px-4'>
<View className='flex flex-row justify-between w-full'>
<View className='flex flex-col w-full'>{HeaderContent?.()}</View>
</View>

View File

@@ -302,7 +302,7 @@ const RequestModal = forwardRef<
stackBehavior='push'
>
<BottomSheetView>
<View className='flex flex-col space-y-4 px-4 pb-8 pt-2'>
<View className='flex flex-col gap-y-4 px-4 pb-8 pt-2'>
<View>
<Text className='font-bold text-2xl text-neutral-100'>
{t("jellyseerr.advanced")}
@@ -311,7 +311,7 @@ const RequestModal = forwardRef<
<Text className='text-neutral-300'>{seasonTitle}</Text>
)}
</View>
<View className='flex flex-col space-y-2'>
<View className='flex flex-col gap-y-2'>
{defaultService && defaultServiceDetails && users && (
<>
<View className='flex flex-col'>

View File

@@ -31,7 +31,7 @@ const Discover: React.FC<Props> = ({ sliders }) => {
if (!hasSliders) return null;
return (
<View className='flex flex-col space-y-4 mb-8'>
<View className='flex flex-col gap-y-4 mb-8'>
{sortedSliders.map((slide) => {
switch (slide.type) {
case DiscoverSliderType.RECENT_REQUESTS:

View File

@@ -83,7 +83,7 @@ export const DiscoverFilters: React.FC<DiscoverFiltersProps> = ({
// Android UI
return (
<View className='flex flex-row justify-end items-center space-x-1'>
<View className='flex flex-row justify-end items-center gap-x-1'>
<FilterButton
id={searchFilterId}
queryKey='jellyseerr_search'

View File

@@ -32,7 +32,7 @@ export const CurrentSeries: React.FC<Props> = ({ item, ...props }) => {
onPress={() =>
item?.SeriesId && router.push(`/series/${item.SeriesId}`)
}
className='flex flex-col space-y-2 w-28'
className='flex flex-col gap-y-2 w-28'
>
<Poster
id={item?.Id}

View File

@@ -128,7 +128,7 @@ export const SeasonPicker: React.FC<Props> = ({ item }) => {
}}
/>
{episodes?.length ? (
<View className='flex flex-row items-center space-x-2'>
<View className='flex flex-row items-center gap-x-2'>
<DownloadItems
title={t("item_card.download.download_season")}
className='ml-2'

View File

@@ -105,14 +105,14 @@ export const QuickConnect: React.FC<Props> = ({ ...props }) => {
android_keyboardInputMode='adjustResize'
>
<BottomSheetView>
<View className='flex flex-col space-y-4 px-4 pb-8 pt-2'>
<View className='flex flex-col gap-y-4 px-4 pb-8 pt-2'>
<View>
<Text className='font-bold text-2xl text-neutral-100'>
{t("home.settings.quick_connect.quick_connect_title")}
</Text>
</View>
<View className='flex flex-col space-y-2'>
<View className='p-4 border border-neutral-800 rounded-xl bg-neutral-900 w-full space-y-4'>
<View className='flex flex-col gap-y-2'>
<View className='p-4 border border-neutral-800 rounded-xl bg-neutral-900 w-full gap-y-4'>
<Text className='text-neutral-400 text-center'>
{t(
"home.settings.quick_connect.enter_the_quick_connect_code",

View File

@@ -130,7 +130,7 @@ export const BottomControls: FC<BottomControlsProps> = ({
<Text className='text-xs opacity-50'>{item?.Album}</Text>
)}
</View>
<View className='flex flex-row space-x-2 shrink-0'>
<View className='flex flex-row gap-x-2 shrink-0'>
<SkipButton
showButton={showSkipButton}
onPress={skipIntro}

View File

@@ -127,7 +127,7 @@ export const HeaderControls: FC<HeaderControlsProps> = ({
)}
</View>
<View className='flex flex-row items-center space-x-2'>
<View className='flex flex-row items-center gap-x-2'>
{!Platform.isTV &&
(settings.defaultPlayer === VideoPlayer.VLC_4 ||
Platform.OS === "android") && (