v4: a profile's lists of dumps can be narrowed to a category — /@name/dumps and /@name/upvoted showed every dump, with no way to see only those filed under one category, as the index can. The title row of each list now has the index's category menu, and the category picked goes in the URL as ?category=<slug>, which the other list keeps and every other tab drops (a path segment would collide with /@name/dumps/<slug>, a dump's own page). GET /api/users/:key/dumps and /upvoted take ?category= as the followed feed does, an unknown slug answering an empty list; resolveCategoryFilter moves to category-service.ts for both. useUserDumpFeed passes everything the socket changes through the category, so a dump edited out of it leaves and an upvote outside it doesn't come in. CategorySwitcher now reports the category picked to its owner (onSelect) instead of navigating to the index's path itself, and the divider after it in the index's tab row is drawn by CSS, so the profile gets none. useTabParam's setter takes the query string to go to, the current one by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
khannurien
2026-10-09 18:23:03 +00:00
parent 52a23db504
commit 63803c552f
17 changed files with 422 additions and 199 deletions

View File

@@ -207,7 +207,7 @@ msgstr "# Welcome to {site}!\n"
#: src/components/dump/create/DumpCreateModal.tsx:742
#: src/pages/PlaylistDetail.tsx:80
#: src/pages/UserPublicProfile.tsx:123
#: src/pages/UserPublicProfile.tsx:125
msgid "← Back"
msgstr "← Back"
@@ -339,8 +339,8 @@ msgstr "added to {playlist}"
msgid "Admin"
msgstr "Admin"
#: src/components/category/CategorySwitcher.tsx:96
#: src/components/category/CategorySwitcher.tsx:99
#: src/components/category/CategorySwitcher.tsx:100
#: src/components/category/CategorySwitcher.tsx:103
msgid "All"
msgstr "All"
@@ -458,7 +458,7 @@ msgstr "Cancel search"
msgid "Categories"
msgstr "Categories"
#: src/components/category/CategorySwitcher.tsx:119
#: src/components/category/CategorySwitcher.tsx:123
msgid "Category"
msgstr "Category"
@@ -761,9 +761,9 @@ msgstr "Dump it"
msgid "Dumped!"
msgstr "Dumped!"
#: src/components/profile/ProfileDumpsTab.tsx:45
#: src/components/profile/ProfileDumpsTab.tsx:46
#: src/pages/Search.tsx:120
#: src/pages/UserPublicProfile.tsx:158
#: src/pages/UserPublicProfile.tsx:160
msgid "Dumps"
msgstr "Dumps"
@@ -943,10 +943,10 @@ msgstr "Follow some public playlists to see their dumps here."
msgid "Follow some users to see their dumps here."
msgstr "Follow some users to see their dumps here."
#: src/components/feed/FeedTabBar.tsx:43
#: src/components/feed/FeedTabBar.tsx:44
#: src/components/profile/ProfileFollowTab.tsx:140
#: src/pages/Settings.tsx:57
#: src/pages/UserPublicProfile.tsx:161
#: src/pages/UserPublicProfile.tsx:163
msgid "Followed"
msgstr "Followed"
@@ -994,7 +994,7 @@ msgstr "Go to login"
msgid "email.reset.hi"
msgstr "Hi {username},"
#: src/components/feed/FeedTabBar.tsx:39
#: src/components/feed/FeedTabBar.tsx:40
#: src/pages/Settings.tsx:54
msgid "Hot"
msgstr "Hot"
@@ -1064,7 +1064,7 @@ msgid "digest.invitedByYou"
msgstr "invited by you"
#: src/components/profile/ProfileInviteesTab.tsx:77
#: src/pages/UserPublicProfile.tsx:162
#: src/pages/UserPublicProfile.tsx:164
msgid "Invitees"
msgstr "Invitees"
@@ -1140,7 +1140,7 @@ msgstr "Loading more…"
msgid "Loading playlist…"
msgstr "Loading playlist…"
#: src/pages/UserPublicProfile.tsx:106
#: src/pages/UserPublicProfile.tsx:108
msgid "Loading profile…"
msgstr "Loading profile…"
@@ -1178,7 +1178,7 @@ msgid "Log in with {0}"
msgstr "Log in with {0}"
#: src/components/layout/UserMenu.tsx:127
#: src/pages/UserPublicProfile.tsx:131
#: src/pages/UserPublicProfile.tsx:133
msgid "Log out"
msgstr "Log out"
@@ -1198,7 +1198,7 @@ msgstr "Lowercase letters, numbers and single hyphens only"
#: src/components/layout/UserMenu.tsx:114
#: src/pages/Manage.tsx:32
#: src/pages/Manage.tsx:40
#: src/pages/UserPublicProfile.tsx:164
#: src/pages/UserPublicProfile.tsx:166
msgid "Manage"
msgstr "Manage"
@@ -1225,7 +1225,7 @@ msgid "Name"
msgstr "Name"
#: src/components/chat/ChatModal.tsx:692
#: src/components/feed/FeedTabBar.tsx:40
#: src/components/feed/FeedTabBar.tsx:41
#: src/pages/Settings.tsx:55
msgid "New"
msgstr "New"
@@ -1331,7 +1331,7 @@ msgstr "Nothing happened this month."
msgid "Nothing happened this week."
msgstr "Nothing happened this week."
#: src/components/profile/ProfileDumpsTab.tsx:53
#: src/components/profile/ProfileDumpsTab.tsx:96
#: src/components/profile/ProfileOverviewTab.tsx:47
#: src/pages/Notifications.tsx:522
msgid "Nothing here yet."
@@ -1404,7 +1404,7 @@ msgstr "Or log in with your account on another gerbeur"
msgid "Other instances"
msgstr "Other instances"
#: src/pages/UserPublicProfile.tsx:157
#: src/pages/UserPublicProfile.tsx:159
msgid "Overview"
msgstr "Overview"
@@ -1465,7 +1465,7 @@ msgstr "Play"
#: src/components/profile/ProfileFollowTab.tsx:144
#: src/components/profile/ProfilePlaylistsTab.tsx:118
#: src/pages/Search.tsx:123
#: src/pages/UserPublicProfile.tsx:160
#: src/pages/UserPublicProfile.tsx:162
msgid "Playlists"
msgstr "Playlists"
@@ -1987,8 +1987,8 @@ msgstr "Uploading…"
msgid "Upvote"
msgstr "Upvote"
#: src/components/profile/ProfileDumpsTab.tsx:45
#: src/pages/UserPublicProfile.tsx:159
#: src/components/profile/ProfileDumpsTab.tsx:46
#: src/pages/UserPublicProfile.tsx:161
msgid "Upvoted"
msgstr "Upvoted"

View File

@@ -207,7 +207,7 @@ msgstr "# Bienvenue sur {site} !\n"
#: src/components/dump/create/DumpCreateModal.tsx:742
#: src/pages/PlaylistDetail.tsx:80
#: src/pages/UserPublicProfile.tsx:123
#: src/pages/UserPublicProfile.tsx:125
msgid "← Back"
msgstr "← Retour"
@@ -339,8 +339,8 @@ msgstr "ajoutée à {playlist}"
msgid "Admin"
msgstr "Administrateur"
#: src/components/category/CategorySwitcher.tsx:96
#: src/components/category/CategorySwitcher.tsx:99
#: src/components/category/CategorySwitcher.tsx:100
#: src/components/category/CategorySwitcher.tsx:103
msgid "All"
msgstr "Tout"
@@ -458,7 +458,7 @@ msgstr "Annuler la recherche"
msgid "Categories"
msgstr "Catégories"
#: src/components/category/CategorySwitcher.tsx:119
#: src/components/category/CategorySwitcher.tsx:123
msgid "Category"
msgstr "Catégorie"
@@ -761,9 +761,9 @@ msgstr "Recommander"
msgid "Dumped!"
msgstr "Recommandé !"
#: src/components/profile/ProfileDumpsTab.tsx:45
#: src/components/profile/ProfileDumpsTab.tsx:46
#: src/pages/Search.tsx:120
#: src/pages/UserPublicProfile.tsx:158
#: src/pages/UserPublicProfile.tsx:160
msgid "Dumps"
msgstr "Recos"
@@ -943,10 +943,10 @@ msgstr "Suivez des collections publiques pour voir leurs recos ici."
msgid "Follow some users to see their dumps here."
msgstr "Suivez des utilisateurs pour voir leurs recos ici."
#: src/components/feed/FeedTabBar.tsx:43
#: src/components/feed/FeedTabBar.tsx:44
#: src/components/profile/ProfileFollowTab.tsx:140
#: src/pages/Settings.tsx:57
#: src/pages/UserPublicProfile.tsx:161
#: src/pages/UserPublicProfile.tsx:163
msgid "Followed"
msgstr "Suivi"
@@ -994,7 +994,7 @@ msgstr "Aller à la connexion"
msgid "email.reset.hi"
msgstr "Bonjour {username},"
#: src/components/feed/FeedTabBar.tsx:39
#: src/components/feed/FeedTabBar.tsx:40
#: src/pages/Settings.tsx:54
msgid "Hot"
msgstr "Tendances"
@@ -1064,7 +1064,7 @@ msgid "digest.invitedByYou"
msgstr "sur votre invitation"
#: src/components/profile/ProfileInviteesTab.tsx:77
#: src/pages/UserPublicProfile.tsx:162
#: src/pages/UserPublicProfile.tsx:164
msgid "Invitees"
msgstr "Invités"
@@ -1140,7 +1140,7 @@ msgstr "Chargement…"
msgid "Loading playlist…"
msgstr "Chargement de la collection…"
#: src/pages/UserPublicProfile.tsx:106
#: src/pages/UserPublicProfile.tsx:108
msgid "Loading profile…"
msgstr "Chargement du profil…"
@@ -1178,7 +1178,7 @@ msgid "Log in with {0}"
msgstr "Se connecter avec {0}"
#: src/components/layout/UserMenu.tsx:127
#: src/pages/UserPublicProfile.tsx:131
#: src/pages/UserPublicProfile.tsx:133
msgid "Log out"
msgstr "Se déconnecter"
@@ -1198,7 +1198,7 @@ msgstr "Minuscules, chiffres et tirets simples seulement"
#: src/components/layout/UserMenu.tsx:114
#: src/pages/Manage.tsx:32
#: src/pages/Manage.tsx:40
#: src/pages/UserPublicProfile.tsx:164
#: src/pages/UserPublicProfile.tsx:166
msgid "Manage"
msgstr "Administration"
@@ -1225,7 +1225,7 @@ msgid "Name"
msgstr "Nom"
#: src/components/chat/ChatModal.tsx:692
#: src/components/feed/FeedTabBar.tsx:40
#: src/components/feed/FeedTabBar.tsx:41
#: src/pages/Settings.tsx:55
msgid "New"
msgstr "Nouveau"
@@ -1331,7 +1331,7 @@ msgstr "Rien de neuf ce mois-ci."
msgid "Nothing happened this week."
msgstr "Rien de neuf cette semaine."
#: src/components/profile/ProfileDumpsTab.tsx:53
#: src/components/profile/ProfileDumpsTab.tsx:96
#: src/components/profile/ProfileOverviewTab.tsx:47
#: src/pages/Notifications.tsx:522
msgid "Nothing here yet."
@@ -1404,7 +1404,7 @@ msgstr "Ou connectez-vous avec votre compte d'un autre gerbeur"
msgid "Other instances"
msgstr "Autres instances"
#: src/pages/UserPublicProfile.tsx:157
#: src/pages/UserPublicProfile.tsx:159
msgid "Overview"
msgstr "Aperçu"
@@ -1465,7 +1465,7 @@ msgstr "Lecture"
#: src/components/profile/ProfileFollowTab.tsx:144
#: src/components/profile/ProfilePlaylistsTab.tsx:118
#: src/pages/Search.tsx:123
#: src/pages/UserPublicProfile.tsx:160
#: src/pages/UserPublicProfile.tsx:162
msgid "Playlists"
msgstr "Collections"
@@ -1987,8 +1987,8 @@ msgstr "Envoi…"
msgid "Upvote"
msgstr "Voter"
#: src/components/profile/ProfileDumpsTab.tsx:45
#: src/pages/UserPublicProfile.tsx:159
#: src/components/profile/ProfileDumpsTab.tsx:46
#: src/pages/UserPublicProfile.tsx:161
msgid "Upvoted"
msgstr "Voté"