fix(settings): add optional dashboard shelf sync

Keep dashboard layouts browser-local by default and let users opt in to account storage.
Group library selection and shelf sync in one dropdown, preserve legacy client settings,
and block sync changes for demo-restricted accounts.

Fixes #1646
This commit is contained in:
neon
2026-10-02 04:11:47 +00:00
parent 0e16931df3
commit cb8d1e3b2b
14 changed files with 536 additions and 37 deletions
+2
View File
@@ -43,6 +43,8 @@ export interface UserSettings {
notificationPreferences?: import("./notification").NotificationPreferences;
seriesCollapsePreferences?: import("./series-collapse").SeriesCollapsePreferences;
dashboardConfig?: import("./dashboard").DashboardConfig;
/** Separate from dashboardConfig so legacy clients replacing it preserve shelf preferences. */
dashboardShelfConfig?: import("./dashboard").DashboardShelfConfig;
sidebarConfig?: import("./sidebar").SidebarConfig;
achievementPreferences?: {
enabled?: boolean;
+8
View File
@@ -103,6 +103,14 @@ export interface ScrollerConfig {
smartScopeId?: number;
}
export type DashboardShelfLayout = "wide" | "two-columns";
export interface DashboardShelfConfig {
syncAcrossSessions?: boolean;
scrollers?: ScrollerConfig[];
shelfLayout?: DashboardShelfLayout;
}
export const WIDGET_TYPE = {
READING_STREAK: "reading-streak",
CURRENTLY_READING: "currently-reading",