feat: enable persistent local archives and smart profile fallback

Key changes:
- Enabled full metadata caching for local folder archives, allowing them to load instantly from IndexedDB without re-uploading.
- Implemented oldest-image fallback for profiles missing an explicit profile picture.
- Restored folder-name-to-username detection for local archive uploads.
- Optimized scan indexing to track all image files for fallback use.
This commit is contained in:
ergosteur
2026-03-07 21:56:25 -05:00
parent 74902234b3
commit 20209bcad5
3 changed files with 59 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ interface ArchiveDashboardProps {
cachedArchives: Set<string>;
onSelect: (archive: ServerArchive) => void;
onLocalSelect: () => void;
onLocalCacheSelect: (archive: any) => void;
onClearCache: (name: string) => void;
isScanning: boolean;
}
@@ -24,6 +25,7 @@ export const ArchiveDashboard: React.FC<ArchiveDashboardProps> = ({
cachedArchives,
onSelect,
onLocalSelect,
onLocalCacheSelect,
onClearCache,
isScanning
}) => {
@@ -107,7 +109,7 @@ export const ArchiveDashboard: React.FC<ArchiveDashboardProps> = ({
{localArchives.map((archive) => (
<div key={archive.name} className="relative group text-black">
<button
onClick={onLocalSelect}
onClick={() => onLocalCacheSelect(archive)}
disabled={isScanning}
className="w-full aspect-[3/4] rounded-xl overflow-hidden bg-white shadow-sm border border-gray-100 hover:shadow-xl hover:scale-[1.02] transition-all flex flex-col text-left disabled:opacity-50"
>