mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user