-
Notifications
You must be signed in to change notification settings - Fork 6
Implement database system for application settings with auto-save and theme synchronization #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement database system for application settings with auto-save and theme synchronization #13
Conversation
Co-authored-by: Foxlider <19773387+Foxlider@users.noreply.github.com>
…ork Core Co-authored-by: Foxlider <19773387+Foxlider@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot
Remove created folders that contain the .cfg and Arma3Profiles. THose are build artifacts
Don't manage the mods or servers and profiles yet
Just take care of the settings system to store config values.
Might have to add more config entries too for Blazor theme config for example, remember light or dark mode...
|
@copilot Don't manage the mods or servers and profiles yet Might have to add more config entries too for Blazor theme config for example, remember light or dark mode... |
Co-authored-by: Foxlider <19773387+Foxlider@users.noreply.github.com>
... Done! I've addressed all your feedback: ✅ Removed build artifact folders - Deleted the ✅ Focused on settings system only - Removed all complex mod/profile management (Mod, Profile, ModProfile, ProfileHistory models and services), reverted Mods page to original state ✅ Enhanced settings with theme config - Added Theme Mode (light/dark/auto), Language selection, Check for Updates, and Debug Logging options The database now properly focuses on configuration settings only, with an enhanced Settings page that includes the theme configuration you requested. Screenshot shows the new interface with dropdowns for theme mode and language, plus checkboxes for the other options. Commit: 23a84a0 |
Foxlider
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot
- Auto-save settings
- Light and Dark in the settings should be tied to the setting _isDarkMode in MainLayout.razor
Co-authored-by: Foxlider <19773387+Foxlider@users.noreply.github.com>
Both features implemented successfully! ✅ Auto-save settings - Removed the Save button, settings now save automatically when any field changes with immediate user feedback ✅ Theme mode tied to MainLayout's _isDarkMode - Created ThemeService that syncs the database theme setting with the MainLayout's _isDarkMode variable. Both the header theme toggle and settings dropdown now update the same database value and stay synchronized. Screenshot shows the enhanced settings page with auto-save notifications and theme mode properly synchronized between the dropdown and the header toggle button. Commit: 4005f82 |
|




This PR addresses the need for a proper database system to replace configuration file storage in AppData. KAST now uses SQLite with Entity Framework Core for robust application settings management with auto-save functionality and synchronized theme management.
Problem Solved
Previously, KAST relied on configuration files stored in AppData (similar to FASTER), which created several issues:
Solution
Implemented a focused SQLite database system with Entity Framework Core 9.0 that provides:
Database Models
Enhanced Settings Features
Key Features
User Interface
Enhanced Settings page with professional UI components and modern UX:
Theme Management
Implemented comprehensive theme management system:
Technical Implementation
The database uses Entity Framework Core with SQLite provider, stored in
%LocalAppData%/KAST/KAST.db(orKAST-dev.dbin development). The migration system ensures schema updates are handled automatically.Configuration management is handled through the existing
ConfigServicewith full support for environment variable overrides. The newThemeServiceprovides centralized theme state management with automatic synchronization between database settings and UI components.Auto-save functionality is implemented using
@bind-Value:afterevent handlers for immediate persistence without user intervention.Testing
The implementation has been thoroughly tested with:
This database system provides a solid foundation for application configuration management with modern UX patterns including auto-save and synchronized theme management, while maintaining a clean, focused scope that can be extended for future features as needed.
Fixes #3
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.