diff --git a/front/packages/ui/src/player/components/hover.tsx b/front/packages/ui/src/player/components/hover.tsx index f7f78ed9..8d7fa827 100644 --- a/front/packages/ui/src/player/components/hover.tsx +++ b/front/packages/ui/src/player/components/hover.tsx @@ -152,6 +152,7 @@ export const Hover = ({ {isLoading ? : name} + - diff --git a/front/packages/ui/src/player/components/scrubber.tsx b/front/packages/ui/src/player/components/scrubber.tsx index 80c8f82d..835bb95a 100644 --- a/front/packages/ui/src/player/components/scrubber.tsx +++ b/front/packages/ui/src/player/components/scrubber.tsx @@ -19,12 +19,15 @@ */ import { useFetch, QueryIdentifier, imageFn } from "@kyoo/models"; -import { FastImage } from "@kyoo/primitives"; +import { FastImage, P, imageBorderRadius, tooltip, ts } from "@kyoo/primitives"; import { Platform, View } from "react-native"; -import { percent, useYoshiki, vh } from "yoshiki/native"; +import { percent, useYoshiki, px, vh } from "yoshiki/native"; import { ErrorView } from "../../fetch"; import { useMemo } from "react"; import { CssObject } from "yoshiki/src/web/generator"; +import { useAtomValue } from "jotai"; +import { durationAtom, progressAtom } from "../state"; +import { toTimerString } from "./left-buttons"; type Thumb = { to: number; url: string; x: number; y: number; width: number; height: number }; @@ -64,27 +67,78 @@ export const BottomScrubber = ({ url }: { url: string }) => { return ret; }, [data]); + const progress = useAtomValue(progressAtom); + const duration = useAtomValue(durationAtom); + if (error) return ; + const width = info?.[0]?.width ?? 0; return ( - - {info.map((thumb) => ( - - ))} + + + {info.map((thumb) => ( + + ))} + + theme.colors.white, + })} + /> + + theme.colors.white, + bg: (theme) => theme.darkOverlay, + padding: ts(0.5), + borderRadius: imageBorderRadius, + })} + > + {toTimerString(progress)} + + ); };
theme.colors.white, + bg: (theme) => theme.darkOverlay, + padding: ts(0.5), + borderRadius: imageBorderRadius, + })} + > + {toTimerString(progress)} +