diff --git a/front/src/ui/player/controls/bottom-controls.tsx b/front/src/ui/player/controls/bottom-controls.tsx index 8bc0e9bb..9fe79fb3 100644 --- a/front/src/ui/player/controls/bottom-controls.tsx +++ b/front/src/ui/player/controls/bottom-controls.tsx @@ -11,10 +11,10 @@ import { IconButton, Link, type Menu, - noTouch, Poster, tooltip, ts, + useIsTouch, } from "~/primitives"; import { FullscreenButton, PlayButton, VolumeSlider } from "./misc"; import { ProgressBar, ProgressText } from "./progress"; @@ -102,6 +102,7 @@ const ControlButtons = ({ }) => { const { css } = useYoshiki(); const { t } = useTranslation(); + const isTouch = useIsTouch(); const spacing = css({ marginHorizontal: ts(1) }); const menuProps = { @@ -123,34 +124,36 @@ const ControlButtons = ({ )} > - - {previous && ( - - )} - - {next && ( - - )} - {Platform.OS === "web" && } - + {isTouch && ( + + {previous && ( + + )} + + {next && ( + + )} + {Platform.OS === "web" && } + + )} - + {Platform.OS === "web" && } diff --git a/front/src/ui/player/controls/index.tsx b/front/src/ui/player/controls/index.tsx index 4bdd9a95..514a9243 100644 --- a/front/src/ui/player/controls/index.tsx +++ b/front/src/ui/player/controls/index.tsx @@ -3,8 +3,10 @@ import type { ViewProps } from "react-native"; import type { VideoPlayer } from "react-native-video"; import { useYoshiki } from "yoshiki/native"; import type { Chapter, KImage } from "~/models"; +import { useIsTouch } from "~/primitives"; import { Back } from "./back"; import { BottomControls } from "./bottom-controls"; +import { MiddleControls } from "./middle-controls"; import { TouchControls } from "./touch"; export const Controls = ({ @@ -25,6 +27,7 @@ export const Controls = ({ next: string | null; }) => { const { css } = useYoshiki(); + const isTouch = useIsTouch(); const [hover, setHover] = useState(false); const [menuOpenned, setMenu] = useState(false); @@ -56,6 +59,9 @@ export const Controls = ({ hoverControls, )} /> + {isTouch && ( + + )} { + const { css } = useYoshiki(); + + const common = css({ + backgroundColor: (theme) => theme.darkOverlay, + marginHorizontal: ts(3), + }); + + return ( + + + + + + ); +}; diff --git a/front/src/ui/player/old/left-buttons.tsx b/front/src/ui/player/old/left-buttons.tsx index 28216dfb..51bb9daf 100644 --- a/front/src/ui/player/old/left-buttons.tsx +++ b/front/src/ui/player/old/left-buttons.tsx @@ -10,8 +10,8 @@ import { useAtom, useAtomValue } from "jotai"; import { useTranslation } from "react-i18next"; import { Platform, View } from "react-native"; import { px, type Stylable, useYoshiki } from "yoshiki/native"; -import { HoverTouch, hoverAtom } from "../controls"; -import { playAtom } from "./state"; +import { HoverTouch, hoverAtom } from "."; +import { playAtom } from "../old/state"; export const TouchControls = ({ previousSlug,