fix: unify theme system - fix theme switching persistence
- Unified localStorage key to 'theme-preference' across all components
- Fixed header.tsx using wrong localStorage key ('theme' instead of 'theme-preference')
- Added localStorage hybrid persistence for instant theme changes
- Removed router.refresh() which was causing stale data revert
- Replaced Blue theme with Sepia
- Consolidated auth() calls to prevent race conditions
- Updated UserSettingsData types to include all themes
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -272,7 +272,10 @@ exports.Prisma.UserAISettingsScalarFieldEnum = {
|
||||
preferredLanguage: 'preferredLanguage',
|
||||
fontSize: 'fontSize',
|
||||
demoMode: 'demoMode',
|
||||
showRecentNotes: 'showRecentNotes'
|
||||
showRecentNotes: 'showRecentNotes',
|
||||
emailNotifications: 'emailNotifications',
|
||||
desktopNotifications: 'desktopNotifications',
|
||||
anonymousAnalytics: 'anonymousAnalytics'
|
||||
};
|
||||
|
||||
exports.Prisma.SortOrder = {
|
||||
|
||||
98
keep-notes/prisma/client-generated/index.d.ts
vendored
98
keep-notes/prisma/client-generated/index.d.ts
vendored
@@ -13530,6 +13530,9 @@ export namespace Prisma {
|
||||
fontSize: string | null
|
||||
demoMode: boolean | null
|
||||
showRecentNotes: boolean | null
|
||||
emailNotifications: boolean | null
|
||||
desktopNotifications: boolean | null
|
||||
anonymousAnalytics: boolean | null
|
||||
}
|
||||
|
||||
export type UserAISettingsMaxAggregateOutputType = {
|
||||
@@ -13544,6 +13547,9 @@ export namespace Prisma {
|
||||
fontSize: string | null
|
||||
demoMode: boolean | null
|
||||
showRecentNotes: boolean | null
|
||||
emailNotifications: boolean | null
|
||||
desktopNotifications: boolean | null
|
||||
anonymousAnalytics: boolean | null
|
||||
}
|
||||
|
||||
export type UserAISettingsCountAggregateOutputType = {
|
||||
@@ -13558,6 +13564,9 @@ export namespace Prisma {
|
||||
fontSize: number
|
||||
demoMode: number
|
||||
showRecentNotes: number
|
||||
emailNotifications: number
|
||||
desktopNotifications: number
|
||||
anonymousAnalytics: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -13574,6 +13583,9 @@ export namespace Prisma {
|
||||
fontSize?: true
|
||||
demoMode?: true
|
||||
showRecentNotes?: true
|
||||
emailNotifications?: true
|
||||
desktopNotifications?: true
|
||||
anonymousAnalytics?: true
|
||||
}
|
||||
|
||||
export type UserAISettingsMaxAggregateInputType = {
|
||||
@@ -13588,6 +13600,9 @@ export namespace Prisma {
|
||||
fontSize?: true
|
||||
demoMode?: true
|
||||
showRecentNotes?: true
|
||||
emailNotifications?: true
|
||||
desktopNotifications?: true
|
||||
anonymousAnalytics?: true
|
||||
}
|
||||
|
||||
export type UserAISettingsCountAggregateInputType = {
|
||||
@@ -13602,6 +13617,9 @@ export namespace Prisma {
|
||||
fontSize?: true
|
||||
demoMode?: true
|
||||
showRecentNotes?: true
|
||||
emailNotifications?: true
|
||||
desktopNotifications?: true
|
||||
anonymousAnalytics?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -13689,6 +13707,9 @@ export namespace Prisma {
|
||||
fontSize: string
|
||||
demoMode: boolean
|
||||
showRecentNotes: boolean
|
||||
emailNotifications: boolean
|
||||
desktopNotifications: boolean
|
||||
anonymousAnalytics: boolean
|
||||
_count: UserAISettingsCountAggregateOutputType | null
|
||||
_min: UserAISettingsMinAggregateOutputType | null
|
||||
_max: UserAISettingsMaxAggregateOutputType | null
|
||||
@@ -13720,6 +13741,9 @@ export namespace Prisma {
|
||||
fontSize?: boolean
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["userAISettings"]>
|
||||
|
||||
@@ -13735,6 +13759,9 @@ export namespace Prisma {
|
||||
fontSize?: boolean
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
user?: boolean | UserDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["userAISettings"]>
|
||||
|
||||
@@ -13750,6 +13777,9 @@ export namespace Prisma {
|
||||
fontSize?: boolean
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsInclude<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> = {
|
||||
@@ -13776,6 +13806,9 @@ export namespace Prisma {
|
||||
fontSize: string
|
||||
demoMode: boolean
|
||||
showRecentNotes: boolean
|
||||
emailNotifications: boolean
|
||||
desktopNotifications: boolean
|
||||
anonymousAnalytics: boolean
|
||||
}, ExtArgs["result"]["userAISettings"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -14181,6 +14214,9 @@ export namespace Prisma {
|
||||
readonly fontSize: FieldRef<"UserAISettings", 'String'>
|
||||
readonly demoMode: FieldRef<"UserAISettings", 'Boolean'>
|
||||
readonly showRecentNotes: FieldRef<"UserAISettings", 'Boolean'>
|
||||
readonly emailNotifications: FieldRef<"UserAISettings", 'Boolean'>
|
||||
readonly desktopNotifications: FieldRef<"UserAISettings", 'Boolean'>
|
||||
readonly anonymousAnalytics: FieldRef<"UserAISettings", 'Boolean'>
|
||||
}
|
||||
|
||||
|
||||
@@ -14708,7 +14744,10 @@ export namespace Prisma {
|
||||
preferredLanguage: 'preferredLanguage',
|
||||
fontSize: 'fontSize',
|
||||
demoMode: 'demoMode',
|
||||
showRecentNotes: 'showRecentNotes'
|
||||
showRecentNotes: 'showRecentNotes',
|
||||
emailNotifications: 'emailNotifications',
|
||||
desktopNotifications: 'desktopNotifications',
|
||||
anonymousAnalytics: 'anonymousAnalytics'
|
||||
};
|
||||
|
||||
export type UserAISettingsScalarFieldEnum = (typeof UserAISettingsScalarFieldEnum)[keyof typeof UserAISettingsScalarFieldEnum]
|
||||
@@ -15742,6 +15781,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFilter<"UserAISettings"> | string
|
||||
demoMode?: BoolFilter<"UserAISettings"> | boolean
|
||||
showRecentNotes?: BoolFilter<"UserAISettings"> | boolean
|
||||
emailNotifications?: BoolFilter<"UserAISettings"> | boolean
|
||||
desktopNotifications?: BoolFilter<"UserAISettings"> | boolean
|
||||
anonymousAnalytics?: BoolFilter<"UserAISettings"> | boolean
|
||||
user?: XOR<UserRelationFilter, UserWhereInput>
|
||||
}
|
||||
|
||||
@@ -15757,6 +15799,9 @@ export namespace Prisma {
|
||||
fontSize?: SortOrder
|
||||
demoMode?: SortOrder
|
||||
showRecentNotes?: SortOrder
|
||||
emailNotifications?: SortOrder
|
||||
desktopNotifications?: SortOrder
|
||||
anonymousAnalytics?: SortOrder
|
||||
user?: UserOrderByWithRelationInput
|
||||
}
|
||||
|
||||
@@ -15775,6 +15820,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFilter<"UserAISettings"> | string
|
||||
demoMode?: BoolFilter<"UserAISettings"> | boolean
|
||||
showRecentNotes?: BoolFilter<"UserAISettings"> | boolean
|
||||
emailNotifications?: BoolFilter<"UserAISettings"> | boolean
|
||||
desktopNotifications?: BoolFilter<"UserAISettings"> | boolean
|
||||
anonymousAnalytics?: BoolFilter<"UserAISettings"> | boolean
|
||||
user?: XOR<UserRelationFilter, UserWhereInput>
|
||||
}, "userId">
|
||||
|
||||
@@ -15790,6 +15838,9 @@ export namespace Prisma {
|
||||
fontSize?: SortOrder
|
||||
demoMode?: SortOrder
|
||||
showRecentNotes?: SortOrder
|
||||
emailNotifications?: SortOrder
|
||||
desktopNotifications?: SortOrder
|
||||
anonymousAnalytics?: SortOrder
|
||||
_count?: UserAISettingsCountOrderByAggregateInput
|
||||
_max?: UserAISettingsMaxOrderByAggregateInput
|
||||
_min?: UserAISettingsMinOrderByAggregateInput
|
||||
@@ -15810,6 +15861,9 @@ export namespace Prisma {
|
||||
fontSize?: StringWithAggregatesFilter<"UserAISettings"> | string
|
||||
demoMode?: BoolWithAggregatesFilter<"UserAISettings"> | boolean
|
||||
showRecentNotes?: BoolWithAggregatesFilter<"UserAISettings"> | boolean
|
||||
emailNotifications?: BoolWithAggregatesFilter<"UserAISettings"> | boolean
|
||||
desktopNotifications?: BoolWithAggregatesFilter<"UserAISettings"> | boolean
|
||||
anonymousAnalytics?: BoolWithAggregatesFilter<"UserAISettings"> | boolean
|
||||
}
|
||||
|
||||
export type UserCreateInput = {
|
||||
@@ -16874,6 +16928,9 @@ export namespace Prisma {
|
||||
fontSize?: string
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
user: UserCreateNestedOneWithoutAiSettingsInput
|
||||
}
|
||||
|
||||
@@ -16889,6 +16946,9 @@ export namespace Prisma {
|
||||
fontSize?: string
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsUpdateInput = {
|
||||
@@ -16902,6 +16962,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFieldUpdateOperationsInput | string
|
||||
demoMode?: BoolFieldUpdateOperationsInput | boolean
|
||||
showRecentNotes?: BoolFieldUpdateOperationsInput | boolean
|
||||
emailNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
desktopNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean
|
||||
user?: UserUpdateOneRequiredWithoutAiSettingsNestedInput
|
||||
}
|
||||
|
||||
@@ -16917,6 +16980,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFieldUpdateOperationsInput | string
|
||||
demoMode?: BoolFieldUpdateOperationsInput | boolean
|
||||
showRecentNotes?: BoolFieldUpdateOperationsInput | boolean
|
||||
emailNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
desktopNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsCreateManyInput = {
|
||||
@@ -16931,6 +16997,9 @@ export namespace Prisma {
|
||||
fontSize?: string
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsUpdateManyMutationInput = {
|
||||
@@ -16944,6 +17013,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFieldUpdateOperationsInput | string
|
||||
demoMode?: BoolFieldUpdateOperationsInput | boolean
|
||||
showRecentNotes?: BoolFieldUpdateOperationsInput | boolean
|
||||
emailNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
desktopNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsUncheckedUpdateManyInput = {
|
||||
@@ -16958,6 +17030,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFieldUpdateOperationsInput | string
|
||||
demoMode?: BoolFieldUpdateOperationsInput | boolean
|
||||
showRecentNotes?: BoolFieldUpdateOperationsInput | boolean
|
||||
emailNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
desktopNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean
|
||||
}
|
||||
|
||||
export type StringFilter<$PrismaModel = never> = {
|
||||
@@ -17815,6 +17890,9 @@ export namespace Prisma {
|
||||
fontSize?: SortOrder
|
||||
demoMode?: SortOrder
|
||||
showRecentNotes?: SortOrder
|
||||
emailNotifications?: SortOrder
|
||||
desktopNotifications?: SortOrder
|
||||
anonymousAnalytics?: SortOrder
|
||||
}
|
||||
|
||||
export type UserAISettingsMaxOrderByAggregateInput = {
|
||||
@@ -17829,6 +17907,9 @@ export namespace Prisma {
|
||||
fontSize?: SortOrder
|
||||
demoMode?: SortOrder
|
||||
showRecentNotes?: SortOrder
|
||||
emailNotifications?: SortOrder
|
||||
desktopNotifications?: SortOrder
|
||||
anonymousAnalytics?: SortOrder
|
||||
}
|
||||
|
||||
export type UserAISettingsMinOrderByAggregateInput = {
|
||||
@@ -17843,6 +17924,9 @@ export namespace Prisma {
|
||||
fontSize?: SortOrder
|
||||
demoMode?: SortOrder
|
||||
showRecentNotes?: SortOrder
|
||||
emailNotifications?: SortOrder
|
||||
desktopNotifications?: SortOrder
|
||||
anonymousAnalytics?: SortOrder
|
||||
}
|
||||
|
||||
export type AccountCreateNestedManyWithoutUserInput = {
|
||||
@@ -19469,6 +19553,9 @@ export namespace Prisma {
|
||||
fontSize?: string
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsUncheckedCreateWithoutUserInput = {
|
||||
@@ -19482,6 +19569,9 @@ export namespace Prisma {
|
||||
fontSize?: string
|
||||
demoMode?: boolean
|
||||
showRecentNotes?: boolean
|
||||
emailNotifications?: boolean
|
||||
desktopNotifications?: boolean
|
||||
anonymousAnalytics?: boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsCreateOrConnectWithoutUserInput = {
|
||||
@@ -19795,6 +19885,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFieldUpdateOperationsInput | string
|
||||
demoMode?: BoolFieldUpdateOperationsInput | boolean
|
||||
showRecentNotes?: BoolFieldUpdateOperationsInput | boolean
|
||||
emailNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
desktopNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean
|
||||
}
|
||||
|
||||
export type UserAISettingsUncheckedUpdateWithoutUserInput = {
|
||||
@@ -19808,6 +19901,9 @@ export namespace Prisma {
|
||||
fontSize?: StringFieldUpdateOperationsInput | string
|
||||
demoMode?: BoolFieldUpdateOperationsInput | boolean
|
||||
showRecentNotes?: BoolFieldUpdateOperationsInput | boolean
|
||||
emailNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
desktopNotifications?: BoolFieldUpdateOperationsInput | boolean
|
||||
anonymousAnalytics?: BoolFieldUpdateOperationsInput | boolean
|
||||
}
|
||||
|
||||
export type UserCreateWithoutAccountsInput = {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "prisma-client-3d6220144f5583920cbea4466cc4b7cd1590576c45f6d92c95c9ec7f0e8cd94d",
|
||||
"name": "prisma-client-aac99853c38843b923b5ef02e79fc02f024613e74dbfa218769f719178707434",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"browser": "index-browser.js",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -216,17 +216,21 @@ model MemoryEchoInsight {
|
||||
}
|
||||
|
||||
model UserAISettings {
|
||||
userId String @id
|
||||
titleSuggestions Boolean @default(true)
|
||||
semanticSearch Boolean @default(true)
|
||||
paragraphRefactor Boolean @default(true)
|
||||
memoryEcho Boolean @default(true)
|
||||
memoryEchoFrequency String @default("daily")
|
||||
aiProvider String @default("auto")
|
||||
preferredLanguage String @default("auto")
|
||||
fontSize String @default("medium")
|
||||
demoMode Boolean @default(false)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
userId String @id
|
||||
titleSuggestions Boolean @default(true)
|
||||
semanticSearch Boolean @default(true)
|
||||
paragraphRefactor Boolean @default(true)
|
||||
memoryEcho Boolean @default(true)
|
||||
memoryEchoFrequency String @default("daily")
|
||||
aiProvider String @default("auto")
|
||||
preferredLanguage String @default("auto")
|
||||
fontSize String @default("medium")
|
||||
demoMode Boolean @default(false)
|
||||
showRecentNotes Boolean @default(false)
|
||||
emailNotifications Boolean @default(false)
|
||||
desktopNotifications Boolean @default(false)
|
||||
anonymousAnalytics Boolean @default(false)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([memoryEcho])
|
||||
@@index([aiProvider])
|
||||
|
||||
@@ -272,7 +272,10 @@ exports.Prisma.UserAISettingsScalarFieldEnum = {
|
||||
preferredLanguage: 'preferredLanguage',
|
||||
fontSize: 'fontSize',
|
||||
demoMode: 'demoMode',
|
||||
showRecentNotes: 'showRecentNotes'
|
||||
showRecentNotes: 'showRecentNotes',
|
||||
emailNotifications: 'emailNotifications',
|
||||
desktopNotifications: 'desktopNotifications',
|
||||
anonymousAnalytics: 'anonymousAnalytics'
|
||||
};
|
||||
|
||||
exports.Prisma.SortOrder = {
|
||||
|
||||
Reference in New Issue
Block a user