fix(auth): persist ToS acceptance in Rust/SQLite backend

ToS acceptance was stored in localStorage which gets cleared on app
updates, causing users to re-login frequently. Now stores ToS state
in SQLite (~/.local/share/qbz/legal_settings.db) which survives
updates.

- Add legal_settings.rs with SQLite storage for ToS acceptance
- Update qobuzLegalStore.ts to use Rust invoke commands
- LoginView now loads ToS from Rust before auto-login check
- Migration from localStorage for existing users

Closes #31
This commit is contained in:
vicrodh committed 2026-01-30 14:49:39 -06:00
1 parent fe7816f6c6
commit 3926209b0d
5 files changed
+212 -8

No files matched your search

+10
View File
@@ -16,6 +16,7 @@ pub mod favorites_preferences;
pub mod favorites_cache;
pub mod subscription_state;
pub mod tray_settings;
pub mod legal_settings;
pub use audio_settings::{
AudioSettings,
@@ -83,3 +84,12 @@ pub use favorites_cache::{
sync_cached_favorite_artists,
clear_favorites_cache,
};
pub use legal_settings::{
LegalSettings,
LegalSettingsState,
LegalSettingsStore,
get_legal_settings,
get_qobuz_tos_accepted,
set_qobuz_tos_accepted,
};