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:
@@ -308,6 +308,28 @@ export interface AuthUser {
|
||||
isLocal?: boolean;
|
||||
}
|
||||
|
||||
export type UserPreferencesView = typeof UserPreferencesView[keyof typeof UserPreferencesView];
|
||||
|
||||
|
||||
export const UserPreferencesView = {
|
||||
grid: 'grid',
|
||||
table: 'table',
|
||||
rows: 'rows',
|
||||
} as const;
|
||||
|
||||
export type UserPreferencesDensity = typeof UserPreferencesDensity[keyof typeof UserPreferencesDensity];
|
||||
|
||||
|
||||
export const UserPreferencesDensity = {
|
||||
cozy: 'cozy',
|
||||
compact: 'compact',
|
||||
} as const;
|
||||
|
||||
export interface UserPreferences {
|
||||
view?: UserPreferencesView;
|
||||
density?: UserPreferencesDensity;
|
||||
}
|
||||
|
||||
export interface ErrorResponse {
|
||||
error: string;
|
||||
}
|
||||
@@ -325,6 +347,9 @@ export const ListToolsSort = {
|
||||
newest: 'newest',
|
||||
top_rated: 'top_rated',
|
||||
most_reviewed: 'most_reviewed',
|
||||
name_asc: 'name_asc',
|
||||
name_desc: 'name_desc',
|
||||
recently_updated: 'recently_updated',
|
||||
} as const;
|
||||
|
||||
export type ListTrashedToolsParams = {
|
||||
|
||||
Reference in New Issue
Block a user