From e7d62c29e1ea25ec2809ff022cd05120cc8baf0c Mon Sep 17 00:00:00 2001 From: dtoro Date: Wed, 8 Apr 2026 21:27:56 +0200 Subject: [PATCH] feat: change empty state --- frontend/src/components/timeline/Timeline.tsx | 112 +++++++++--------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/frontend/src/components/timeline/Timeline.tsx b/frontend/src/components/timeline/Timeline.tsx index bcdbba1..e41de9c 100644 --- a/frontend/src/components/timeline/Timeline.tsx +++ b/frontend/src/components/timeline/Timeline.tsx @@ -433,7 +433,7 @@ export function Timeline() { if (photos.length === 0) { return (
-
No photos found. Add a source folder to get started.
+
(╯°□°)╯︵ ┻━┻
) } @@ -456,18 +456,39 @@ export function Timeline() { className="h-full overflow-auto bg-bg" style={{ padding: `${PADDING}px` }} > -
- {virtualizer.getVirtualItems().map((virtualItem) => { - const item = items[virtualItem.index] - if (!item) return null +
+ {virtualizer.getVirtualItems().map((virtualItem) => { + const item = items[virtualItem.index] + if (!item) return null - if (item.type === 'header') { + if (item.type === 'header') { + return ( +
+

+ {item.label} +

+
+ ) + } + + // row return (
-

- {item.label} -

+
+ {item.cells.map(({ photo, globalIndex }) => ( + { + if (e.shiftKey && lastSelectedIndex !== null) { + selectRange(globalIndex) + } else if (e.ctrlKey || e.metaKey) { + togglePhotoSelection(photo.id, globalIndex) + } else { + selectPhoto(photo.id, globalIndex) + } + }} + onDoubleClick={() => openPreview(photo.id)} + /> + ))} +
) - } - - // row - return ( -
-
- {item.cells.map(({ photo, globalIndex }) => ( - { - if (e.shiftKey && lastSelectedIndex !== null) { - selectRange(globalIndex) - } else if (e.ctrlKey || e.metaKey) { - togglePhotoSelection(photo.id, globalIndex) - } else { - selectPhoto(photo.id, globalIndex) - } - }} - onDoubleClick={() => openPreview(photo.id)} - /> - ))} -
-
- ) - })} -
+ })} +
)