fix(tv): font sizes

This commit is contained in:
Fredrik Burmester
2026-01-19 20:01:00 +01:00
parent f4445c4152
commit 2b36d4bc76
35 changed files with 437 additions and 167 deletions

View File

@@ -1,5 +1,7 @@
import { BlurView } from "expo-blur";
import { Platform, StyleSheet, View, type ViewProps } from "react-native"; import { Platform, StyleSheet, View, type ViewProps } from "react-native";
import { GlassEffectView } from "react-native-glass-effect-view"; import { GlassEffectView } from "react-native-glass-effect-view";
import { TVTypography } from "@/constants/TVTypography";
import { Text } from "./common/Text"; import { Text } from "./common/Text";
interface Props extends ViewProps { interface Props extends ViewProps {
@@ -38,8 +40,45 @@ export const Badge: React.FC<Props> = ({
); );
} }
// On TV, use transparent backgrounds for a cleaner look // On TV, use BlurView for consistent styling
const isTV = Platform.isTV; if (Platform.isTV) {
return (
<BlurView
intensity={10}
tint='light'
style={{
borderRadius: 8,
overflow: "hidden",
alignSelf: "flex-start",
flexShrink: 1,
flexGrow: 0,
}}
>
<View
style={[
{
paddingVertical: 10,
paddingHorizontal: 16,
flexDirection: "row",
alignItems: "center",
backgroundColor: "rgba(0,0,0,0.3)",
},
props.style,
]}
>
{iconLeft && <View style={{ marginRight: 8 }}>{iconLeft}</View>}
<Text
style={{
fontSize: TVTypography.callout,
color: "#E5E7EB",
}}
>
{text}
</Text>
</View>
</BlurView>
);
}
return ( return (
<View <View
@@ -54,11 +93,7 @@ export const Badge: React.FC<Props> = ({
alignSelf: "flex-start", alignSelf: "flex-start",
flexDirection: "row", flexDirection: "row",
alignItems: "center", alignItems: "center",
backgroundColor: isTV backgroundColor: variant === "purple" ? "#9333ea" : "#262626",
? "rgba(255,255,255,0.1)"
: variant === "purple"
? "#9333ea"
: "#262626",
}, },
props.style, props.style,
]} ]}

View File

