12 changed files with 308 additions and 239 deletions
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
import { Icons } from "@/components/Icon"; |
||||
import { useTranslation } from "react-i18next"; |
||||
import { PopoutListAction } from "../popouts/PopoutUtils"; |
||||
import { PopoutListAction } from "../../popouts/PopoutUtils"; |
||||
|
||||
interface Props { |
||||
onClick: () => any; |
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
import { Icon, Icons } from "@/components/Icon"; |
||||
import { useTranslation } from "react-i18next"; |
||||
import { PopoutListAction } from "../popouts/PopoutUtils"; |
||||
import { PopoutListAction } from "../../popouts/PopoutUtils"; |
||||
import { QualityDisplayAction } from "./QualityDisplayAction"; |
||||
|
||||
interface Props { |
@ -1,49 +1,29 @@
@@ -1,49 +1,29 @@
|
||||
import { FloatingCardView } from "@/components/popout/FloatingCard"; |
||||
import { FloatingDragHandle } from "@/components/popout/FloatingDragHandle"; |
||||
import { FloatingView } from "@/components/popout/FloatingView"; |
||||
import { useFloatingRouter } from "@/hooks/useFloatingRouter"; |
||||
import { DownloadAction } from "@/video/components/actions/list-entries/DownloadAction"; |
||||
import { CaptionsSelectionAction } from "../actions/CaptionsSelectionAction"; |
||||
import { SourceSelectionAction } from "../actions/SourceSelectionAction"; |
||||
import { CaptionsSelectionAction } from "@/video/components/actions/list-entries/CaptionsSelectionAction"; |
||||
import { SourceSelectionAction } from "@/video/components/actions/list-entries/SourceSelectionAction"; |
||||
import { CaptionSelectionPopout } from "./CaptionSelectionPopout"; |
||||
import { PopoutSection } from "./PopoutUtils"; |
||||
import { SourceSelectionPopout } from "./SourceSelectionPopout"; |
||||
|
||||
function TestPopout(props: { router: ReturnType<typeof useFloatingRouter> }) { |
||||
const isCollapsed = props.router.isLoaded("embed"); |
||||
|
||||
return ( |
||||
<div> |
||||
<p onClick={() => props.router.navigate("/")}>go back</p> |
||||
<p>{isCollapsed ? "opened" : "closed"}</p> |
||||
<p onClick={() => props.router.navigate("/source/embed")}>Open</p> |
||||
</div> |
||||
); |
||||
} |
||||
|
||||
export function SettingsPopout() { |
||||
const floatingRouter = useFloatingRouter(); |
||||
const { pageProps, navigate, isLoaded, isActive } = floatingRouter; |
||||
const { pageProps, navigate } = floatingRouter; |
||||
|
||||
return ( |
||||
<> |
||||
<FloatingView {...pageProps("/")} width={320}> |
||||
<PopoutSection> |
||||
<FloatingDragHandle /> |
||||
<FloatingCardView.Content> |
||||
<DownloadAction /> |
||||
<SourceSelectionAction onClick={() => navigate("/source")} /> |
||||
<CaptionsSelectionAction onClick={() => navigate("/captions")} /> |
||||
</PopoutSection> |
||||
</FloatingView> |
||||
<FloatingView |
||||
active={isActive("source")} |
||||
show={isLoaded("source")} |
||||
height={500} |
||||
width={320} |
||||
> |
||||
{/* <TestPopout router={floatingRouter} /> */} |
||||
<SourceSelectionPopout /> |
||||
</FloatingView> |
||||
<FloatingView {...pageProps("captions")} height={500} width={320}> |
||||
<CaptionSelectionPopout /> |
||||
</FloatingCardView.Content> |
||||
</FloatingView> |
||||
<SourceSelectionPopout router={floatingRouter} prefix="source" /> |
||||
<CaptionSelectionPopout router={floatingRouter} prefix="captions" /> |
||||
</> |
||||
); |
||||
} |
||||
|
Loading…
Reference in new issue