mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-20 13:12:06 +00:00
This commit updates the import statements in the codebase to comply with ESLint rules for import ordering. All imports have been sorted alphabetically and grouped according to the specified import groups in the ESLint configuration. This improves the codebase's consistency and maintainability.
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
import { useTranslation } from "react-i18next";
|
|
|
|
import { Icons } from "@/components/Icon";
|
|
import { FloatingAnchor } from "@/components/popout/FloatingAnchor";
|
|
import { useIsMobile } from "@/hooks/useIsMobile";
|
|
import { VideoPlayerIconButton } from "@/video/components/parts/VideoPlayerIconButton";
|
|
import { useVideoPlayerDescriptor } from "@/video/state/hooks";
|
|
import { useControls } from "@/video/state/logic/controls";
|
|
import { useInterface } from "@/video/state/logic/interface";
|
|
|
|
interface Props {
|
|
className?: string;
|
|
}
|
|
|
|
export function SettingsAction(props: Props) {
|
|
const { t } = useTranslation();
|
|
const descriptor = useVideoPlayerDescriptor();
|
|
const controls = useControls(descriptor);
|
|
const videoInterface = useInterface(descriptor);
|
|
const { isMobile } = useIsMobile(false);
|
|
|
|
return (
|
|
<div className={props.className}>
|
|
<div className="relative">
|
|
<FloatingAnchor id="settings">
|
|
<VideoPlayerIconButton
|
|
active={videoInterface.popout === "settings"}
|
|
className={props.className}
|
|
onClick={() => controls.openPopout("settings")}
|
|
text={
|
|
isMobile
|
|
? (t("videoPlayer.buttons.settings") as string)
|
|
: undefined
|
|
}
|
|
icon={Icons.GEAR}
|
|
/>
|
|
</FloatingAnchor>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|