Add ThemeService and UserPreferencesService
Introduce ThemeService to manage themes and dark mode state, including initialization, persistence, and server sync. Add UserPreferencesService to handle API communication for retrieving and saving user preferences with in-memory caching to reduce network overhead. Register both services in the DI container in Program.cs. Enhance ThemeService with detailed documentation and introduce ThemeOption record for selectable themes. Improve server-side caching in UserPreferencesService for consistency and efficiency.
This commit is contained in:
@@ -34,6 +34,10 @@ builder.Services.AddScoped<SignatureCacheService>();
|
||||
builder.Services.AddSingleton<AppVersionService>();
|
||||
builder.Services.AddScoped<EnvelopeService>();
|
||||
|
||||
// UI Preferences & Theme
|
||||
builder.Services.AddScoped<UserPreferencesService>();
|
||||
builder.Services.AddScoped<ThemeService>();
|
||||
|
||||
// DevExpress WASM
|
||||
builder.Services.AddDevExpressWebAssemblyBlazorPdfViewer();
|
||||
builder.Services.AddDevExpressWebAssemblyBlazorReportViewer();
|
||||
|
||||
Reference in New Issue
Block a user