- 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>
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { getSettings, getCacheStats, getThumbnailStats, fetchUsers } from "@/lib/api";
|
|
import SettingsPage from "./SettingsPage";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function SettingsPageWrapper() {
|
|
const settings = await getSettings().catch(() => ({
|
|
image_processing: { format: "webp", quality: 85, filter: "lanczos3", max_width: 2160 },
|
|
cache: { enabled: true, directory: "/tmp/stripstream-image-cache", max_size_mb: 10000 },
|
|
limits: { concurrent_renders: 4, timeout_seconds: 12, rate_limit_per_second: 120 },
|
|
thumbnail: { enabled: true, width: 300, height: 400, quality: 80, format: "webp", directory: "/data/thumbnails" }
|
|
}));
|
|
|
|
const cacheStats = await getCacheStats().catch(() => ({
|
|
total_size_mb: 0,
|
|
file_count: 0,
|
|
directory: "/tmp/stripstream-image-cache"
|
|
}));
|
|
|
|
const thumbnailStats = await getThumbnailStats().catch(() => ({
|
|
total_size_mb: 0,
|
|
file_count: 0,
|
|
directory: "/data/thumbnails"
|
|
}));
|
|
|
|
const users = await fetchUsers().catch(() => []);
|
|
|
|
return <SettingsPage initialSettings={settings} initialCacheStats={cacheStats} initialThumbnailStats={thumbnailStats} users={users} />;
|
|
}
|