diff --git a/app/(auth)/(tabs)/(favorites)/index.tsx b/app/(auth)/(tabs)/(favorites)/index.tsx index fa684960f..d13edbc3e 100644 --- a/app/(auth)/(tabs)/(favorites)/index.tsx +++ b/app/(auth)/(tabs)/(favorites)/index.tsx @@ -59,8 +59,9 @@ export default function FavoritesPage() { ) : ( diff --git a/app/(auth)/(tabs)/(favorites)/see-all.tsx b/app/(auth)/(tabs)/(favorites)/see-all.tsx index d6cd2d55e..1cd5e7183 100644 --- a/app/(auth)/(tabs)/(favorites)/see-all.tsx +++ b/app/(auth)/(tabs)/(favorites)/see-all.tsx @@ -11,7 +11,7 @@ import { Stack, useLocalSearchParams } from "expo-router"; import { t } from "i18next"; import { useAtom } from "jotai"; import { useCallback, useMemo } from "react"; -import { useWindowDimensions, View } from "react-native"; +import { Platform, useWindowDimensions, View } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; import { Text } from "@/components/common/Text"; import { TouchableItemRouter } from "@/components/common/TouchableItemRouter"; @@ -160,7 +160,7 @@ export default function FavoritesSeeAllScreen() { options={{ headerTitle: headerTitle, headerBlurEffect: "none", - headerTransparent: true, + headerTransparent: Platform.OS === "ios", headerShadowVisible: false, }} /> diff --git a/components/home/Favorites.tsx b/components/home/Favorites.tsx index 3b364de4f..88657a4c4 100644 --- a/components/home/Favorites.tsx +++ b/components/home/Favorites.tsx @@ -32,6 +32,8 @@ interface FavoritesProps { queryKeyBase?: string; emptyTitleKey?: string; emptyTextKey?: string; + /** Namespace for the see-all page headers ("favorites" or "kefintweaksWatchlist"). */ + seeAllNamespace?: string; } export const Favorites = ({ @@ -39,6 +41,7 @@ export const Favorites = ({ queryKeyBase = "favorites", emptyTitleKey = "favorites.noDataTitle", emptyTextKey = "favorites.noData", + seeAllNamespace = "favorites", }: FavoritesProps = {}) => { const router = useRouter(); const [api] = useAtom(apiAtom); @@ -143,44 +146,68 @@ export const Favorites = ({ const handleSeeAllSeries = useCallback(() => { router.push({ pathname: "/(auth)/(tabs)/(favorites)/see-all", - params: { type: "Series", title: t("favorites.series"), filter }, + params: { + type: "Series", + title: t(`${seeAllNamespace}.seeAllSeries`), + filter, + }, } as any); - }, [router, filter]); + }, [router, filter, seeAllNamespace]); const handleSeeAllMovies = useCallback(() => { router.push({ pathname: "/(auth)/(tabs)/(favorites)/see-all", - params: { type: "Movie", title: t("favorites.movies"), filter }, + params: { + type: "Movie", + title: t(`${seeAllNamespace}.seeAllMovies`), + filter, + }, } as any); - }, [router, filter]); + }, [router, filter, seeAllNamespace]); const handleSeeAllEpisodes = useCallback(() => { router.push({ pathname: "/(auth)/(tabs)/(favorites)/see-all", - params: { type: "Episode", title: t("favorites.episodes"), filter }, + params: { + type: "Episode", + title: t(`${seeAllNamespace}.seeAllEpisodes`), + filter, + }, } as any); - }, [router, filter]); + }, [router, filter, seeAllNamespace]); const handleSeeAllVideos = useCallback(() => { router.push({ pathname: "/(auth)/(tabs)/(favorites)/see-all", - params: { type: "Video", title: t("favorites.videos"), filter }, + params: { + type: "Video", + title: t(`${seeAllNamespace}.seeAllVideos`), + filter, + }, } as any); - }, [router, filter]); + }, [router, filter, seeAllNamespace]); const handleSeeAllBoxsets = useCallback(() => { router.push({ pathname: "/(auth)/(tabs)/(favorites)/see-all", - params: { type: "BoxSet", title: t("favorites.boxsets"), filter }, + params: { + type: "BoxSet", + title: t(`${seeAllNamespace}.seeAllBoxsets`), + filter, + }, } as any); - }, [router, filter]); + }, [router, filter, seeAllNamespace]); const handleSeeAllPlaylists = useCallback(() => { router.push({ pathname: "/(auth)/(tabs)/(favorites)/see-all", - params: { type: "Playlist", title: t("favorites.playlists"), filter }, + params: { + type: "Playlist", + title: t(`${seeAllNamespace}.seeAllPlaylists`), + filter, + }, } as any); - }, [router, filter]); + }, [router, filter, seeAllNamespace]); return ( diff --git a/components/home/Favorites.tv.tsx b/components/home/Favorites.tv.tsx index 83f404e55..6e25e7fac 100644 --- a/components/home/Favorites.tv.tsx +++ b/components/home/Favorites.tv.tsx @@ -6,7 +6,7 @@ import type { import { getItemsApi } from "@jellyfin/sdk/lib/utils/api"; import { Image } from "expo-image"; import { useAtom } from "jotai"; -import { useCallback, useEffect, useMemo, useState } from "react"; +import { useCallback, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { ScrollView, View } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; @@ -50,20 +50,14 @@ export const Favorites = () => { watchlistEnabled && viewType === "Watchlist" ? "Likes" : "IsFavorite"; const queryKeyBase = watchlistEnabled && viewType === "Watchlist" ? "watchlist" : "favorites"; - const emptyTitleKey = useMemo( - () => - watchlistEnabled && viewType === "Watchlist" - ? "favorites.noWatchlistTitle" - : "favorites.noDataTitle", - [watchlistEnabled, viewType], - ); - const emptyTextKey = useMemo( - () => - watchlistEnabled && viewType === "Watchlist" - ? "favorites.noWatchlistData" - : "favorites.noData", - [watchlistEnabled, viewType], - ); + // Translation namespace for the empty state, swapped for the KefinTweaks + // watchlist (Likes-backed) view. Section titles stay generic ("Series"). + const emptyNamespace = + watchlistEnabled && viewType === "Watchlist" + ? "kefintweaksWatchlist" + : "favorites"; + const emptyTitleKey = `${emptyNamespace}.noDataTitle`; + const emptyTextKey = `${emptyNamespace}.noData`; const [emptyState, setEmptyState] = useState({ Series: false, diff --git a/translations/en.json b/translations/en.json index 071dc065b..919de9668 100644 --- a/translations/en.json +++ b/translations/en.json @@ -593,11 +593,25 @@ "videos": "Videos", "boxsets": "Box sets", "playlists": "Playlists", + "seeAllSeries": "Favorited Series", + "seeAllMovies": "Favorited Movies", + "seeAllEpisodes": "Favorited Episodes", + "seeAllVideos": "Favorited Videos", + "seeAllBoxsets": "Favorited Box sets", + "seeAllPlaylists": "Favorited Playlists", "noDataTitle": "No favorites yet", "noData": "Mark items as favorites to see them appear here for quick access.", - "watchlist": "Watchlist", - "noWatchlistTitle": "No watchlisted items yet", - "noWatchlistData": "Add items to your watchlist to see them appear here." + "watchlist": "Watchlist" + }, + "kefintweaksWatchlist": { + "seeAllSeries": "Watchlisted Series", + "seeAllMovies": "Watchlisted Movies", + "seeAllEpisodes": "Watchlisted Episodes", + "seeAllVideos": "Watchlisted Videos", + "seeAllBoxsets": "Watchlisted Box sets", + "seeAllPlaylists": "Watchlisted Playlists", + "noDataTitle": "No watchlisted items yet", + "noData": "Add items to your watchlist to see them appear here." }, "custom_links": { "no_links": "No links" diff --git a/translations/sv.json b/translations/sv.json index 516021a1f..4419c97b9 100644 --- a/translations/sv.json +++ b/translations/sv.json @@ -675,11 +675,25 @@ "videos": "Videor", "boxsets": "Box Set", "playlists": "Spellistor", + "seeAllSeries": "Favoritmarkerade serier", + "seeAllMovies": "Favoritmarkerade filmer", + "seeAllEpisodes": "Favoritmarkerade avsnitt", + "seeAllVideos": "Favoritmarkerade videor", + "seeAllBoxsets": "Favoritmarkerade box set", + "seeAllPlaylists": "Favoritmarkerade spellistor", "noDataTitle": "Inga favoriter än", "noData": "Markera objekt som favoriter för att se dem visas här för snabb åtkomst.", - "watchlist": "Bevakningslista", - "noWatchlistTitle": "Inga bevakade objekt än", - "noWatchlistData": "Lägg till objekt i din bevakningslista för att se dem visas här." + "watchlist": "Bevakningslista" + }, + "kefintweaksWatchlist": { + "seeAllSeries": "Bevakade serier", + "seeAllMovies": "Bevakade filmer", + "seeAllEpisodes": "Bevakade avsnitt", + "seeAllVideos": "Bevakade videor", + "seeAllBoxsets": "Bevakade box set", + "seeAllPlaylists": "Bevakade spellistor", + "noDataTitle": "Inga bevakade objekt än", + "noData": "Lägg till objekt i din bevakningslista för att se dem visas här." }, "custom_links": { "no_links": "Inga Länkar"