fix(appearance): Theme-Einstellungen serverseitig speichern und beim Login wiederherstellen

Nach PWA-Cache-Löschung gingen Theme und Farbschema verloren, weil sie nur in localStorage lagen. Die Präferenzen werden jetzt synchronisiert und nach dem Login erneut angewendet.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 14:03:17 +02:00
parent 9e42f828a0
commit d90f292a21
6 changed files with 218 additions and 0 deletions
+10
View File
@@ -22,6 +22,7 @@ model User {
collaborations Collaboration[]
pushSubscriptions PushSubscription[]
notificationPrefs UserNotificationPrefs?
appearancePrefs UserAppearancePrefs?
}
model PushSubscription {
@@ -48,6 +49,15 @@ model UserNotificationPrefs {
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model UserAppearancePrefs {
userId String @id
theme String @default("auto")
colorScheme String @default("auto")
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model Credential {
id String @id @default(uuid())
userId String