feat(slint): Settings Offline Mode group (tri-state status, induced toggle, network folders)
New OFFLINE MODE group above the cache group on the Offline settings page: read-only tri-state status row (online / no connection / offline mode enabled, with captive-portal hint) plus an honest Check now that forces an actor re-probe; Enable Offline Mode toggle driving the shared engine (issue #279 stream_first_track snapshot/restore included, Playback panel re-synced after); Show Network Folder Content toggle mounted only while induced offline is on. Deliberate deviations from Tauri per the approved spec: no probe gate on disable, no dead cast/scrobbling toggles. cc
This commit is contained in:
7 files changed
+282
-12
No files matched your search
@@ -2040,6 +2040,20 @@ export global SettingsState {
|
||||
// Playback — "When quality retries fail" dropdown.
|
||||
in-out property <[string]> retry-behaviors: [];
|
||||
in-out property <int> retry-behavior-index: 0;
|
||||
|
||||
// --- OFFLINE MODE --------------------------------------------------------
|
||||
|
||||
// Settings > Offline, MODE group (the app operating without Qobuz — NOT
|
||||
// the offline cache). Backed by the shared engine's per-user store, not
|
||||
// the audio/playback stores: seeded by OfflineModeActions.load() on panel
|
||||
// mount; persisted through settings-bool keys "offline-mode-enabled" /
|
||||
// "offline-show-network-folders".
|
||||
in-out property <bool> offline-mode-enabled: false;
|
||||
in-out property <bool> offline-show-network-folders: false;
|
||||
// "Check now" re-probe in flight — flips the status row's button label.
|
||||
// Cleared by Rust on the next status broadcast, or after a short timeout
|
||||
// when the verdict comes back unchanged (the actor only broadcasts flips).
|
||||
in-out property <bool> offline-checking: false;
|
||||
}
|
||||
|
||||
// Appearance settings — backs the Settings > Appearance panel. 1:1 with
|
||||
@@ -3121,3 +3135,13 @@ export global OfflineState {
|
||||
// successful shell entry.
|
||||
in property <string> login-error: "";
|
||||
}
|
||||
|
||||
// Settings > Offline, MODE group — Rust-wired actions (crate::offline_mode).
|
||||
export global OfflineModeActions {
|
||||
// (Re)seed the MODE-group toggle states from the engine store. Fired by
|
||||
// the panel's init, so every mount of Settings > Offline re-reads them.
|
||||
callback load();
|
||||
// Force an immediate connectivity re-probe (the status row's "Check
|
||||
// now"). The status text updates by itself via the engine forwarder.
|
||||
callback check-now();
|
||||
}
|
||||
Reference in new issue
Block a user