mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +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 "./NextEpisodeButton";
|
||||||
export * from "./Chromecast";
|
export * from "./Chromecast";
|
||||||
export * from "./CastingNotification";
|
export * from "./CastingNotification";
|
||||||
export * from "./Captions";
|
|
||||||
|
|
|
@ -111,10 +111,7 @@ export function PlayerPart(props: PlayerPartProps) {
|
||||||
) : null}
|
) : null}
|
||||||
{status === playerStatus.PLAYBACK_ERROR ||
|
{status === playerStatus.PLAYBACK_ERROR ||
|
||||||
status === playerStatus.PLAYING ? (
|
status === playerStatus.PLAYING ? (
|
||||||
<>
|
<Player.Settings />
|
||||||
<Player.Captions />
|
|
||||||
<Player.Settings />
|
|
||||||
</>
|
|
||||||
) : null}
|
) : null}
|
||||||
<Player.Fullscreen />
|
<Player.Fullscreen />
|
||||||
</div>
|
</div>
|
||||||
|
@ -124,12 +121,7 @@ export function PlayerPart(props: PlayerPartProps) {
|
||||||
<div className="flex justify-center space-x-3">
|
<div className="flex justify-center space-x-3">
|
||||||
{status === playerStatus.PLAYING ? <Player.Pip /> : null}
|
{status === playerStatus.PLAYING ? <Player.Pip /> : null}
|
||||||
<Player.Episodes />
|
<Player.Episodes />
|
||||||
{status === playerStatus.PLAYING ? (
|
{status === playerStatus.PLAYING ? <Player.Settings /> : null}
|
||||||
<>
|
|
||||||
<Player.Captions />
|
|
||||||
<Player.Settings />
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Player.Fullscreen />
|
<Player.Fullscreen />
|
||||||
|
|
Loading…
Reference in a new issue