@@ -1,4 +1,5 @@
// GenreTags.tsx // GenreTags.tsx
import { BlurView } from "expo-blur";
import type React from "react"; import type React from "react";
import { import {
Platform, Platform,
@@ -9,6 +10,7 @@ import {
type ViewProps, type ViewProps,
} from "react-native"; } from "react-native";
import { GlassEffectView } from "react-native-glass-effect-view"; import { GlassEffectView } from "react-native-glass-effect-view";
import { TVTypography } from "@/constants/TVTypography";
import { Text } from "./common/Text"; import { Text } from "./common/Text";
interface TagProps { interface TagProps {
@@ -40,6 +42,32 @@ export const Tag: React.FC<
); );
} }
// TV-specific styling with blur background
if (Platform.isTV) {
return (
<BlurView
intensity={10}
tint='light'
style={{
borderRadius: 8,
overflow: "hidden",
}}
>
<View
style={{
paddingHorizontal: 16,
paddingVertical: 10,
backgroundColor: "rgba(0,0,0,0.3)",
}}
>
<Text style={{ fontSize: TVTypography.callout, color: "#E5E7EB" }}>
{text}
</Text>
</View>
</BlurView>
);
}
return ( return (
<View className='bg-neutral-800 rounded-full px-2 py-1' {...props}> <View className='bg-neutral-800 rounded-full px-2 py-1' {...props}>
<Text className={textClass} style={textStyle}> <Text className={textClass} style={textStyle}>
@@ -66,7 +94,8 @@ export const Tags: React.FC<
return ( return (
<View <View
className={`flex flex-row flex-wrap gap-1 ${props.className}`} className={`flex flex-row flex-wrap ${props.className}`}
style={{ gap: Platform.isTV ? 12 : 4 }}
{...props} {...props}
> >
{tags.map((tag, idx) => ( {tags.map((tag, idx) => (

View File

@@ -6,6 +6,7 @@ import type {
} from "@jellyfin/sdk/lib/generated-client/models"; } from "@jellyfin/sdk/lib/generated-client/models";
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api"; import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api";
import { useQueryClient } from "@tanstack/react-query"; import { useQueryClient } from "@tanstack/react-query";
import { BlurView } from "expo-blur";
import { Image } from "expo-image"; import { Image } from "expo-image";
import { useAtom } from "jotai"; import { useAtom } from "jotai";
import React, { useCallback, useEffect, useMemo, useState } from "react"; import React, { useCallback, useEffect, useMemo, useState } from "react";
@@ -28,6 +29,7 @@ import {
TVSeriesNavigation, TVSeriesNavigation,
TVTechnicalDetails, TVTechnicalDetails,
} from "@/components/tv"; } from "@/components/tv";
import { TVTypography } from "@/constants/TVTypography";
import useRouter from "@/hooks/useAppRouter"; import useRouter from "@/hooks/useAppRouter";
import useDefaultPlaySettings from "@/hooks/useDefaultPlaySettings"; import useDefaultPlaySettings from "@/hooks/useDefaultPlaySettings";
import { useImageColorsReturn } from "@/hooks/useImageColorsReturn"; import { useImageColorsReturn } from "@/hooks/useImageColorsReturn";
@@ -453,7 +455,7 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
<Image <Image
source={{ uri: logoUrl }} source={{ uri: logoUrl }}
style={{ style={{
height: 100, height: 150,
width: "80%", width: "80%",
marginBottom: 24, marginBottom: 24,
}} }}
@@ -463,10 +465,10 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
) : ( ) : (
<Text <Text
style={{ style={{
fontSize: 52, fontSize: TVTypography.display,
fontWeight: "bold", fontWeight: "bold",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 20,
}} }}
numberOfLines={2} numberOfLines={2}
> >
@@ -476,10 +478,10 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
{/* Episode info for TV shows */} {/* Episode info for TV shows */}
{item.Type === "Episode" && ( {item.Type === "Episode" && (
<View style={{ marginBottom: 12 }}> <View style={{ marginBottom: 16 }}>
<Text <Text
style={{ style={{
fontSize: 24, fontSize: TVTypography.title,
color: "#FFFFFF", color: "#FFFFFF",
fontWeight: "600", fontWeight: "600",
}} }}
@@ -488,9 +490,9 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
</Text> </Text>
<Text <Text
style={{ style={{
fontSize: 20, fontSize: TVTypography.body,
color: "#9CA3AF", color: "white",
marginTop: 4, marginTop: 6,
}} }}
> >
S{item.ParentIndexNumber} E{item.IndexNumber} · {item.Name} S{item.ParentIndexNumber} E{item.IndexNumber} · {item.Name}
@@ -515,18 +517,34 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
{/* Overview */} {/* Overview */}
{item.Overview && ( {item.Overview && (
<Text <BlurView
intensity={10}
tint='light'
style={{ style={{
fontSize: 18, borderRadius: 8,
color: "#D1D5DB", overflow: "hidden",
lineHeight: 28,
maxWidth: SCREEN_WIDTH * 0.45, maxWidth: SCREEN_WIDTH * 0.45,
marginBottom: 32, marginBottom: 32,
}} }}
numberOfLines={4}
> >
{item.Overview} <View
</Text> style={{
padding: 16,
backgroundColor: "rgba(0,0,0,0.3)",
}}
>
<Text
style={{
fontSize: TVTypography.body,
color: "#E5E7EB",
lineHeight: 32,
}}
numberOfLines={4}
>
{item.Overview}
</Text>
</View>
</BlurView>
)} )}
{/* Action buttons */} {/* Action buttons */}
@@ -550,7 +568,7 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
/> />
<Text <Text
style={{ style={{
fontSize: 20, fontSize: TVTypography.callout,
fontWeight: "bold", fontWeight: "bold",
color: "#000000", color: "#000000",
}} }}
@@ -673,6 +691,7 @@ export const ItemContentTV: React.FC<ItemContentTVProps> = React.memo(
(item.UserData?.PlaybackPositionTicks || 0) / (item.UserData?.PlaybackPositionTicks || 0) /
item.RunTimeTicks item.RunTimeTicks
} }
fillColor='#FFFFFF'
/> />
)} )}
</View> </View>

View File

@@ -11,6 +11,7 @@ import heart from "@/assets/icons/heart.fill.png";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { InfiniteScrollingCollectionList } from "@/components/home/InfiniteScrollingCollectionList.tv"; import { InfiniteScrollingCollectionList } from "@/components/home/InfiniteScrollingCollectionList.tv";
import { Colors } from "@/constants/Colors"; import { Colors } from "@/constants/Colors";
import { TVTypography } from "@/constants/TVTypography";
import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider";
const HORIZONTAL_PADDING = 60; const HORIZONTAL_PADDING = 60;
@@ -147,7 +148,7 @@ export const Favorites = () => {
/> />
<Text <Text
style={{ style={{
fontSize: 32, fontSize: TVTypography.heading,
fontWeight: "bold", fontWeight: "bold",
marginBottom: 8, marginBottom: 8,
color: "#FFFFFF", color: "#FFFFFF",
@@ -159,7 +160,7 @@ export const Favorites = () => {
style={{ style={{
textAlign: "center", textAlign: "center",
opacity: 0.7, opacity: 0.7,
fontSize: 18, fontSize: TVTypography.body,
color: "#FFFFFF", color: "#FFFFFF",
}} }}
> >

View File

@@ -31,6 +31,7 @@ import { InfiniteScrollingCollectionList } from "@/components/home/InfiniteScrol
import { StreamystatsPromotedWatchlists } from "@/components/home/StreamystatsPromotedWatchlists.tv"; import { StreamystatsPromotedWatchlists } from "@/components/home/StreamystatsPromotedWatchlists.tv";
import { StreamystatsRecommendations } from "@/components/home/StreamystatsRecommendations.tv"; import { StreamystatsRecommendations } from "@/components/home/StreamystatsRecommendations.tv";
import { Loader } from "@/components/Loader"; import { Loader } from "@/components/Loader";
import { TVTypography } from "@/constants/TVTypography";
import useRouter from "@/hooks/useAppRouter"; import useRouter from "@/hooks/useAppRouter";
import { useNetworkStatus } from "@/hooks/useNetworkStatus"; import { useNetworkStatus } from "@/hooks/useNetworkStatus";
import { useInvalidatePlaybackProgressCache } from "@/hooks/useRevalidatePlaybackProgressCache"; import { useInvalidatePlaybackProgressCache } from "@/hooks/useRevalidatePlaybackProgressCache";
@@ -525,7 +526,7 @@ export const Home = () => {
> >
<Text <Text
style={{ style={{
fontSize: 32, fontSize: TVTypography.heading,
fontWeight: "bold", fontWeight: "bold",
marginBottom: 8, marginBottom: 8,
color: "#FFFFFF", color: "#FFFFFF",
@@ -537,7 +538,7 @@ export const Home = () => {
style={{ style={{
textAlign: "center", textAlign: "center",
opacity: 0.7, opacity: 0.7,
fontSize: 18, fontSize: TVTypography.body,
color: "#FFFFFF", color: "#FFFFFF",
}} }}
> >
@@ -577,7 +578,7 @@ export const Home = () => {
> >
<Text <Text
style={{ style={{
fontSize: 32, fontSize: TVTypography.heading,
fontWeight: "bold", fontWeight: "bold",
marginBottom: 8, marginBottom: 8,
color: "#FFFFFF", color: "#FFFFFF",
@@ -589,7 +590,7 @@ export const Home = () => {
style={{ style={{
textAlign: "center", textAlign: "center",
opacity: 0.7, opacity: 0.7,
fontSize: 18, fontSize: TVTypography.body,
color: "#FFFFFF", color: "#FFFFFF",
}} }}
> >

View File

@@ -21,6 +21,7 @@ import MoviePoster, {
} from "@/components/posters/MoviePoster.tv"; } from "@/components/posters/MoviePoster.tv";
import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster"; import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster";
import { Colors } from "@/constants/Colors"; import { Colors } from "@/constants/Colors";
import { TVTypography } from "@/constants/TVTypography";
import useRouter from "@/hooks/useAppRouter"; import useRouter from "@/hooks/useAppRouter";
import { SortByOption, SortOrderOption } from "@/utils/atoms/filters"; import { SortByOption, SortOrderOption } from "@/utils/atoms/filters";
import ContinueWatchingPoster, { import ContinueWatchingPoster, {
@@ -54,12 +55,19 @@ const TVItemCardText: React.FC<{ item: BaseItemDto }> = ({ item }) => {
<View style={{ marginTop: 12, flexDirection: "column" }}> <View style={{ marginTop: 12, flexDirection: "column" }}>
{item.Type === "Episode" ? ( {item.Type === "Episode" ? (
<> <>
<Text numberOfLines={1} style={{ fontSize: 16, color: "#FFFFFF" }}> <Text
numberOfLines={1}
style={{ fontSize: TVTypography.callout, color: "#FFFFFF" }}
>
{item.Name} {item.Name}
</Text> </Text>
<Text <Text
numberOfLines={1} numberOfLines={1}
style={{ fontSize: 14, color: "#9CA3AF", marginTop: 2 }} style={{
fontSize: TVTypography.callout,
color: "#9CA3AF",
marginTop: 2,
}}
> >
{`S${item.ParentIndexNumber?.toString()}:E${item.IndexNumber?.toString()}`} {`S${item.ParentIndexNumber?.toString()}:E${item.IndexNumber?.toString()}`}
{" - "} {" - "}
@@ -68,10 +76,19 @@ const TVItemCardText: React.FC<{ item: BaseItemDto }> = ({ item }) => {
</> </>
) : ( ) : (
<> <>
<Text numberOfLines={1} style={{ fontSize: 16, color: "#FFFFFF" }}> <Text
numberOfLines={1}
style={{ fontSize: TVTypography.callout, color: "#FFFFFF" }}
>
{item.Name} {item.Name}
</Text> </Text>
<Text style={{ fontSize: 14, color: "#9CA3AF", marginTop: 2 }}> <Text
style={{
fontSize: TVTypography.callout,
color: "#9CA3AF",
marginTop: 2,
}}
>
{item.ProductionYear} {item.ProductionYear}
</Text> </Text>
</> </>
@@ -119,7 +136,13 @@ const TVSeeAllCard: React.FC<{
color='white' color='white'
style={{ marginBottom: 8 }} style={{ marginBottom: 8 }}
/> />
<Text style={{ fontSize: 18, color: "#FFFFFF", fontWeight: "600" }}> <Text
style={{
fontSize: TVTypography.callout,
color: "#FFFFFF",
fontWeight: "600",
}}
>
{t("common.seeAll", { defaultValue: "See all" })} {t("common.seeAll", { defaultValue: "See all" })}
</Text> </Text>
</View> </View>
@@ -369,7 +392,7 @@ export const InfiniteScrollingCollectionList: React.FC<Props> = ({
{/* Section Header */} {/* Section Header */}
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.body,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 16,
@@ -381,7 +404,11 @@ export const InfiniteScrollingCollectionList: React.FC<Props> = ({
{isLoading === false && allItems.length === 0 && ( {isLoading === false && allItems.length === 0 && (
<Text <Text
style={{ color: "#737373", fontSize: 16, marginLeft: SCALE_PADDING }} style={{
color: "#737373",
fontSize: TVTypography.callout,
marginLeft: SCALE_PADDING,
}}
> >
{t("home.no_items")} {t("home.no_items")}
</Text> </Text>
@@ -420,7 +447,7 @@ export const InfiniteScrollingCollectionList: React.FC<Props> = ({
color: "#262626", color: "#262626",
backgroundColor: "#262626", backgroundColor: "#262626",
borderRadius: 6, borderRadius: 6,
fontSize: 16, fontSize: TVTypography.callout,
}} }}
numberOfLines={1} numberOfLines={1}
> >

View File

@@ -16,6 +16,7 @@ import MoviePoster, {
} from "@/components/posters/MoviePoster.tv"; } from "@/components/posters/MoviePoster.tv";
import SeriesPoster from "@/components/posters/SeriesPoster.tv"; import SeriesPoster from "@/components/posters/SeriesPoster.tv";
import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster"; import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster";
import { TVTypography } from "@/constants/TVTypography";
import useRouter from "@/hooks/useAppRouter"; import useRouter from "@/hooks/useAppRouter";
import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider";
import { useSettings } from "@/utils/atoms/settings"; import { useSettings } from "@/utils/atoms/settings";
@@ -28,10 +29,19 @@ const SCALE_PADDING = 20;
const TVItemCardText: React.FC<{ item: BaseItemDto }> = ({ item }) => { const TVItemCardText: React.FC<{ item: BaseItemDto }> = ({ item }) => {
return ( return (
<View style={{ marginTop: 12, flexDirection: "column" }}> <View style={{ marginTop: 12, flexDirection: "column" }}>
<Text numberOfLines={1} style={{ fontSize: 16, color: "#FFFFFF" }}> <Text
numberOfLines={1}
style={{ fontSize: TVTypography.callout, color: "#FFFFFF" }}
>
{item.Name} {item.Name}
</Text> </Text>
<Text style={{ fontSize: 14, color: "#9CA3AF", marginTop: 2 }}> <Text
style={{
fontSize: TVTypography.callout,
color: "#9CA3AF",
marginTop: 2,
}}
>
{item.ProductionYear} {item.ProductionYear}
</Text> </Text>
</View> </View>
@@ -145,7 +155,7 @@ const WatchlistSection: React.FC<WatchlistSectionProps> = ({
<View style={{ overflow: "visible" }} {...props}> <View style={{ overflow: "visible" }} {...props}>
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.body,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 16,

View File

@@ -16,6 +16,7 @@ import MoviePoster, {
} from "@/components/posters/MoviePoster.tv"; } from "@/components/posters/MoviePoster.tv";
import SeriesPoster from "@/components/posters/SeriesPoster.tv"; import SeriesPoster from "@/components/posters/SeriesPoster.tv";
import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster"; import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster";
import { TVTypography } from "@/constants/TVTypography";
import useRouter from "@/hooks/useAppRouter"; import useRouter from "@/hooks/useAppRouter";
import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider";
import { useSettings } from "@/utils/atoms/settings"; import { useSettings } from "@/utils/atoms/settings";
@@ -36,10 +37,19 @@ interface Props extends ViewProps {
const TVItemCardText: React.FC<{ item: BaseItemDto }> = ({ item }) => { const TVItemCardText: React.FC<{ item: BaseItemDto }> = ({ item }) => {
return ( return (
<View style={{ marginTop: 12, flexDirection: "column" }}> <View style={{ marginTop: 12, flexDirection: "column" }}>
<Text numberOfLines={1} style={{ fontSize: 16, color: "#FFFFFF" }}> <Text
numberOfLines={1}
style={{ fontSize: TVTypography.callout, color: "#FFFFFF" }}
>
{item.Name} {item.Name}
</Text> </Text>
<Text style={{ fontSize: 14, color: "#9CA3AF", marginTop: 2 }}> <Text
style={{
fontSize: TVTypography.callout,
color: "#9CA3AF",
marginTop: 2,
}}
>
{item.ProductionYear} {item.ProductionYear}
</Text> </Text>
</View> </View>
@@ -208,7 +218,7 @@ export const StreamystatsRecommendations: React.FC<Props> = ({
<View style={{ overflow: "visible" }} {...props}> <View style={{ overflow: "visible" }} {...props}>
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.body,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 16,

View File

@@ -7,6 +7,7 @@ import { ProgressBar } from "@/components/common/ProgressBar";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster"; import { TVFocusablePoster } from "@/components/tv/TVFocusablePoster";
import { WatchedIndicator } from "@/components/WatchedIndicator"; import { WatchedIndicator } from "@/components/WatchedIndicator";
import { TVTypography } from "@/constants/TVTypography";
import { apiAtom } from "@/providers/JellyfinProvider"; import { apiAtom } from "@/providers/JellyfinProvider";
import { runtimeTicksToMinutes } from "@/utils/time"; import { runtimeTicksToMinutes } from "@/utils/time";
@@ -75,11 +76,9 @@ export const TVEpisodeCard: React.FC<TVEpisodeCardProps> = ({
style={{ style={{
width: TV_EPISODE_WIDTH, width: TV_EPISODE_WIDTH,
aspectRatio: 16 / 9, aspectRatio: 16 / 9,
borderRadius: 12, borderRadius: 24,
overflow: "hidden", overflow: "hidden",
backgroundColor: "#1a1a1a", backgroundColor: "#1a1a1a",
borderWidth: 1,
borderColor: "#262626",
}} }}
> >
{thumbnailUrl ? ( {thumbnailUrl ? (
@@ -109,7 +108,7 @@ export const TVEpisodeCard: React.FC<TVEpisodeCardProps> = ({
{episodeLabel && ( {episodeLabel && (
<Text <Text
style={{ style={{
fontSize: 14, fontSize: TVTypography.callout,
color: "#9CA3AF", color: "#9CA3AF",
fontWeight: "500", fontWeight: "500",
}} }}
@@ -119,15 +118,23 @@ export const TVEpisodeCard: React.FC<TVEpisodeCardProps> = ({
)} )}
{duration && ( {duration && (
<> <>
<Text style={{ color: "#6B7280", fontSize: 14 }}></Text> <Text
<Text style={{ fontSize: 14, color: "#9CA3AF" }}>{duration}</Text> style={{ color: "#6B7280", fontSize: TVTypography.callout }}
>
</Text>
<Text
style={{ fontSize: TVTypography.callout, color: "#9CA3AF" }}
>
{duration}
</Text>
</> </>
)} )}
</View> </View>
<Text <Text
numberOfLines={2} numberOfLines={2}
style={{ style={{
fontSize: 16, fontSize: TVTypography.callout,
color: "#FFFFFF", color: "#FFFFFF",
marginTop: 4, marginTop: 4,
fontWeight: "500", fontWeight: "500",

View File

@@ -1,5 +1,6 @@
import { Ionicons } from "@expo/vector-icons"; import { Ionicons } from "@expo/vector-icons";
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models"; import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
import { BlurView } from "expo-blur";
import { Image } from "expo-image"; import { Image } from "expo-image";
import { useAtomValue } from "jotai"; import { useAtomValue } from "jotai";
import React, { useMemo } from "react"; import React, { useMemo } from "react";
@@ -7,6 +8,7 @@ import { Dimensions, View } from "react-native";
import { Badge } from "@/components/Badge"; import { Badge } from "@/components/Badge";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { GenreTags } from "@/components/GenreTags"; import { GenreTags } from "@/components/GenreTags";
import { TVTypography } from "@/constants/TVTypography";
import { apiAtom } from "@/providers/JellyfinProvider"; import { apiAtom } from "@/providers/JellyfinProvider";
import { getLogoImageUrlById } from "@/utils/jellyfin/image/getLogoImageUrlById"; import { getLogoImageUrlById } from "@/utils/jellyfin/image/getLogoImageUrlById";
@@ -56,7 +58,7 @@ export const TVSeriesHeader: React.FC<TVSeriesHeaderProps> = ({ item }) => {
) : ( ) : (
<Text <Text
style={{ style={{
fontSize: 52, fontSize: TVTypography.display,
fontWeight: "bold", fontWeight: "bold",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 16,
@@ -78,7 +80,9 @@ export const TVSeriesHeader: React.FC<TVSeriesHeaderProps> = ({ item }) => {
}} }}
> >
{yearString && ( {yearString && (
<Text style={{ color: "#9CA3AF", fontSize: 18 }}>{yearString}</Text> <Text style={{ color: "#9CA3AF", fontSize: TVTypography.body }}>
{yearString}
</Text>
)} )}
{item.OfficialRating && ( {item.OfficialRating && (
<Badge text={item.OfficialRating} variant='gray' /> <Badge text={item.OfficialRating} variant='gray' />
@@ -101,17 +105,34 @@ export const TVSeriesHeader: React.FC<TVSeriesHeaderProps> = ({ item }) => {
{/* Overview */} {/* Overview */}
{item.Overview && ( {item.Overview && (
<Text <BlurView
intensity={10}
tint='light'
style={{ style={{
fontSize: 18, borderRadius: 8,
color: "#D1D5DB", overflow: "hidden",
lineHeight: 28,
maxWidth: SCREEN_WIDTH * 0.45, maxWidth: SCREEN_WIDTH * 0.45,
alignSelf: "flex-start",
}} }}
numberOfLines={4}
> >
{item.Overview} <View
</Text> style={{
padding: 16,
backgroundColor: "rgba(0,0,0,0.3)",
}}
>
<Text
style={{
fontSize: TVTypography.body,
color: "#E5E7EB",
lineHeight: 32,
}}
numberOfLines={4}
>
{item.Overview}
</Text>
</View>
</BlurView>
)} )}
</View> </View>
); );

View File

@@ -32,6 +32,7 @@ import {
TVEpisodeCard, TVEpisodeCard,
} from "@/components/series/TVEpisodeCard"; } from "@/components/series/TVEpisodeCard";
import { TVSeriesHeader } from "@/components/series/TVSeriesHeader"; import { TVSeriesHeader } from "@/components/series/TVSeriesHeader";
import { TVTypography } from "@/constants/TVTypography";
import useRouter from "@/hooks/useAppRouter"; import useRouter from "@/hooks/useAppRouter";
import { useTVOptionModal } from "@/hooks/useTVOptionModal"; import { useTVOptionModal } from "@/hooks/useTVOptionModal";
import { useDownload } from "@/providers/DownloadProvider"; import { useDownload } from "@/providers/DownloadProvider";
@@ -146,7 +147,7 @@ const TVSeasonButton: React.FC<{
const animateTo = (v: number) => const animateTo = (v: number) =>
Animated.timing(scale, { Animated.timing(scale, {
toValue: v, toValue: v,
duration: 120, duration: 150,
easing: Easing.out(Easing.quad), easing: Easing.out(Easing.quad),
useNativeDriver: true, useNativeDriver: true,
}).start(); }).start();
@@ -156,7 +157,7 @@ const TVSeasonButton: React.FC<{
onPress={onPress} onPress={onPress}
onFocus={() => { onFocus={() => {
setFocused(true); setFocused(true);
animateTo(1.02); animateTo(1.05);
}} }}
onBlur={() => { onBlur={() => {
setFocused(false); setFocused(false);
@@ -170,33 +171,34 @@ const TVSeasonButton: React.FC<{
transform: [{ scale }], transform: [{ scale }],
shadowColor: "#fff", shadowColor: "#fff",
shadowOffset: { width: 0, height: 0 }, shadowOffset: { width: 0, height: 0 },
shadowOpacity: focused ? 0.4 : 0, shadowOpacity: focused ? 0.6 : 0,
shadowRadius: focused ? 12 : 0, shadowRadius: focused ? 20 : 0,
}} }}
> >
<View <View
style={{ style={{
backgroundColor: focused ? "#fff" : "rgba(255,255,255,0.1)", backgroundColor: focused ? "#fff" : "rgba(255,255,255,0.1)",
borderRadius: 10, borderRadius: 12,
paddingVertical: 14, paddingVertical: 18,
paddingHorizontal: 20, paddingHorizontal: 32,
flexDirection: "row", flexDirection: "row",
alignItems: "center", alignItems: "center",
gap: 8, justifyContent: "center",
gap: 10,
}} }}
> >
<Text <Text
style={{ style={{
fontSize: 16, fontSize: TVTypography.body,
color: focused ? "#000" : "#FFFFFF", color: focused ? "#000" : "#FFFFFF",
fontWeight: "500", fontWeight: "bold",
}} }}
> >
{seasonName} {seasonName}
</Text> </Text>
<Ionicons <Ionicons
name='chevron-down' name='chevron-down'
size={18} size={28}
color={focused ? "#000" : "#FFFFFF"} color={focused ? "#000" : "#FFFFFF"}
/> />
</View> </View>
@@ -572,7 +574,7 @@ export const TVSeriesPage: React.FC<TVSeriesPageProps> = ({
/> />
<Text <Text
style={{ style={{
fontSize: 20, fontSize: TVTypography.body,
fontWeight: "bold", fontWeight: "bold",
color: "#000000", color: "#000000",
}} }}
@@ -595,7 +597,7 @@ export const TVSeriesPage: React.FC<TVSeriesPageProps> = ({
<View style={{ marginTop: 40, overflow: "visible" }}> <View style={{ marginTop: 40, overflow: "visible" }}>
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.body,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 16,
@@ -626,7 +628,7 @@ export const TVSeriesPage: React.FC<TVSeriesPageProps> = ({
<Text <Text
style={{ style={{
color: "#737373", color: "#737373",
fontSize: 16, fontSize: TVTypography.callout,
marginLeft: SCALE_PADDING, marginLeft: SCALE_PADDING,
}} }}
> >

View File

@@ -3,6 +3,7 @@ import { Image } from "expo-image";
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVActorCardProps { export interface TVActorCardProps {
@@ -22,7 +23,7 @@ export const TVActorCard = React.forwardRef<View, TVActorCardProps>(
useTVFocusAnimation({ scaleAmount: 1.08 }); useTVFocusAnimation({ scaleAmount: 1.08 });
const imageUrl = person.Id const imageUrl = person.Id
? `${apiBasePath}/Items/${person.Id}/Images/Primary?fillWidth=200&fillHeight=200&quality=90` ? `${apiBasePath}/Items/${person.Id}/Images/Primary?fillWidth=280&fillHeight=280&quality=90`
: null; : null;
return ( return (
@@ -38,7 +39,7 @@ export const TVActorCard = React.forwardRef<View, TVActorCardProps>(
animatedStyle, animatedStyle,
{ {
alignItems: "center", alignItems: "center",
width: 120, width: 160,
shadowColor: "#fff", shadowColor: "#fff",
shadowOffset: { width: 0, height: 0 }, shadowOffset: { width: 0, height: 0 },
shadowOpacity: focused ? 0.5 : 0, shadowOpacity: focused ? 0.5 : 0,
@@ -48,12 +49,12 @@ export const TVActorCard = React.forwardRef<View, TVActorCardProps>(
> >
<View <View
style={{ style={{
width: 100, width: 140,
height: 100, height: 140,
borderRadius: 50, borderRadius: 70,
overflow: "hidden", overflow: "hidden",
backgroundColor: "rgba(255,255,255,0.1)", backgroundColor: "rgba(255,255,255,0.1)",
marginBottom: 12, marginBottom: 14,
borderWidth: focused ? 3 : 0, borderWidth: focused ? 3 : 0,
borderColor: "#fff", borderColor: "#fff",
}} }}
@@ -74,7 +75,7 @@ export const TVActorCard = React.forwardRef<View, TVActorCardProps>(
> >
<Ionicons <Ionicons
name='person' name='person'
size={40} size={56}
color='rgba(255,255,255,0.4)' color='rgba(255,255,255,0.4)'
/> />
</View> </View>
@@ -83,11 +84,11 @@ export const TVActorCard = React.forwardRef<View, TVActorCardProps>(
<Text <Text
style={{ style={{
fontSize: 14, fontSize: TVTypography.body,
fontWeight: "600", fontWeight: "600",
color: focused ? "#fff" : "rgba(255,255,255,0.9)", color: focused ? "#fff" : "rgba(255,255,255,0.9)",
textAlign: "center", textAlign: "center",
marginBottom: 2, marginBottom: 4,
}} }}
numberOfLines={1} numberOfLines={1}
> >
@@ -97,7 +98,7 @@ export const TVActorCard = React.forwardRef<View, TVActorCardProps>(
{person.Role && ( {person.Role && (
<Text <Text
style={{ style={{
fontSize: 12, fontSize: TVTypography.callout,
color: focused color: focused
? "rgba(255,255,255,0.8)" ? "rgba(255,255,255,0.8)"
: "rgba(255,255,255,0.5)", : "rgba(255,255,255,0.5)",

View File

@@ -2,6 +2,7 @@ import { Ionicons } from "@expo/vector-icons";
import React from "react"; import React from "react";
import { Animated, Pressable } from "react-native"; import { Animated, Pressable } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVCancelButtonProps { export interface TVCancelButtonProps {
@@ -47,7 +48,7 @@ export const TVCancelButton: React.FC<TVCancelButtonProps> = ({
/> />
<Text <Text
style={{ style={{
fontSize: 16, fontSize: TVTypography.callout,
color: focused ? "#000" : "rgba(255,255,255,0.8)", color: focused ? "#000" : "rgba(255,255,255,0.8)",
fontWeight: "500", fontWeight: "500",
}} }}

View File

@@ -3,6 +3,7 @@ import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { View } from "react-native"; import { View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
export interface TVCastCrewTextProps { export interface TVCastCrewTextProps {
director?: BaseItemPerson | null; director?: BaseItemPerson | null;
@@ -23,7 +24,7 @@ export const TVCastCrewText: React.FC<TVCastCrewTextProps> = React.memo(
<View style={{ marginBottom: 32 }}> <View style={{ marginBottom: 32 }}>
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.heading,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 16,
@@ -36,7 +37,7 @@ export const TVCastCrewText: React.FC<TVCastCrewTextProps> = React.memo(
<View> <View>
<Text <Text
style={{ style={{
fontSize: 14, fontSize: TVTypography.callout,
color: "#6B7280", color: "#6B7280",
textTransform: "uppercase", textTransform: "uppercase",
letterSpacing: 1, letterSpacing: 1,
@@ -45,7 +46,7 @@ export const TVCastCrewText: React.FC<TVCastCrewTextProps> = React.memo(
> >
{t("item_card.director")} {t("item_card.director")}
</Text> </Text>
<Text style={{ fontSize: 18, color: "#FFFFFF" }}> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{director.Name} {director.Name}
</Text> </Text>
</View> </View>
@@ -54,7 +55,7 @@ export const TVCastCrewText: React.FC<TVCastCrewTextProps> = React.memo(
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<Text <Text
style={{ style={{
fontSize: 14, fontSize: TVTypography.callout,
color: "#6B7280", color: "#6B7280",
textTransform: "uppercase", textTransform: "uppercase",
letterSpacing: 1, letterSpacing: 1,
@@ -63,7 +64,7 @@ export const TVCastCrewText: React.FC<TVCastCrewTextProps> = React.memo(
> >
{t("item_card.cast")} {t("item_card.cast")}
</Text> </Text>
<Text style={{ fontSize: 18, color: "#FFFFFF" }}> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{cast.map((c) => c.Name).join(", ")} {cast.map((c) => c.Name).join(", ")}
</Text> </Text>
</View> </View>

View File

@@ -3,6 +3,7 @@ import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ScrollView, TVFocusGuideView, View } from "react-native"; import { ScrollView, TVFocusGuideView, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { TVActorCard } from "./TVActorCard"; import { TVActorCard } from "./TVActorCard";
export interface TVCastSectionProps { export interface TVCastSectionProps {
@@ -30,13 +31,13 @@ export const TVCastSection: React.FC<TVCastSectionProps> = React.memo(
} }
return ( return (
<View style={{ marginBottom: 32 }}> <View style={{ marginBottom: 40 }}>
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.heading,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 20, marginBottom: 24,
}} }}
> >
{t("item_card.cast")} {t("item_card.cast")}
@@ -54,8 +55,8 @@ export const TVCastSection: React.FC<TVCastSectionProps> = React.memo(
style={{ marginHorizontal: -80, overflow: "visible" }} style={{ marginHorizontal: -80, overflow: "visible" }}
contentContainerStyle={{ contentContainerStyle={{
paddingHorizontal: 80, paddingHorizontal: 80,
paddingVertical: 12, paddingVertical: 16,
gap: 20, gap: 28,
}} }}
> >
{cast.map((person, index) => ( {cast.map((person, index) => (

View File

@@ -2,6 +2,7 @@ import { Ionicons } from "@expo/vector-icons";
import React from "react"; import React from "react";
import { Animated, Pressable, StyleSheet, View } from "react-native"; import { Animated, Pressable, StyleSheet, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVLanguageCardProps { export interface TVLanguageCardProps {
@@ -81,11 +82,11 @@ const styles = StyleSheet.create({
paddingHorizontal: 12, paddingHorizontal: 12,
}, },
languageCardText: { languageCardText: {
fontSize: 15, fontSize: TVTypography.callout,
fontWeight: "500", fontWeight: "500",
}, },
languageCardCode: { languageCardCode: {
fontSize: 11, fontSize: TVTypography.callout,
marginTop: 2, marginTop: 2,
}, },
checkmark: { checkmark: {

View File

@@ -3,6 +3,7 @@ import React from "react";
import { View } from "react-native"; import { View } from "react-native";
import { Badge } from "@/components/Badge"; import { Badge } from "@/components/Badge";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
export interface TVMetadataBadgesProps { export interface TVMetadataBadgesProps {
year?: number | null; year?: number | null;
@@ -19,15 +20,19 @@ export const TVMetadataBadges: React.FC<TVMetadataBadgesProps> = React.memo(
flexDirection: "row", flexDirection: "row",
alignItems: "center", alignItems: "center",
flexWrap: "wrap", flexWrap: "wrap",
gap: 12, gap: 16,
marginBottom: 20, marginBottom: 24,
}} }}
> >
{year != null && ( {year != null && (
<Text style={{ color: "#9CA3AF", fontSize: 18 }}>{year}</Text> <Text style={{ color: "white", fontSize: TVTypography.body }}>
{year}
</Text>
)} )}
{duration && ( {duration && (
<Text style={{ color: "#9CA3AF", fontSize: 18 }}>{duration}</Text> <Text style={{ color: "white", fontSize: TVTypography.body }}>
{duration}
</Text>
)} )}
{officialRating && <Badge text={officialRating} variant='gray' />} {officialRating && <Badge text={officialRating} variant='gray' />}
{communityRating != null && ( {communityRating != null && (

View File

@@ -13,6 +13,7 @@ import Animated, {
withTiming, withTiming,
} from "react-native-reanimated"; } from "react-native-reanimated";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl"; import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl";
export interface TVNextEpisodeCountdownProps { export interface TVNextEpisodeCountdownProps {
@@ -129,19 +130,19 @@ const styles = StyleSheet.create({
width: 280, width: 280,
}, },
label: { label: {
fontSize: 13, fontSize: TVTypography.callout,
color: "rgba(255,255,255,0.5)", color: "rgba(255,255,255,0.5)",
textTransform: "uppercase", textTransform: "uppercase",
letterSpacing: 1, letterSpacing: 1,
marginBottom: 4, marginBottom: 4,
}, },
seriesName: { seriesName: {
fontSize: 16, fontSize: TVTypography.callout,
color: "rgba(255,255,255,0.7)", color: "rgba(255,255,255,0.7)",
marginBottom: 2, marginBottom: 2,
}, },
episodeInfo: { episodeInfo: {
fontSize: 20, fontSize: TVTypography.body,
color: "#fff", color: "#fff",
fontWeight: "600", fontWeight: "600",
marginBottom: 12, marginBottom: 12,

View File

@@ -1,6 +1,8 @@
import { BlurView } from "expo-blur";
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVOptionButtonProps { export interface TVOptionButtonProps {
@@ -34,36 +36,77 @@ export const TVOptionButton = React.forwardRef<View, TVOptionButtonProps>(
}, },
]} ]}
> >
<View {focused ? (
style={{ <View
backgroundColor: focused ? "#fff" : "rgba(255,255,255,0.1)",
borderRadius: 10,
paddingVertical: 10,
paddingHorizontal: 16,
flexDirection: "row",
alignItems: "center",
gap: 8,
}}
>
<Text
style={{ style={{
fontSize: 14, backgroundColor: "#fff",
color: focused ? "#444" : "#bbb", borderRadius: 8,
paddingVertical: 10,
paddingHorizontal: 16,
flexDirection: "row",
alignItems: "center",
gap: 8,
}} }}
> >
{label} <Text
</Text> style={{
<Text fontSize: TVTypography.callout,
color: "#444",
}}
>
{label}
</Text>
<Text
style={{
fontSize: TVTypography.callout,
color: "#000",
fontWeight: "500",
}}
numberOfLines={1}
>
{value}
</Text>
</View>
) : (
<BlurView
intensity={10}
tint='light'
style={{ style={{
fontSize: 14, borderRadius: 8,
color: focused ? "#000" : "#FFFFFF", overflow: "hidden",
fontWeight: "500",
}} }}
numberOfLines={1}
> >
{value} <View
</Text> style={{
</View> backgroundColor: "rgba(0,0,0,0.3)",
paddingVertical: 10,
paddingHorizontal: 16,
flexDirection: "row",
alignItems: "center",
gap: 8,
}}
>
<Text
style={{
fontSize: TVTypography.callout,
color: "#bbb",
}}
>
{label}
</Text>
<Text
style={{
fontSize: TVTypography.callout,
color: "#E5E7EB",
fontWeight: "500",
}}
numberOfLines={1}
>
{value}
</Text>
</View>
</BlurView>
)}
</Animated.View> </Animated.View>
</Pressable> </Pressable>
); );

View File

@@ -2,6 +2,7 @@ import { Ionicons } from "@expo/vector-icons";
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVOptionCardProps { export interface TVOptionCardProps {
@@ -58,7 +59,7 @@ export const TVOptionCard = React.forwardRef<View, TVOptionCardProps>(
> >
<Text <Text
style={{ style={{
fontSize: 16, fontSize: TVTypography.callout,
color: focused ? "#000" : "#fff", color: focused ? "#000" : "#fff",
fontWeight: focused || selected ? "600" : "400", fontWeight: focused || selected ? "600" : "400",
textAlign: "center", textAlign: "center",
@@ -70,7 +71,7 @@ export const TVOptionCard = React.forwardRef<View, TVOptionCardProps>(
{sublabel && ( {sublabel && (
<Text <Text
style={{ style={{
fontSize: 12, fontSize: TVTypography.callout,
color: focused ? "rgba(0,0,0,0.6)" : "rgba(255,255,255,0.5)", color: focused ? "rgba(0,0,0,0.6)" : "rgba(255,255,255,0.5)",
textAlign: "center", textAlign: "center",
marginTop: 2, marginTop: 2,

View File

@@ -9,6 +9,7 @@ import {
View, View,
} from "react-native"; } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { TVCancelButton } from "./TVCancelButton"; import { TVCancelButton } from "./TVCancelButton";
import { TVOptionCard } from "./TVOptionCard"; import { TVOptionCard } from "./TVOptionCard";
@@ -175,7 +176,7 @@ const styles = StyleSheet.create({
overflow: "visible", overflow: "visible",
}, },
title: { title: {
fontSize: 18, fontSize: TVTypography.callout,
fontWeight: "500", fontWeight: "500",
color: "rgba(255,255,255,0.6)", color: "rgba(255,255,255,0.6)",
marginBottom: 16, marginBottom: 16,

View File

@@ -3,6 +3,7 @@ import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { ScrollView, View } from "react-native"; import { ScrollView, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { TVSeriesSeasonCard } from "./TVSeriesSeasonCard"; import { TVSeriesSeasonCard } from "./TVSeriesSeasonCard";
export interface TVSeriesNavigationProps { export interface TVSeriesNavigationProps {
@@ -26,10 +27,10 @@ export const TVSeriesNavigation: React.FC<TVSeriesNavigationProps> = React.memo(
<View style={{ marginBottom: 32 }}> <View style={{ marginBottom: 32 }}>
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.heading,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 20, marginBottom: 24,
}} }}
> >
{t("item_card.from_this_series") || "From this Series"} {t("item_card.from_this_series") || "From this Series"}

View File

@@ -3,6 +3,7 @@ import { Image } from "expo-image";
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVSeriesSeasonCardProps { export interface TVSeriesSeasonCardProps {
@@ -34,22 +35,22 @@ export const TVSeriesSeasonCard: React.FC<TVSeriesSeasonCardProps> = ({
style={[ style={[
animatedStyle, animatedStyle,
{ {
width: 140, width: 210,
shadowColor: "#fff", shadowColor: "#fff",
shadowOffset: { width: 0, height: 0 }, shadowOffset: { width: 0, height: 0 },
shadowOpacity: focused ? 0.5 : 0, shadowOpacity: focused ? 0.5 : 0,
shadowRadius: focused ? 16 : 0, shadowRadius: focused ? 20 : 0,
}, },
]} ]}
> >
<View <View
style={{ style={{
width: 140, width: 210,
aspectRatio: 2 / 3, aspectRatio: 10 / 15,
borderRadius: 12, borderRadius: 24,
overflow: "hidden", overflow: "hidden",
backgroundColor: "rgba(255,255,255,0.1)", backgroundColor: "rgba(255,255,255,0.1)",
marginBottom: 12, marginBottom: 14,
borderWidth: focused ? 3 : 0, borderWidth: focused ? 3 : 0,
borderColor: "#fff", borderColor: "#fff",
}} }}
@@ -68,18 +69,18 @@ export const TVSeriesSeasonCard: React.FC<TVSeriesSeasonCardProps> = ({
alignItems: "center", alignItems: "center",
}} }}
> >
<Ionicons name='film' size={40} color='rgba(255,255,255,0.4)' /> <Ionicons name='film' size={56} color='rgba(255,255,255,0.4)' />
</View> </View>
)} )}
</View> </View>
<Text <Text
style={{ style={{
fontSize: 14, fontSize: TVTypography.body,
fontWeight: "600", fontWeight: "600",
color: focused ? "#fff" : "rgba(255,255,255,0.9)", color: focused ? "#fff" : "rgba(255,255,255,0.9)",
textAlign: "center", textAlign: "center",
marginBottom: 2, marginBottom: 4,
}} }}
numberOfLines={2} numberOfLines={2}
> >
@@ -89,7 +90,7 @@ export const TVSeriesSeasonCard: React.FC<TVSeriesSeasonCardProps> = ({
{subtitle && ( {subtitle && (
<Text <Text
style={{ style={{
fontSize: 12, fontSize: TVTypography.callout,
color: focused color: focused
? "rgba(255,255,255,0.8)" ? "rgba(255,255,255,0.8)"
: "rgba(255,255,255,0.5)", : "rgba(255,255,255,0.5)",

View File

@@ -8,6 +8,7 @@ import {
View, View,
} from "react-native"; } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import type { SubtitleSearchResult } from "@/hooks/useRemoteSubtitles"; import type { SubtitleSearchResult } from "@/hooks/useRemoteSubtitles";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
@@ -212,13 +213,13 @@ const styles = StyleSheet.create({
marginBottom: 8, marginBottom: 8,
}, },
providerText: { providerText: {
fontSize: 11, fontSize: TVTypography.callout,
fontWeight: "600", fontWeight: "600",
textTransform: "uppercase", textTransform: "uppercase",
letterSpacing: 0.5, letterSpacing: 0.5,
}, },
resultName: { resultName: {
fontSize: 14, fontSize: TVTypography.callout,
fontWeight: "500", fontWeight: "500",
marginBottom: 8, marginBottom: 8,
lineHeight: 18, lineHeight: 18,
@@ -230,7 +231,7 @@ const styles = StyleSheet.create({
marginBottom: 8, marginBottom: 8,
}, },
resultMetaText: { resultMetaText: {
fontSize: 12, fontSize: TVTypography.callout,
}, },
ratingContainer: { ratingContainer: {
flexDirection: "row", flexDirection: "row",
@@ -253,7 +254,7 @@ const styles = StyleSheet.create({
borderRadius: 4, borderRadius: 4,
}, },
flagText: { flagText: {
fontSize: 10, fontSize: TVTypography.callout,
fontWeight: "600", fontWeight: "600",
color: "#fff", color: "#fff",
}, },

View File

@@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { Animated, Pressable } from "react-native"; import { Animated, Pressable } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVTabButtonProps { export interface TVTabButtonProps {
@@ -55,7 +56,7 @@ export const TVTabButton: React.FC<TVTabButtonProps> = ({
> >
<Text <Text
style={{ style={{
fontSize: 16, fontSize: TVTypography.callout,
color: focused ? "#000" : "#fff", color: focused ? "#000" : "#fff",
fontWeight: focused || active ? "600" : "400", fontWeight: focused || active ? "600" : "400",
}} }}

View File

@@ -3,6 +3,7 @@ import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { View } from "react-native"; import { View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
export interface TVTechnicalDetailsProps { export interface TVTechnicalDetailsProps {
mediaStreams: MediaStream[]; mediaStreams: MediaStream[];
@@ -23,10 +24,10 @@ export const TVTechnicalDetails: React.FC<TVTechnicalDetailsProps> = React.memo(
<View style={{ marginBottom: 32 }}> <View style={{ marginBottom: 32 }}>
<Text <Text
style={{ style={{
fontSize: 22, fontSize: TVTypography.heading,
fontWeight: "600", fontWeight: "600",
color: "#FFFFFF", color: "#FFFFFF",
marginBottom: 16, marginBottom: 20,
}} }}
> >
{t("item_card.technical_details")} {t("item_card.technical_details")}
@@ -36,7 +37,7 @@ export const TVTechnicalDetails: React.FC<TVTechnicalDetailsProps> = React.memo(
<View> <View>
<Text <Text
style={{ style={{
fontSize: 14, fontSize: TVTypography.callout,
color: "#6B7280", color: "#6B7280",
textTransform: "uppercase", textTransform: "uppercase",
letterSpacing: 1, letterSpacing: 1,
@@ -45,7 +46,7 @@ export const TVTechnicalDetails: React.FC<TVTechnicalDetailsProps> = React.memo(
> >
Video Video
</Text> </Text>
<Text style={{ fontSize: 18, color: "#FFFFFF" }}> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{videoStream.DisplayTitle || {videoStream.DisplayTitle ||
`${videoStream.Codec?.toUpperCase()} ${videoStream.Width}x${videoStream.Height}`} `${videoStream.Codec?.toUpperCase()} ${videoStream.Width}x${videoStream.Height}`}
</Text> </Text>
@@ -55,7 +56,7 @@ export const TVTechnicalDetails: React.FC<TVTechnicalDetailsProps> = React.memo(
<View> <View>
<Text <Text
style={{ style={{
fontSize: 14, fontSize: TVTypography.callout,
color: "#6B7280", color: "#6B7280",
textTransform: "uppercase", textTransform: "uppercase",
letterSpacing: 1, letterSpacing: 1,
@@ -64,7 +65,7 @@ export const TVTechnicalDetails: React.FC<TVTechnicalDetailsProps> = React.memo(
> >
Audio Audio
</Text> </Text>
<Text style={{ fontSize: 18, color: "#FFFFFF" }}> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{audioStream.DisplayTitle || {audioStream.DisplayTitle ||
`${audioStream.Codec?.toUpperCase()} ${audioStream.Channels}ch`} `${audioStream.Codec?.toUpperCase()} ${audioStream.Channels}ch`}
</Text> </Text>

View File

@@ -2,6 +2,7 @@ import { Ionicons } from "@expo/vector-icons";
import React from "react"; import React from "react";
import { Animated, Pressable, StyleSheet, View } from "react-native"; import { Animated, Pressable, StyleSheet, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "./hooks/useTVFocusAnimation";
export interface TVTrackCardProps { export interface TVTrackCardProps {
@@ -86,11 +87,11 @@ const styles = StyleSheet.create({
paddingHorizontal: 12, paddingHorizontal: 12,
}, },
trackCardText: { trackCardText: {
fontSize: 16, fontSize: TVTypography.callout,
textAlign: "center", textAlign: "center",
}, },
trackCardSublabel: { trackCardSublabel: {
fontSize: 12, fontSize: TVTypography.callout,
marginTop: 2, marginTop: 2,
}, },
checkmark: { checkmark: {

View File

@@ -2,6 +2,7 @@ import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation";
export interface TVLogoutButtonProps { export interface TVLogoutButtonProps {
@@ -48,7 +49,7 @@ export const TVLogoutButton: React.FC<TVLogoutButtonProps> = ({
> >
<Text <Text
style={{ style={{
fontSize: 20, fontSize: TVTypography.body,
fontWeight: "bold", fontWeight: "bold",
color: "#FFFFFF", color: "#FFFFFF",
}} }}

View File

@@ -1,5 +1,6 @@
import React from "react"; import React from "react";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
export interface TVSectionHeaderProps { export interface TVSectionHeaderProps {
title: string; title: string;
@@ -8,7 +9,7 @@ export interface TVSectionHeaderProps {
export const TVSectionHeader: React.FC<TVSectionHeaderProps> = ({ title }) => ( export const TVSectionHeader: React.FC<TVSectionHeaderProps> = ({ title }) => (
<Text <Text
style={{ style={{
fontSize: 16, fontSize: TVTypography.callout,
fontWeight: "600", fontWeight: "600",
color: "#9CA3AF", color: "#9CA3AF",
textTransform: "uppercase", textTransform: "uppercase",

View File

@@ -2,6 +2,7 @@ import { Ionicons } from "@expo/vector-icons";
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation";
export interface TVSettingsOptionButtonProps { export interface TVSettingsOptionButtonProps {
@@ -48,11 +49,13 @@ export const TVSettingsOptionButton: React.FC<TVSettingsOptionButtonProps> = ({
}, },
]} ]}
> >
<Text style={{ fontSize: 20, color: "#FFFFFF" }}>{label}</Text> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{label}
</Text>
<View style={{ flexDirection: "row", alignItems: "center" }}> <View style={{ flexDirection: "row", alignItems: "center" }}>
<Text <Text
style={{ style={{
fontSize: 18, fontSize: TVTypography.callout,
color: "#9CA3AF", color: "#9CA3AF",
marginRight: 12, marginRight: 12,
}} }}

View File

@@ -2,6 +2,7 @@ import { Ionicons } from "@expo/vector-icons";
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation";
export interface TVSettingsRowProps { export interface TVSettingsRowProps {
@@ -50,11 +51,13 @@ export const TVSettingsRow: React.FC<TVSettingsRowProps> = ({
}, },
]} ]}
> >
<Text style={{ fontSize: 20, color: "#FFFFFF" }}>{label}</Text> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{label}
</Text>
<View style={{ flexDirection: "row", alignItems: "center" }}> <View style={{ flexDirection: "row", alignItems: "center" }}>
<Text <Text
style={{ style={{
fontSize: 18, fontSize: TVTypography.callout,
color: "#9CA3AF", color: "#9CA3AF",
marginRight: showChevron ? 12 : 0, marginRight: showChevron ? 12 : 0,
}} }}

View File

@@ -2,6 +2,7 @@ import { Ionicons } from "@expo/vector-icons";
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation";
export interface TVSettingsStepperProps { export interface TVSettingsStepperProps {
@@ -53,7 +54,9 @@ export const TVSettingsStepper: React.FC<TVSettingsStepperProps> = ({
focusable={!disabled} focusable={!disabled}
> >
<Animated.View style={labelAnim.animatedStyle}> <Animated.View style={labelAnim.animatedStyle}>
<Text style={{ fontSize: 20, color: "#FFFFFF" }}>{label}</Text> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{label}
</Text>
</Animated.View> </Animated.View>
</Pressable> </Pressable>
<View style={{ flexDirection: "row", alignItems: "center" }}> <View style={{ flexDirection: "row", alignItems: "center" }}>
@@ -86,7 +89,7 @@ export const TVSettingsStepper: React.FC<TVSettingsStepperProps> = ({
</Pressable> </Pressable>
<Text <Text
style={{ style={{
fontSize: 18, fontSize: TVTypography.callout,
color: "#FFFFFF", color: "#FFFFFF",
minWidth: 60, minWidth: 60,
textAlign: "center", textAlign: "center",

View File

@@ -1,6 +1,7 @@
import React, { useRef } from "react"; import React, { useRef } from "react";
import { Animated, Pressable, TextInput } from "react-native"; import { Animated, Pressable, TextInput } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation";
export interface TVSettingsTextInputProps { export interface TVSettingsTextInputProps {
@@ -53,7 +54,13 @@ export const TVSettingsTextInput: React.FC<TVSettingsTextInputProps> = ({
}, },
]} ]}
> >
<Text style={{ fontSize: 16, color: "#9CA3AF", marginBottom: 8 }}> <Text
style={{
fontSize: TVTypography.callout,
color: "#9CA3AF",
marginBottom: 8,
}}
>
{label} {label}
</Text> </Text>
<TextInput <TextInput
@@ -67,7 +74,7 @@ export const TVSettingsTextInput: React.FC<TVSettingsTextInputProps> = ({
autoCapitalize='none' autoCapitalize='none'
autoCorrect={false} autoCorrect={false}
style={{ style={{
fontSize: 18, fontSize: TVTypography.body,
color: "#FFFFFF", color: "#FFFFFF",
backgroundColor: "rgba(255, 255, 255, 0.05)", backgroundColor: "rgba(255, 255, 255, 0.05)",
borderRadius: 8, borderRadius: 8,

View File

@@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { Animated, Pressable, View } from "react-native"; import { Animated, Pressable, View } from "react-native";
import { Text } from "@/components/common/Text"; import { Text } from "@/components/common/Text";
import { TVTypography } from "@/constants/TVTypography";
import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation"; import { useTVFocusAnimation } from "../hooks/useTVFocusAnimation";
export interface TVSettingsToggleProps { export interface TVSettingsToggleProps {
@@ -47,7 +48,9 @@ export const TVSettingsToggle: React.FC<TVSettingsToggleProps> = ({
}, },
]} ]}
> >
<Text style={{ fontSize: 20, color: "#FFFFFF" }}>{label}</Text> <Text style={{ fontSize: TVTypography.body, color: "#FFFFFF" }}>
{label}
</Text>
<View <View
style={{ style={{
width: 56, width: 56,

25
constants/TVTypography.ts Normal file
View File

@@ -0,0 +1,25 @@
/**
* TV Typography Scale
*
* Consistent text sizes for TV interface components.
* These sizes are optimized for TV viewing distance.
*/
export const TVTypography = {
/** Hero titles, movie/show names - 70px */
display: 70,
/** Episode series name, major headings - 42px */
title: 42,
/** Section headers (Cast, Technical Details, From this Series) - 32px */
heading: 32,
/** Overview, actor names, card titles, metadata - 20px */
body: 20,
/** Secondary text, labels, subtitles - 16px */
callout: 16,
} as const;
export type TVTypographyKey = keyof typeof TVTypography;