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.
5.1 KiB
5.1 KiB