1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Make scraping buttons stay on top

This commit is contained in:
Ivan Evans 2024-09-11 23:49:28 -06:00
parent 8007db3966
commit 808fe15709
2 changed files with 31 additions and 19 deletions

View file

@ -7,6 +7,8 @@ import { useIsMobile } from "@/hooks/useIsMobile";
import { PlayerMeta, playerStatus } from "@/stores/player/slices/source";
import { usePlayerStore } from "@/stores/player/store";
import { ScrapingPartInterruptButton } from "./ScrapingPart";
export interface PlayerPartProps {
children?: ReactNode;
backUrl: string;
@ -80,7 +82,10 @@ export function PlayerPart(props: PlayerPartProps) {
</Player.TopControls>
<Player.BottomControls show={showTargets}>
<div className="flex items-center space-x-3">
<div className="flex items-center justify-center space-x-3 h-full">
{status === playerStatus.SCRAPING ? (
<ScrapingPartInterruptButton />
) : null}
{status === playerStatus.PLAYING ? (
<>
{isMobile ? <Player.Time short /> : null}

View file

@ -151,6 +151,15 @@ export function ScrapingPart(props: ScrapingProps) {
</div>
);
})}
</div>
</div>
);
}
export function ScrapingPartInterruptButton() {
const { t } = useTranslation();
return (
<div className="flex gap-3 pb-3">
<Button
href="/"
@ -169,7 +178,5 @@ export function ScrapingPart(props: ScrapingProps) {
{t("notFound.reloadButton")}
</Button>
</div>
</div>
</div>
);
}