From 8749d884c60edc27da962ea1bb7bfd78d6446ea1 Mon Sep 17 00:00:00 2001 From: Varun Raj Date: Sat, 30 Nov 2024 12:37:40 +0530 Subject: [PATCH] feat: album info in header Signed-off-by: Varun Raj --- src/components/shared/Sidebar.tsx | 6 ++--- src/pages/albums/[albumId].tsx | 22 +++++++++++++++++-- src/pages/albums/index.tsx | 3 +-- .../api/albums/potential-albums-dates.ts | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/components/shared/Sidebar.tsx b/src/components/shared/Sidebar.tsx index e3ef727..f37830e 100644 --- a/src/components/shared/Sidebar.tsx +++ b/src/components/shared/Sidebar.tsx @@ -19,8 +19,8 @@ export default function Sidebar() { return (
-
- +
+ -

{albumInfo?.assetCount} photos

-

{albumInfo?.faceCount} faces

+

+ {humanizeNumber(albumInfo?.assetCount || 0)} + {' '} + +

+

+ {humanizeNumber(albumInfo?.faceCount || 0)} + {' '} + +

+ + + Open In Immich +
) } diff --git a/src/pages/albums/index.tsx b/src/pages/albums/index.tsx index 16954da..e869925 100644 --- a/src/pages/albums/index.tsx +++ b/src/pages/albums/index.tsx @@ -66,7 +66,6 @@ export default function AlbumListPage() { const renderContent = () => { - if (loading) { return } @@ -84,7 +83,7 @@ export default function AlbumListPage() { return (