From 5f11698907942bebcf346394c4c1348c61453755 Mon Sep 17 00:00:00 2001 From: dtoro Date: Tue, 7 Apr 2026 23:28:16 +0200 Subject: [PATCH] feat: sorting + Google-Photos-style date-grouped timeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related changes: 1. Sorting controls - filterStore gains sortBy (taken_at | added_at | filename | file_size | rating) and sortOrder (asc | desc), defaults taken_at desc. - filtersToParams sends sort + order to the backend list endpoint. - usePhotosQuery drops the hardcoded sort/order and reads from the store. - useFilterUrlSync round-trips ?sort= and ?order= so the choice persists in the URL. - FilterBar gets a Sort group with a field setSortBy(e.target.value as SortField)} + className="rounded border border-border bg-bg px-2 py-1 text-xs text-text focus:border-primary focus:outline-none" + > + {SORT_OPTIONS.map((opt) => ( + + ))} + + + +