Fix recommended typo (#431)

This commit is contained in:
Zoe Roux 2024-04-22 23:57:29 +02:00 committed by GitHub
parent 7d354249d4
commit d51ffa6848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 20 additions and 20 deletions

View File

@ -36,7 +36,7 @@ import { Platform, View, ViewProps } from "react-native";
import { Fetch } from "../fetch"; import { Fetch } from "../fetch";
import { InfiniteFetch } from "../fetch-infinite"; import { InfiniteFetch } from "../fetch-infinite";
import { DefaultLayout } from "../layout"; import { DefaultLayout } from "../layout";
import { ItemDetails } from "../home/recommanded"; import { ItemDetails } from "../home/recommended";
import { SvgWave } from "../details/show"; import { SvgWave } from "../details/show";
import { ItemGrid } from "../browse/grid"; import { ItemGrid } from "../browse/grid";

View File

@ -24,8 +24,8 @@ import { Header } from "./header";
import { DefaultLayout } from "../layout"; import { DefaultLayout } from "../layout";
import { RefreshControl, ScrollView } from "react-native"; import { RefreshControl, ScrollView } from "react-native";
import { GenreGrid } from "./genre"; import { GenreGrid } from "./genre";
import { Recommanded } from "./recommanded"; import { Recommended } from "./recommended";
import { VerticalRecommanded } from "./vertical"; import { VerticalRecommended } from "./vertical";
import { NewsList } from "./news"; import { NewsList } from "./news";
import { WatchlistList } from "./watchlist"; import { WatchlistList } from "./watchlist";
import { useQueryClient } from "@tanstack/react-query"; import { useQueryClient } from "@tanstack/react-query";
@ -76,13 +76,13 @@ export const HomePage: QueryPage<{}, Genre> = ({ randomItems }) => {
.map((x) => ( .map((x) => (
<GenreGrid key={x} genre={x} /> <GenreGrid key={x} genre={x} />
))} ))}
<Recommanded /> <Recommended />
{randomItems {randomItems
.filter((_, i) => i >= 2 && i < 6) .filter((_, i) => i >= 2 && i < 6)
.map((x) => ( .map((x) => (
<GenreGrid key={x} genre={x} /> <GenreGrid key={x} genre={x} />
))} ))}
<VerticalRecommanded /> <VerticalRecommended />
{/* {/*
TODO: Lazy load those items TODO: Lazy load those items
{randomItems.filter((_, i) => i >= 6).map((x) => <GenreGrid key={x} genre={x} />)} {randomItems.filter((_, i) => i >= 6).map((x) => <GenreGrid key={x} genre={x} />)}
@ -100,6 +100,6 @@ HomePage.getFetchUrls = (_, randomItems) => [
WatchlistList.query(), WatchlistList.query(),
NewsList.query(), NewsList.query(),
...randomItems.filter((_, i) => i < 6).map((x) => GenreGrid.query(x)), ...randomItems.filter((_, i) => i < 6).map((x) => GenreGrid.query(x)),
Recommanded.query(), Recommended.query(),
VerticalRecommanded.query(), VerticalRecommended.query(),
]; ];

View File

@ -81,7 +81,7 @@ export const ItemDetails = ({
unseenEpisodesCount: number | null; unseenEpisodesCount: number | null;
}>) => { }>) => {
const [moreOpened, setMoreOpened] = useState(false); const [moreOpened, setMoreOpened] = useState(false);
const { css } = useYoshiki("recommanded-card"); const { css } = useYoshiki("recommended-card");
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
@ -238,15 +238,15 @@ ItemDetails.layout = {
gap: ts(8), gap: ts(8),
} satisfies Layout; } satisfies Layout;
export const Recommanded = () => { export const Recommended = () => {
const { t } = useTranslation(); const { t } = useTranslation();
const { css } = useYoshiki(); const { css } = useYoshiki();
return ( return (
<View {...css({ marginX: ItemGrid.layout.gap, marginTop: ItemGrid.layout.gap })}> <View {...css({ marginX: ItemGrid.layout.gap, marginTop: ItemGrid.layout.gap })}>
<H3 {...css({ pX: ts(0.5) })}>{t("home.recommanded")}</H3> <H3 {...css({ pX: ts(0.5) })}>{t("home.recommended")}</H3>
<InfiniteFetch <InfiniteFetch
query={Recommanded.query()} query={Recommended.query()}
layout={ItemDetails.layout} layout={ItemDetails.layout}
placeholderCount={6} placeholderCount={6}
fetchMore={false} fetchMore={false}
@ -279,7 +279,7 @@ export const Recommanded = () => {
); );
}; };
Recommanded.query = (): QueryIdentifier<LibraryItem> => ({ Recommended.query = (): QueryIdentifier<LibraryItem> => ({
parser: LibraryItemP, parser: LibraryItemP,
infinite: true, infinite: true,
path: ["items"], path: ["items"],

View File

@ -28,15 +28,15 @@ import { useTranslation } from "react-i18next";
import { ItemGrid } from "../browse/grid"; import { ItemGrid } from "../browse/grid";
import { itemMap } from "../browse"; import { itemMap } from "../browse";
export const VerticalRecommanded = () => { export const VerticalRecommended = () => {
const { t } = useTranslation(); const { t } = useTranslation();
const { css } = useYoshiki(); const { css } = useYoshiki();
return ( return (
<View {...css({ marginY: ItemGrid.layout.gap })}> <View {...css({ marginY: ItemGrid.layout.gap })}>
<H3 {...css({ mX: ItemGrid.layout.gap })}>{t("home.recommanded")}</H3> <H3 {...css({ mX: ItemGrid.layout.gap })}>{t("home.recommended")}</H3>
<InfiniteFetch <InfiniteFetch
query={VerticalRecommanded.query()} query={VerticalRecommended.query()}
placeholderCount={3} placeholderCount={3}
layout={{ ...ItemList.layout, layout: "vertical" }} layout={{ ...ItemList.layout, layout: "vertical" }}
fetchMore={false} fetchMore={false}
@ -48,7 +48,7 @@ export const VerticalRecommanded = () => {
); );
}; };
VerticalRecommanded.query = (): QueryIdentifier<LibraryItem> => ({ VerticalRecommended.query = (): QueryIdentifier<LibraryItem> => ({
parser: LibraryItemP, parser: LibraryItemP,
infinite: true, infinite: true,
path: ["items"], path: ["items"],

View File

@ -1,6 +1,6 @@
{ {
"home": { "home": {
"recommanded": "Recommanded", "recommended": "Recommended",
"news": "News", "news": "News",
"watchlist": "Continue watching", "watchlist": "Continue watching",
"info": "See more", "info": "See more",

View File

@ -1,6 +1,6 @@
{ {
"home": { "home": {
"recommanded": "Recommandé", "recommended": "Recommandé",
"news": "Nouveautés", "news": "Nouveautés",
"watchlist": "Continuer de regarder", "watchlist": "Continuer de regarder",
"info": "Voir plus", "info": "Voir plus",

View File

@ -1,6 +1,6 @@
{ {
"home": { "home": {
"recommanded": "推荐", "recommended": "推荐",
"news": "新闻", "news": "新闻",
"watchlist": "继续观看", "watchlist": "继续观看",
"info": "查看更多", "info": "查看更多",

View File

@ -246,7 +246,7 @@ func (ts *Stream) run(start int32) error {
args = append(args, args = append(args,
"-f", "segment", "-f", "segment",
// needed for rounding issues when forcing keyframes // needed for rounding issues when forcing keyframes
// recommanded value is 1/(2*frame_rate), which for a 24fps is ~0.021 // recommended value is 1/(2*frame_rate), which for a 24fps is ~0.021
// we take a little bit more than that to be extra safe but too much can be harmfull // we take a little bit more than that to be extra safe but too much can be harmfull
// when segments are short (can make the video repeat itself) // when segments are short (can make the video repeat itself)
"-segment_time_delta", "0.05", "-segment_time_delta", "0.05",