feat: show source directories in library stats and settings UI

Add active source root directories to the library stats endpoint and
display them in the settings page. Hardcode container PHOTO_DIRS to
/photos since the volume mount handles host path mapping. Add .env to
.gitignore to prevent committing secrets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-04-13 08:09:08 +02:00
parent b7aa2aed3d
commit e974ffbfd2
5 changed files with 26 additions and 4 deletions

View File

@@ -258,6 +258,17 @@ export function SettingsPage() {
/>
</div>
{(libStats?.source_dirs?.length ?? 0) > 0 && (
<div className="mt-3 text-xs text-text-muted">
<span className="font-medium text-text">Source folders</span>
<div className="mt-1 space-y-0.5">
{libStats!.source_dirs.map((dir: string) => (
<div key={dir} className="truncate font-mono" title={dir}>{dir}</div>
))}
</div>
</div>
)}
{/* Inline scan progress. Rendered as a full-width sub-card
when a scan is active so the user sees the same info
they'd get from the floating widget without leaving

View File

@@ -625,6 +625,7 @@ export interface LibraryStats {
total_videos: number
total_size: number
total_size_gb: number
source_dirs: string[]
}
// Heaps API