feat: persist pinned libraries per user with cross-device sync (#20)

Store pinned library IDs on the user record and expose GET/PUT
/me/pinned-libraries endpoints. The web client now loads and saves pins
through the API, migrates legacy localStorage data once, and applies
pinned ordering on both the libraries and home pages.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: truewhile <truewhile@users.noreply.github.com>
This commit is contained in:
truewhile
2026-09-03 08:47:06 +08:00
committed by GitHub
parent 1025e3c693
commit 1e291df647
12 changed files with 367 additions and 15 deletions
+1
View File
@@ -10,6 +10,7 @@ export interface User {
force_password_reset: boolean
is_active: boolean
allowed_library_ids?: string[]
pinned_library_ids?: string[]
is_default_admin?: boolean
is_protected?: boolean
realtime_online?: boolean