mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
Delete captions icon from player settings hotbar
This commit is contained in:
parent
74f4033927
commit
813f90fe32
3 changed files with 2 additions and 39 deletions
|
@ -1,28 +0,0 @@
|
|||
import { useEffect } from "react";
|
||||
|
||||
import { Icons } from "@/components/Icon";
|
||||
import { OverlayAnchor } from "@/components/overlays/OverlayAnchor";
|
||||
import { VideoPlayerButton } from "@/components/player/internals/Button";
|
||||
import { useOverlayRouter } from "@/hooks/useOverlayRouter";
|
||||
import { usePlayerStore } from "@/stores/player/store";
|
||||
|
||||
export function Captions() {
|
||||
const router = useOverlayRouter("settings");
|
||||
const setHasOpenOverlay = usePlayerStore((s) => s.setHasOpenOverlay);
|
||||
|
||||
useEffect(() => {
|
||||
setHasOpenOverlay(router.isRouterActive);
|
||||
}, [setHasOpenOverlay, router.isRouterActive]);
|
||||
|
||||
return (
|
||||
<OverlayAnchor id={router.id}>
|
||||
<VideoPlayerButton
|
||||
onClick={() => {
|
||||
router.open();
|
||||
router.navigate("/captionsOverlay");
|
||||
}}
|
||||
icon={Icons.CAPTIONS}
|
||||
/>
|
||||
</OverlayAnchor>
|
||||
);
|
||||
}
|
|
@ -16,4 +16,3 @@ export * from "./VolumeChangedPopout";
|
|||
export * from "./NextEpisodeButton";
|
||||
export * from "./Chromecast";
|
||||
export * from "./CastingNotification";
|
||||
export * from "./Captions";
|
||||
|
|
|
@ -111,10 +111,7 @@ export function PlayerPart(props: PlayerPartProps) {
|
|||
) : null}
|
||||
{status === playerStatus.PLAYBACK_ERROR ||
|
||||
status === playerStatus.PLAYING ? (
|
||||
<>
|
||||
<Player.Captions />
|
||||
<Player.Settings />
|
||||
</>
|
||||
) : null}
|
||||
<Player.Fullscreen />
|
||||
</div>
|
||||
|
@ -124,12 +121,7 @@ export function PlayerPart(props: PlayerPartProps) {
|
|||
<div className="flex justify-center space-x-3">
|
||||
{status === playerStatus.PLAYING ? <Player.Pip /> : null}
|
||||
<Player.Episodes />
|
||||
{status === playerStatus.PLAYING ? (
|
||||
<>
|
||||
<Player.Captions />
|
||||
<Player.Settings />
|
||||
</>
|
||||
) : null}
|
||||
{status === playerStatus.PLAYING ? <Player.Settings /> : null}
|
||||
</div>
|
||||
<div>
|
||||
<Player.Fullscreen />
|
||||
|
|
Loading…
Reference in a new issue