feat: user-chosen browse views with grid/list toggle and profile sync
Build & Push Docker Image / build (push) Successful in 2m25s
Build & Push Docker Image / build (push) Successful in 2m25s
- view modes grid | table | rows + density cozy/compact, persisted via localStorage and shareable ?view=?density= URL params (URL wins) - table view: sortable columns (name, rating, reviews), new sort options name_asc/name_desc/recently_updated (backend enum + handler) - live debounced search, removable filter chips, '/' focuses search - virtualization via @tanstack/react-virtual for table and rows views - profile sync: users.preferences jsonb + GET/PUT /api/auth/me/preferences; preference precedence URL > server profile > localStorage > default - add local rollup/lightningcss/tailwindcss oxide native binaries for macos dev
This commit is contained in:
@@ -87,6 +87,12 @@ router.get("/tools", async (req, res): Promise<void> => {
|
||||
result = result.sort((a, b) => (b.avgCombined ?? 0) - (a.avgCombined ?? 0));
|
||||
} else if (sort === "most_reviewed") {
|
||||
result = result.sort((a, b) => b.ratingCount - a.ratingCount);
|
||||
} else if (sort === "name_asc") {
|
||||
result = result.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: "base" }));
|
||||
} else if (sort === "name_desc") {
|
||||
result = result.sort((a, b) => b.name.localeCompare(a.name, undefined, { sensitivity: "base" }));
|
||||
} else if (sort === "recently_updated") {
|
||||
result = result.sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime());
|
||||
}
|
||||
|
||||
res.json(result);
|
||||
|
||||
Reference in New Issue
Block a user