v4: the header has two playlists links, each to its own page — it had three: the text button and the avatar menu's "Playlists" both led to the user's own playlists, and the menu's "All playlists" to /playlists. The text button now leads to /playlists, every public playlist, and shows to guests too, the page being open to them. The menu keeps one entry, "My playlists", to the user's own. Below 1150px, where the text button is hidden, the header no longer links to /playlists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
khannurien
2026-10-10 08:29:08 +00:00
parent 28f910b00e
commit 7dd00068df
8 changed files with 131 additions and 142 deletions

View File

@@ -1,7 +1,8 @@
/**
* Renders the avatar menu that leads the header's icon row at every width: it
* holds the profile link, the playlists one (on small screens, the only one),
* the community page, the settings, the site's tools, and logging out.
* holds the profile link, the user's own playlists (the header's text link
* leads to everyone's), the community page, the settings, the site's tools, and
* logging out.
*
* @module
*/
@@ -15,11 +16,7 @@ import { DIGEST_MESSAGES } from "../../../shared/digest-messages.ts";
import { Avatar } from "../shared/Avatar.tsx";
import type { SelfUser } from "../../../shared/user.ts";
import { can } from "../../utils/auth/permissions.ts";
import {
communityPath,
playlistsPath,
userPath,
} from "../../../shared/paths.ts";
import { communityPath, userPath } from "../../../shared/paths.ts";
import { useAuth } from "../../hooks/auth/useAuth.ts";
/** Passed to {@link UserMenu} by `AppHeader`, for a signed-in user. */
@@ -89,7 +86,7 @@ export function UserMenu({ user }: UserMenuProps): React.JSX.Element {
role="menuitem"
onClick={() => setOpen(false)}
>
<Trans>Playlists</Trans>
<Trans>My playlists</Trans>
</Link>
<Link
to={communityPath()}
@@ -99,14 +96,6 @@ export function UserMenu({ user }: UserMenuProps): React.JSX.Element {
>
{i18n._(DIGEST_MESSAGES.community)}
</Link>
<Link
to={playlistsPath()}
className="user-menu-item"
role="menuitem"
onClick={() => setOpen(false)}
>
<Trans>All playlists</Trans>
</Link>
<Link
to="/settings"
className="user-menu-item"