feat: multi-user reading progress & backoffice impersonation
- Scope all reading progress (books, series, stats) by user via Option<Extension<AuthUser>> — admin sees aggregate, read token sees own data - Fix duplicate book rows when admin views lists (IS NOT NULL guard on JOIN) - Add X-As-User header support: admin can impersonate any user from backoffice - UserSwitcher dropdown in nav header (persisted via as_user_id cookie) - Per-user filter pills on "Currently reading" and "Recently read" dashboard sections - Inline username editing (UsernameEdit component with optimistic update) - PATCH /admin/users/:id endpoint to rename a user - Unassigned read tokens row in users table - Komga sync now requires a user_id — reading progress attributed to selected user - Migration 0051: add user_id column to komga_sync_reports - Nav breakpoints: icons-only from md, labels from xl, hamburger until md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ const en: Record<TranslationKey, string> = {
|
||||
"nav.libraries": "Libraries",
|
||||
"nav.jobs": "Jobs",
|
||||
"nav.tokens": "Tokens",
|
||||
"nav.users": "Users",
|
||||
"nav.settings": "Settings",
|
||||
"nav.navigation": "Navigation",
|
||||
"nav.closeMenu": "Close menu",
|
||||
@@ -96,6 +97,7 @@ const en: Record<TranslationKey, string> = {
|
||||
"dashboard.pageProgress": "p. {{current}} / {{total}}",
|
||||
"dashboard.noCurrentlyReading": "No books in progress",
|
||||
"dashboard.noRecentlyRead": "No books read recently",
|
||||
"dashboard.allUsers": "All",
|
||||
|
||||
// Books page
|
||||
"books.title": "Books",
|
||||
@@ -405,6 +407,21 @@ const en: Record<TranslationKey, string> = {
|
||||
"tokens.revoked": "Revoked",
|
||||
"tokens.active": "Active",
|
||||
"tokens.revoke": "Revoke",
|
||||
"tokens.user": "User",
|
||||
"tokens.noUser": "None (admin)",
|
||||
"tokens.apiTokens": "API Tokens",
|
||||
|
||||
// Users page
|
||||
"users.title": "Users",
|
||||
"users.createNew": "Create a user",
|
||||
"users.createDescription": "Create a user account for read access",
|
||||
"users.username": "Username",
|
||||
"users.createButton": "Create",
|
||||
"users.name": "Username",
|
||||
"users.tokenCount": "Tokens",
|
||||
"users.createdAt": "Created",
|
||||
"users.actions": "Actions",
|
||||
"users.noUsers": "No users",
|
||||
|
||||
// Settings page
|
||||
"settings.title": "Settings",
|
||||
|
||||
Reference in New Issue
Block a user