|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
import classNames from "classnames"; |
|
|
|
import { useCallback, useEffect, useState } from "react"; |
|
|
|
import { useCallback, useEffect, useState } from "react"; |
|
|
|
|
|
|
|
|
|
|
|
import { Toggle } from "@/components/buttons/Toggle"; |
|
|
|
import { Toggle } from "@/components/buttons/Toggle"; |
|
|
@ -93,6 +94,31 @@ function QualityView({ id }: { id: string }) { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ColorOption(props: { |
|
|
|
|
|
|
|
color: string; |
|
|
|
|
|
|
|
active?: boolean; |
|
|
|
|
|
|
|
onClick: () => void; |
|
|
|
|
|
|
|
}) { |
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
className={classNames( |
|
|
|
|
|
|
|
"p-1.5 bg-video-context-buttonFocus rounded transition-colors duration-100", |
|
|
|
|
|
|
|
props.active ? "bg-opacity-100" : "bg-opacity-0 cursor-pointer" |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
onClick={props.onClick} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div |
|
|
|
|
|
|
|
className="w-6 h-6 rounded-full flex justify-center items-center" |
|
|
|
|
|
|
|
style={{ backgroundColor: props.color }} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{props.active ? ( |
|
|
|
|
|
|
|
<Icon className="text-sm text-black" icon={Icons.CHECKMARK} /> |
|
|
|
|
|
|
|
) : null} |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function CaptionSettingsView({ id }: { id: string }) { |
|
|
|
function CaptionSettingsView({ id }: { id: string }) { |
|
|
|
const router = useOverlayRouter(id); |
|
|
|
const router = useOverlayRouter(id); |
|
|
|
|
|
|
|
|
|
|
@ -102,12 +128,32 @@ function CaptionSettingsView({ id }: { id: string }) { |
|
|
|
Custom captions |
|
|
|
Custom captions |
|
|
|
</Context.BackLink> |
|
|
|
</Context.BackLink> |
|
|
|
<Context.Section> |
|
|
|
<Context.Section> |
|
|
|
<Context.SmallText>Hello!</Context.SmallText> |
|
|
|
<div className="flex justify-between items-center"> |
|
|
|
|
|
|
|
<Context.FieldTitle>Color</Context.FieldTitle> |
|
|
|
|
|
|
|
<div className="flex justify-center items-center"> |
|
|
|
|
|
|
|
<ColorOption onClick={() => {}} color="#FFFFFF" active /> |
|
|
|
|
|
|
|
<ColorOption onClick={() => {}} color="#80B1FA" /> |
|
|
|
|
|
|
|
<ColorOption onClick={() => {}} color="#E2E535" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</Context.Section> |
|
|
|
</Context.Section> |
|
|
|
</> |
|
|
|
</> |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function CaptionsView({ id }: { id: string }) { |
|
|
|
|
|
|
|
const router = useOverlayRouter(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<> |
|
|
|
|
|
|
|
<Context.BackLink onClick={() => router.navigate("/captions")}> |
|
|
|
|
|
|
|
Captions |
|
|
|
|
|
|
|
</Context.BackLink> |
|
|
|
|
|
|
|
<Context.Section>Yee!</Context.Section> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function SettingsOverlay({ id }: { id: string }) { |
|
|
|
function SettingsOverlay({ id }: { id: string }) { |
|
|
|
const router = useOverlayRouter(id); |
|
|
|
const router = useOverlayRouter(id); |
|
|
|
const currentQuality = usePlayerStore((s) => s.currentQuality); |
|
|
|
const currentQuality = usePlayerStore((s) => s.currentQuality); |
|
|
@ -165,15 +211,7 @@ function SettingsOverlay({ id }: { id: string }) { |
|
|
|
</OverlayPage> |
|
|
|
</OverlayPage> |
|
|
|
<OverlayPage id={id} path="/captions" width={343} height={431}> |
|
|
|
<OverlayPage id={id} path="/captions" width={343} height={431}> |
|
|
|
<Context.Card> |
|
|
|
<Context.Card> |
|
|
|
<Context.BackLink onClick={() => router.navigate("/")}> |
|
|
|
<CaptionsView id={id} /> |
|
|
|
Captions |
|
|
|
|
|
|
|
</Context.BackLink> |
|
|
|
|
|
|
|
<button |
|
|
|
|
|
|
|
type="button" |
|
|
|
|
|
|
|
onClick={() => router.navigate("/captions/settings")} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Go to caption settings |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
</Context.Card> |
|
|
|
</Context.Card> |
|
|
|
</OverlayPage> |
|
|
|
</OverlayPage> |
|
|
|
<OverlayPage id={id} path="/captions/settings" width={343} height={431}> |
|
|
|
<OverlayPage id={id} path="/captions/settings" width={343} height={431}> |
|
|
|