diff --git a/Grayjay.Desktop.Web/src/components/containers/ContentGrid/index.tsx b/Grayjay.Desktop.Web/src/components/containers/ContentGrid/index.tsx index b01ea937..474215cd 100644 --- a/Grayjay.Desktop.Web/src/components/containers/ContentGrid/index.tsx +++ b/Grayjay.Desktop.Web/src/components/containers/ContentGrid/index.tsx @@ -169,13 +169,13 @@ const ContentGrid: Component = (props) => { const renderCreator = (creator: IPlatformAuthorLink) => { return ( - navigate("/web/channel?url=" + encodeURIComponent(creator.url), { state: { author: creator } })} thumbnail={creator.thumbnail} metadata={((creator.subscribers && creator.subscribers > 0) ? (toHumanNumber(creator.subscribers) + " subscribers") : "")} - url={creator.url} /> + url={creator.url} /> ); }; @@ -186,11 +186,11 @@ const ContentGrid: Component = (props) => { }); return ( - navigate("/web/remotePlaylist?url=" + encodeURIComponent(playlist.url))} /> + onClick={() => navigate("/web/remotePlaylist?url=" + encodeURIComponent(playlist.url))} /> ); //onSettings={(e) => onSettingsClicked(e, playlist)} }; @@ -231,24 +231,25 @@ const ContentGrid: Component = (props) => { builder={(index, item) => - onSettingsClicked(e, content)} - onAddtoQueue={(e, content)=>video?.actions.addToQueue(content as IPlatformVideo)} - onClick={() => { - const url = item().backendUrl ?? item().url; - if (url) - video?.actions.openVideo(item() as IPlatformVideo); - }} /> + + onSettingsClicked(e, content)} + onAddtoQueue={(e, content)=>video?.actions.addToQueue(content as IPlatformVideo)} + onClick={() => { + const url = item().backendUrl ?? item().url; + if (url) + video?.actions.openVideo(item() as IPlatformVideo); + }} /> - onSettingsClicked(e, content)} onClick={() =>{ const url = item().backendUrl ?? item().url; if(url) navigate("/web/details/post?url=" + encodeURIComponent(url)); - }} /> + }} /> = (props) => {
{props.video?.name}
- + +
-
{props.video?.author?.name ?? "Unknown"}
+ +
0}>{toHumanNumber(props.video?.viewCount)} views • {toHumanNowDiffString(props.video?.dateTime)}
@@ -100,14 +104,18 @@ const VideoThumbnailView: Component = (props) => { + props.onAddtoQueue?.(refAddToQueueButton!, props.video!)} /> + height={"22px"} width={"22px"} ref={refAddToQueueButton} onClick={() => {props.onAddtoQueue?.(refAddToQueueButton!, props.video!); return false;}} /> + - props.onSettings?.(refMoreButton!, props.video!)} /> + + {console.log(1111.1); props.onSettings?.(refMoreButton!, props.video!); return false;}} /> +
diff --git a/Grayjay.Desktop.Web/src/components/contentDetails/VideoDetailView/index.tsx b/Grayjay.Desktop.Web/src/components/contentDetails/VideoDetailView/index.tsx index 041f9c02..73994c21 100644 --- a/Grayjay.Desktop.Web/src/components/contentDetails/VideoDetailView/index.tsx +++ b/Grayjay.Desktop.Web/src/components/contentDetails/VideoDetailView/index.tsx @@ -525,7 +525,6 @@ const VideoDetailView: Component = (props) => { const isMinimized = createMemo(() => { const res = video?.state() === VideoState.Minimized && !isFullscreen(); - console.log("isMinimized", res); return res; }); @@ -594,10 +593,18 @@ const VideoDetailView: Component = (props) => { repositionMinimize(); }; - onMount(() => { + const [params, setParams] = useSearchParams(); + onMount(async () => { resizeObserver.observe(scrollContainerRef!); window.addEventListener('resize', handleWindowResize); setDimensions({ width: scrollContainerRef!.clientWidth, height: scrollContainerRef!.clientHeight }); + if(location.pathname==="/web/video"){ + const url=params.url; + const result = (!url) ? null : (await DetailsBackend.videoLoad(url)); + if(result){ + video?.actions.openVideo(result?.video); + } + } }); onCleanup(() => { @@ -1382,18 +1389,20 @@ const VideoDetailView: Component = (props) => {
- author + author -
-
{author$()?.name}
-
- 0}> -
{toHumanNumber(author$()?.subscribers)} subscribers
+ +
+
{author$()?.name}
- -
+ 0}> +
{toHumanNumber(author$()?.subscribers)} subscribers
+
+
+
+ diff --git a/Grayjay.Desktop.Web/src/components/menus/SideBar/index.tsx b/Grayjay.Desktop.Web/src/components/menus/SideBar/index.tsx index c33b2daf..2d4db233 100644 --- a/Grayjay.Desktop.Web/src/components/menus/SideBar/index.tsx +++ b/Grayjay.Desktop.Web/src/components/menus/SideBar/index.tsx @@ -150,6 +150,7 @@ const SideBar: Component = (props: SideBarProps) => { icon: iconSettings, name: 'Settings', action: () => UIOverlay.overlaySettings(), + path: '/web/settings', selected: location.pathname === '/web/settings' }); @@ -257,14 +258,14 @@ const SideBar: Component = (props: SideBarProps) => {
{topButtons$().slice(0, visibleTopButtonCount$()).map(btn => ( - btn.action ? btn.action() : navigateTo(btn.path!, options)} onRightClick={btn.onRightClick} - /> + /> ))} 0}> = (props: SideBarProps) => { + { const author = item$()?.channel; if (!author) { @@ -302,6 +304,7 @@ const SideBar: Component = (props: SideBarProps) => { } navigate("/web/channel?url=" + encodeURIComponent(author!.url), { state: { author } }); }} icon={item$()?.channel?.thumbnail} name={item$()?.channel?.name} selected={false} /> + } />
@@ -312,13 +315,13 @@ const SideBar: Component = (props: SideBarProps) => {
{bottomButtons$().map(btn => ( - btn.action ? btn.action() : navigateTo(btn.path!, options)} - /> + /> ))}
@@ -335,14 +338,14 @@ const SideBar: Component = (props: SideBarProps) => {
{topButtons$().slice(visibleTopButtonCount$(), visibleTopButtonCount$() + moreTopButtonCount$()).map(btn => ( - btn.action ? btn.action() : navigateTo(btn.path!, options)} onRightClick={btn.onRightClick} - /> + /> ))}
diff --git a/Grayjay.Desktop.Web/src/components/player/PlayerControlsView/index.tsx b/Grayjay.Desktop.Web/src/components/player/PlayerControlsView/index.tsx index f84cea70..481a2a2a 100644 --- a/Grayjay.Desktop.Web/src/components/player/PlayerControlsView/index.tsx +++ b/Grayjay.Desktop.Web/src/components/player/PlayerControlsView/index.tsx @@ -285,7 +285,6 @@ const PlayerControlsView: Component = (props) => { return; } } - switch (ev.key) { case " ": case "k": diff --git a/Grayjay.Desktop.Web/src/index.css b/Grayjay.Desktop.Web/src/index.css index baf534e3..c54b37a7 100644 --- a/Grayjay.Desktop.Web/src/index.css +++ b/Grayjay.Desktop.Web/src/index.css @@ -56,4 +56,9 @@ code { img { -webkit-user-drag: none; +} + +a { + color: inherit; + text-decoration: inherit } \ No newline at end of file diff --git a/Grayjay.Desktop.Web/src/index.tsx b/Grayjay.Desktop.Web/src/index.tsx index 86f41b7e..e367847f 100644 --- a/Grayjay.Desktop.Web/src/index.tsx +++ b/Grayjay.Desktop.Web/src/index.tsx @@ -149,9 +149,11 @@ const App: Component = (props) => { render(() => ( - - - + + + + + diff --git a/Grayjay.Desktop.Web/src/pages/Creators/index.tsx b/Grayjay.Desktop.Web/src/pages/Creators/index.tsx index b1d5653b..d2311498 100644 --- a/Grayjay.Desktop.Web/src/pages/Creators/index.tsx +++ b/Grayjay.Desktop.Web/src/pages/Creators/index.tsx @@ -161,6 +161,7 @@ const CreatorsPage: Component = () => { "margin-top": "7px"*/ }} builder={(index, item) => + 0) ? (toHumanNumber(item()?.channel?.subscribers) + " subscribers") : "")} onClick={() => { @@ -172,7 +173,7 @@ const CreatorsPage: Component = () => { showSubscriptionSettings(el, item()); }} subscription={item()} - isSubscribedInitialState={true} /> + isSubscribedInitialState={true} /> } /> diff --git a/Grayjay.Desktop.Web/src/pages/History/index.tsx b/Grayjay.Desktop.Web/src/pages/History/index.tsx index 509f3668..50619bfc 100644 --- a/Grayjay.Desktop.Web/src/pages/History/index.tsx +++ b/Grayjay.Desktop.Web/src/pages/History/index.tsx @@ -284,7 +284,7 @@ const HistoryPage: Component = () => { "width": historyVideo() ? `${(getVideoProgressPercentage(historyVideo()?.position, historyVideo()?.video?.duration))}%` : undefined }} /> - +
{ }); return ( - + { @@ -309,6 +310,7 @@ const PlaylistsPage: Component = () => { onSettingsClicked(e, playlist); } }} /> + ); }} />