mirror of
https://github.com/zoriya/v10.git
synced 2026-08-05 05:37:21 +00:00
fix(docs): improvements to eject script (#1012)
Co-authored-by: Rahim <rahim.alwer@gmail.com>
This commit is contained in:
@@ -95,11 +95,11 @@ const SliderThumb = forwardRef<HTMLDivElement, ComponentProps<'div'> & { persist
|
||||
);
|
||||
});
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
@@ -29,11 +29,11 @@ const Button = forwardRef<HTMLButtonElement, ComponentProps<'button'>>(function
|
||||
return <button ref={ref} type="button" className={cn('media-button media-button--icon', className)} {...props} />;
|
||||
});
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
@@ -94,11 +94,11 @@ const SliderThumb = forwardRef<HTMLDivElement, ComponentProps<'div'> & { persist
|
||||
);
|
||||
});
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
@@ -29,11 +29,11 @@ const Button = forwardRef<HTMLButtonElement, ComponentProps<'button'>>(function
|
||||
return <button ref={ref} type="button" className={cn('media-button media-button--icon', className)} {...props} />;
|
||||
});
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
@@ -18,10 +18,11 @@ export interface ErrorDialogClasses {
|
||||
export function ErrorDialog({ classes }: { classes?: ErrorDialogClasses }): ReactNode {
|
||||
const errorState = usePlayer(selectError);
|
||||
const lastError = useRef(errorState?.error);
|
||||
if (errorState?.error) lastError.current = errorState.error;
|
||||
|
||||
if (!errorState) return null;
|
||||
|
||||
if (errorState?.error) lastError.current = errorState.error;
|
||||
|
||||
return (
|
||||
<AlertDialog.Root
|
||||
open={!!errorState.error}
|
||||
|
||||
@@ -126,26 +126,26 @@ const errorClasses = {
|
||||
close: cn(button.base, button.default),
|
||||
};
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function CaptionsLabel(): ReactNode {
|
||||
function CaptionsLabel(): string {
|
||||
const active = usePlayer((s) => Boolean(s.subtitlesShowing));
|
||||
return active ? <>Disable captions</> : <>Enable captions</>;
|
||||
return active ? 'Disable captions' : 'Enable captions';
|
||||
}
|
||||
|
||||
function PiPLabel(): ReactNode {
|
||||
function PiPLabel(): string {
|
||||
const pip = usePlayer((s) => Boolean(s.pip));
|
||||
return pip ? <>Exit picture-in-picture</> : <>Enter picture-in-picture</>;
|
||||
return pip ? 'Exit picture-in-picture' : 'Enter picture-in-picture';
|
||||
}
|
||||
|
||||
function FullscreenLabel(): ReactNode {
|
||||
function FullscreenLabel(): string {
|
||||
const fullscreen = usePlayer((s) => Boolean(s.fullscreen));
|
||||
return fullscreen ? <>Exit fullscreen</> : <>Enter fullscreen</>;
|
||||
return fullscreen ? 'Exit fullscreen' : 'Enter fullscreen';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
@@ -56,26 +56,26 @@ const errorClasses = {
|
||||
close: 'media-button',
|
||||
};
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function CaptionsLabel(): ReactNode {
|
||||
function CaptionsLabel(): string {
|
||||
const active = usePlayer((s) => Boolean(s.subtitlesShowing));
|
||||
return active ? <>Disable captions</> : <>Enable captions</>;
|
||||
return active ? 'Disable captions' : 'Enable captions';
|
||||
}
|
||||
|
||||
function PiPLabel(): ReactNode {
|
||||
function PiPLabel(): string {
|
||||
const pip = usePlayer((s) => Boolean(s.pip));
|
||||
return pip ? <>Exit picture-in-picture</> : <>Enter picture-in-picture</>;
|
||||
return pip ? 'Exit picture-in-picture' : 'Enter picture-in-picture';
|
||||
}
|
||||
|
||||
function FullscreenLabel(): ReactNode {
|
||||
function FullscreenLabel(): string {
|
||||
const fullscreen = usePlayer((s) => Boolean(s.fullscreen));
|
||||
return fullscreen ? <>Exit fullscreen</> : <>Enter fullscreen</>;
|
||||
return fullscreen ? 'Exit fullscreen' : 'Enter fullscreen';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
@@ -126,26 +126,26 @@ const errorClasses = {
|
||||
close: cn(button.base, button.default),
|
||||
};
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function CaptionsLabel(): ReactNode {
|
||||
function CaptionsLabel(): string {
|
||||
const active = usePlayer((s) => Boolean(s.subtitlesShowing));
|
||||
return active ? <>Disable captions</> : <>Enable captions</>;
|
||||
return active ? 'Disable captions' : 'Enable captions';
|
||||
}
|
||||
|
||||
function PiPLabel(): ReactNode {
|
||||
function PiPLabel(): string {
|
||||
const pip = usePlayer((s) => Boolean(s.pip));
|
||||
return pip ? <>Exit picture-in-picture</> : <>Enter picture-in-picture</>;
|
||||
return pip ? 'Exit picture-in-picture' : 'Enter picture-in-picture';
|
||||
}
|
||||
|
||||
function FullscreenLabel(): ReactNode {
|
||||
function FullscreenLabel(): string {
|
||||
const fullscreen = usePlayer((s) => Boolean(s.fullscreen));
|
||||
return fullscreen ? <>Exit fullscreen</> : <>Enter fullscreen</>;
|
||||
return fullscreen ? 'Exit fullscreen' : 'Enter fullscreen';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
@@ -56,26 +56,26 @@ const errorClasses = {
|
||||
close: 'media-button',
|
||||
};
|
||||
|
||||
function PlayLabel(): ReactNode {
|
||||
function PlayLabel(): string {
|
||||
const paused = usePlayer((s) => Boolean(s.paused));
|
||||
const ended = usePlayer((s) => Boolean(s.ended));
|
||||
if (ended) return <>Replay</>;
|
||||
return paused ? <>Play</> : <>Pause</>;
|
||||
if (ended) return 'Replay';
|
||||
return paused ? 'Play' : 'Pause';
|
||||
}
|
||||
|
||||
function CaptionsLabel(): ReactNode {
|
||||
function CaptionsLabel(): string {
|
||||
const active = usePlayer((s) => Boolean(s.subtitlesShowing));
|
||||
return active ? <>Disable captions</> : <>Enable captions</>;
|
||||
return active ? 'Disable captions' : 'Enable captions';
|
||||
}
|
||||
|
||||
function PiPLabel(): ReactNode {
|
||||
function PiPLabel(): string {
|
||||
const pip = usePlayer((s) => Boolean(s.pip));
|
||||
return pip ? <>Exit picture-in-picture</> : <>Enter picture-in-picture</>;
|
||||
return pip ? 'Exit picture-in-picture' : 'Enter picture-in-picture';
|
||||
}
|
||||
|
||||
function FullscreenLabel(): ReactNode {
|
||||
function FullscreenLabel(): string {
|
||||
const fullscreen = usePlayer((s) => Boolean(s.fullscreen));
|
||||
return fullscreen ? <>Exit fullscreen</> : <>Enter fullscreen</>;
|
||||
return fullscreen ? 'Exit fullscreen' : 'Enter fullscreen';
|
||||
}
|
||||
|
||||
function VolumePopover(): ReactNode {
|
||||
|
||||
+850
-146
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user