v4: the header drops the username link — on wide screens it stood beside the avatar, which leads to the same profile, so only Playlists stays there. The avatar's menu still opens with @username first. 670 frontend tests pass, and tsc, eslint, deno fmt and i18n:compile --strict are clean; checked in a screenshot in Smooth dark at 1400px.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -607,7 +607,7 @@ msgstr "Cancel removal"
|
||||
msgid "Cancel reply"
|
||||
msgstr "Cancel reply"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:188
|
||||
#: src/components/layout/AppHeader.tsx:182
|
||||
msgid "Cancel search"
|
||||
msgstr "Cancel search"
|
||||
|
||||
@@ -869,7 +869,7 @@ msgstr "Drop a file here, or paste one"
|
||||
msgid "Drop a replacement here"
|
||||
msgstr "Drop a replacement here"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:207
|
||||
#: src/components/layout/AppHeader.tsx:201
|
||||
msgid "Dump"
|
||||
msgstr "Dump"
|
||||
|
||||
@@ -1176,7 +1176,7 @@ msgstr "Link or file"
|
||||
msgid "Live updates are temporarily disconnected. Trying to reconnect…"
|
||||
msgstr "Live updates are temporarily disconnected. Trying to reconnect…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:240
|
||||
#: src/components/layout/AppHeader.tsx:234
|
||||
msgid "Live updates unavailable."
|
||||
msgstr "Live updates unavailable."
|
||||
|
||||
@@ -1219,7 +1219,7 @@ msgstr "Loading profile…"
|
||||
msgid "Loading…"
|
||||
msgstr "Loading…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:214
|
||||
#: src/components/layout/AppHeader.tsx:208
|
||||
#: src/pages/UserLogin.tsx:41
|
||||
#: src/pages/UserLogin.tsx:67
|
||||
#: src/pages/UserLogin.tsx:86
|
||||
@@ -1463,7 +1463,7 @@ msgid "Play"
|
||||
msgstr "Play"
|
||||
|
||||
#: src/components/dump/create/StepIndicator.tsx:21
|
||||
#: src/components/layout/AppHeader.tsx:178
|
||||
#: src/components/layout/AppHeader.tsx:172
|
||||
#: src/components/layout/UserMenu.tsx:85
|
||||
#: src/components/profile/ProfileFollowTab.tsx:167
|
||||
#: src/components/profile/ProfilePlaylistsTab.tsx:118
|
||||
@@ -1633,7 +1633,7 @@ msgstr "Save"
|
||||
msgid "Saving…"
|
||||
msgstr "Saving…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:188
|
||||
#: src/components/layout/AppHeader.tsx:182
|
||||
#: src/components/layout/SearchBar.tsx:83
|
||||
#: src/pages/Search.tsx:69
|
||||
msgid "Search"
|
||||
@@ -1676,7 +1676,7 @@ msgstr "Send reset link"
|
||||
msgid "Sending…"
|
||||
msgstr "Sending…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:204
|
||||
#: src/components/layout/AppHeader.tsx:198
|
||||
msgid "Server unreachable"
|
||||
msgstr "Server unreachable"
|
||||
|
||||
|
||||
@@ -607,7 +607,7 @@ msgstr "Annuler la suppression"
|
||||
msgid "Cancel reply"
|
||||
msgstr "Annuler la réponse"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:188
|
||||
#: src/components/layout/AppHeader.tsx:182
|
||||
msgid "Cancel search"
|
||||
msgstr "Annuler la recherche"
|
||||
|
||||
@@ -869,7 +869,7 @@ msgstr "Déposez un fichier ici, ou collez-en un"
|
||||
msgid "Drop a replacement here"
|
||||
msgstr "Déposez un fichier de remplacement ici"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:207
|
||||
#: src/components/layout/AppHeader.tsx:201
|
||||
msgid "Dump"
|
||||
msgstr "Reco"
|
||||
|
||||
@@ -1176,7 +1176,7 @@ msgstr "Lien ou fichier"
|
||||
msgid "Live updates are temporarily disconnected. Trying to reconnect…"
|
||||
msgstr "Les mises à jour en direct sont temporairement interrompues. Tentative de reconnexion…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:240
|
||||
#: src/components/layout/AppHeader.tsx:234
|
||||
msgid "Live updates unavailable."
|
||||
msgstr "Mises à jour en direct indisponibles."
|
||||
|
||||
@@ -1219,7 +1219,7 @@ msgstr "Chargement du profil…"
|
||||
msgid "Loading…"
|
||||
msgstr "Chargement…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:214
|
||||
#: src/components/layout/AppHeader.tsx:208
|
||||
#: src/pages/UserLogin.tsx:41
|
||||
#: src/pages/UserLogin.tsx:67
|
||||
#: src/pages/UserLogin.tsx:86
|
||||
@@ -1463,7 +1463,7 @@ msgid "Play"
|
||||
msgstr "Lecture"
|
||||
|
||||
#: src/components/dump/create/StepIndicator.tsx:21
|
||||
#: src/components/layout/AppHeader.tsx:178
|
||||
#: src/components/layout/AppHeader.tsx:172
|
||||
#: src/components/layout/UserMenu.tsx:85
|
||||
#: src/components/profile/ProfileFollowTab.tsx:167
|
||||
#: src/components/profile/ProfilePlaylistsTab.tsx:118
|
||||
@@ -1633,7 +1633,7 @@ msgstr "Enregistrer"
|
||||
msgid "Saving…"
|
||||
msgstr "Enregistrement…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:188
|
||||
#: src/components/layout/AppHeader.tsx:182
|
||||
#: src/components/layout/SearchBar.tsx:83
|
||||
#: src/pages/Search.tsx:69
|
||||
msgid "Search"
|
||||
@@ -1676,7 +1676,7 @@ msgstr "Envoyer le lien de réinitialisation"
|
||||
msgid "Sending…"
|
||||
msgstr "Envoi…"
|
||||
|
||||
#: src/components/layout/AppHeader.tsx:204
|
||||
#: src/components/layout/AppHeader.tsx:198
|
||||
msgid "Server unreachable"
|
||||
msgstr "Serveur inaccessible"
|
||||
|
||||
|
||||
@@ -159,18 +159,12 @@ export function AppHeader(
|
||||
<nav className="app-header-nav">
|
||||
{
|
||||
/* The user's own links lead the row, so the icons after them run
|
||||
unbroken to the "+": the text links on wide screens, then the
|
||||
avatar's menu at every width. */
|
||||
unbroken to the "+": Playlists on wide screens, then the
|
||||
avatar's menu, which leads to their profile, at every width. */
|
||||
}
|
||||
{user && (
|
||||
<>
|
||||
<div className="nav-links">
|
||||
<Link
|
||||
to={userPath(user.username)}
|
||||
className="app-header-user"
|
||||
>
|
||||
{user.username}
|
||||
</Link>
|
||||
<Link
|
||||
to={userPath(user.username, "playlists")}
|
||||
className="app-header-user"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Renders the avatar menu that leads the header's icon row at every width: it
|
||||
* holds the profile and playlists links (on small screens, the only ones), the
|
||||
* settings, the site's tools, and logging out.
|
||||
* holds the profile link, the playlists one (on small screens, the only one),
|
||||
* the settings, the site's tools, and logging out.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
|
||||
@@ -24,10 +24,12 @@ describe("AppHeader", () => {
|
||||
renderWithContexts(<AppHeader disableNew />, {
|
||||
session: makeSession({ username: "ann" }),
|
||||
});
|
||||
expect(screen.getByRole("link", { name: "ann" })).toHaveAttribute(
|
||||
expect(screen.getByRole("link", { name: "Playlists" })).toHaveAttribute(
|
||||
"href",
|
||||
"/@ann",
|
||||
"/@ann/playlists",
|
||||
);
|
||||
expect(screen.getByRole("button", { name: "User menu" }))
|
||||
.toBeInTheDocument();
|
||||
expect(screen.getByRole("button", { name: "Chat" })).toBeInTheDocument();
|
||||
expect(screen.getByRole("button", { name: "Notifications" }))
|
||||
.toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user