Skip to content

Commit

Permalink
nitpicks, activating playlist/:id page
Browse files Browse the repository at this point in the history
  • Loading branch information
sphinxrave committed Jul 20, 2024
1 parent 0bd5212 commit 416a9de
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 20 deletions.
28 changes: 28 additions & 0 deletions packages/react/src/components/common/TLDexLogo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// New atom for pinned orgs
export function TLDexLogo({
size = 24,
className,
}: {
size?: number | string;
className?: string;
}) {
return (
<svg
version="1.1"
id="Layer_1"
viewBox="0 0 24 24"
xmlSpace="preserve"
className={className}
style={{
fill: "currentcolor",
width: size,
height: size,
}}
>
<path
d="M20,2H4C2.9,2,2,2.9,2,4v18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M4,10h4v2H4V10z M14,16H4v-2h10V16z M20,16h-4v-2
h4V16z M20,12H10v-2h10V12z"
/>
</svg>
);
}
16 changes: 2 additions & 14 deletions packages/react/src/components/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import { MUSICDEX_URL } from "@/lib/consts";
import { useOnClickOutside } from "usehooks-ts";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/shadcn/ui/tooltip";
import { orgRankingAtom } from "@/store/org";

// New atom for pinned orgs
import { TLDexLogo } from "../common/TLDexLogo";

export function Sidebar() {
const { t } = useTranslation();
Expand Down Expand Up @@ -139,18 +138,7 @@ export function Sidebar() {
size="icon-lg"
onClick={() => setTldexOpen(!tldexOpen)}
>
<svg
version="1.1"
id="Layer_1"
viewBox="0 0 24 24"
xmlSpace="preserve"
style={{ fill: "var(--base-11)", width: 24, height: 24 }}
>
<path
d="M20,2H4C2.9,2,2,2.9,2,4v18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M4,10h4v2H4V10z M14,16H4v-2h10V16z M20,16h-4v-2
h4V16z M20,12H10v-2h10V12z"
/>
</svg>
<TLDexLogo></TLDexLogo>
</Button>
</TooltipTrigger>
<TooltipContent side="top">TLdex</TooltipContent>
Expand Down
6 changes: 4 additions & 2 deletions packages/react/src/components/video/VideoMenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
@apply flex gap-2 hover:text-base-12 text-base-11
}

.video-menu-item div:first-child {
.video-menu-item div:first-child,
.video-menu-item svg:first-child {
@apply text-base-9
}

.video-menu-item:hover div:first-child {
.video-menu-item:hover div:first-child,
.video-menu-item:hover svg:first-child {
@apply text-base-11
}
3 changes: 2 additions & 1 deletion packages/react/src/components/video/VideoMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { queueAtom } from "@/store/queue";
import { VideoCardType } from "./VideoCard";
import "./VideoMenu.css";
import { useVideoSelection } from "@/hooks/useVideoSelection";
import { TLDexLogo } from "../common/TLDexLogo";

const LazyNewPlaylistDialog = lazy(
() => import("@/components/playlist/NewPlaylistDialog"),
Expand Down Expand Up @@ -169,7 +170,7 @@ export function VideoMenu({ children, video, url }: VideoMenuProps) {
</DropdownMenuItem>
)}
<DropdownMenuItem className="video-menu-item">
<div className="i-heroicons:newspaper" />
<TLDexLogo size={16} />
{t("component.videoCard.openClient")}
</DropdownMenuItem>
{status === "past" && (
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/routes/about/general.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function AboutGeneral() {
{
className:
"border-orange-10 hover:bg-orange-4 hover:border-orange-10 text-orange-10",
href: "https://docs.holodex.net/docs/holodex/f4e6fa31af431-getting-started",
href: "https://docs.holodex.net/",
icon: "i-lucide:file-code",
label: t("about.quicklink.apiDocs"),
},
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/routes/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const Watch = lazy(() =>
const ResetClientPage = lazy(() =>
import("./debug").then((module) => ({ default: module.ResetClientPage })),
);
const Playlist = lazy(() => import("./playlist"));

const store = getDefaultStore();

Expand Down Expand Up @@ -133,7 +134,7 @@ export const routes = (
<Route path="orgs" Component={SettingsOrgs} />
</Route>
<Route path="playlists" Component={Playlists} />
<Route path="playlist/:id" element={<div>Playlist Page</div>} />
<Route path="playlist/:id" element={Playlist} />
<Route path="about" Component={About}>
<Route index Component={AboutGeneral} />
<Route path="general" Component={AboutGeneral} />
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/routes/settings/homepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function SettingsHomepage() {
{
value: "Favorites",
label: t("views.settings.defaultHomepage.favoritesWhenLoggedIn"),
icon: "i-lucide:heart",
icon: "i-heroicons:heart",
},
] as const;

Expand Down

0 comments on commit 416a9de

Please sign in to comment.