feat(lib, daemon, gui): daemon version in fullstate and gui (#180)

* add daemon_version field to the FullState

* add daemon version to the pwsp-gui settings page
This commit is contained in:
Tarasov Aleksandr
2026-07-30 10:30:31 +03:00
committed by GitHub
parent 0d0b5f9f29
commit c9f30e09d7
6 changed files with 25 additions and 4 deletions
+1
View File
@@ -59,6 +59,7 @@ pub struct FullState {
pub all_inputs: HashMap<String, String>,
pub current_output: String,
pub all_outputs: HashMap<String, String>,
pub daemon_version: String,
}
/// Which of the two independent output paths a volume applies to.
+1
View File
@@ -684,6 +684,7 @@ impl Executable for GetFullStateCommand {
all_inputs,
current_output: audio_player.output_device_name.clone().unwrap_or_default(),
all_outputs,
daemon_version: env!("CARGO_PKG_VERSION").into(),
};
match serde_json::to_string(&full_state) {
+1
View File
@@ -130,6 +130,7 @@ pub struct AudioPlayerState {
pub all_outputs_sorted: Vec<(String, String)>,
pub is_daemon_running: bool,
pub daemon_version: String,
pub hotkey_config: Option<HotkeyConfig>,
}
+1
View File
@@ -148,6 +148,7 @@ pub fn start_app_state_thread(audio_player_state_shared: Arc<Mutex<AudioPlayerSt
}
guard.is_daemon_running = true;
guard.daemon_version = full_state.daemon_version;
}
// Poll hotkey config at a lower frequency (~every 2 seconds)