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:
@@ -72,7 +72,7 @@ paths:
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum: [newest, top_rated, most_reviewed]
|
||||
enum: [newest, top_rated, most_reviewed, name_asc, name_desc, recently_updated]
|
||||
responses:
|
||||
"200":
|
||||
description: List of tools
|
||||
@@ -533,6 +533,48 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
|
||||
/auth/me/preferences:
|
||||
get:
|
||||
operationId: getMePreferences
|
||||
tags: [auth]
|
||||
summary: Get current user's browse preferences
|
||||
responses:
|
||||
"200":
|
||||
description: User preferences
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UserPreferences"
|
||||
"401":
|
||||
description: Not authenticated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
put:
|
||||
operationId: updateMePreferences
|
||||
tags: [auth]
|
||||
summary: Update current user's browse preferences
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UserPreferences"
|
||||
responses:
|
||||
"200":
|
||||
description: Updated preferences
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/UserPreferences"
|
||||
"401":
|
||||
description: Not authenticated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
|
||||
/users:
|
||||
get:
|
||||
operationId: listUsers
|
||||
@@ -1047,6 +1089,16 @@ components:
|
||||
isLocal:
|
||||
type: boolean
|
||||
|
||||
UserPreferences:
|
||||
type: object
|
||||
properties:
|
||||
view:
|
||||
type: string
|
||||
enum: [grid, table, rows]
|
||||
density:
|
||||
type: string
|
||||
enum: [cozy, compact]
|
||||
|
||||
ErrorResponse:
|
||||
type: object
|
||||
required: [error]
|
||||
|
||||
Reference in New Issue
Block a user