mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-08-01 08:04:12 +00:00
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:
@@ -283,6 +283,17 @@ kz = "GUI нұсқасы: %{version}"
|
||||
he = "גרסת ממשק משתמש: %{version}"
|
||||
pt-BR = "Versão da GUI: %{version}"
|
||||
|
||||
[gui.settings.daemon_version]
|
||||
en = "Daemon version: %{version}"
|
||||
ru = "Версия демона: %{version}"
|
||||
es = "Versión del demonio: %{version}"
|
||||
fr = "Version du démon: %{version}"
|
||||
zh = "守护进程版本: %{version}"
|
||||
ar = "إصدار démon: %{version}"
|
||||
kz = "Демон нұсқасы: %{version}"
|
||||
he = "גרסת השרת: %{version}"
|
||||
pt-BR = "Versão do daemon: %{version}"
|
||||
|
||||
[gui.settings.theme.label]
|
||||
en = "Color Scheme"
|
||||
ru = "Цветовая схема"
|
||||
|
||||
@@ -120,10 +120,16 @@ impl SoundpadGui {
|
||||
// --------------------------------
|
||||
|
||||
ui.with_layout(Layout::bottom_up(Align::Min), |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(t!(
|
||||
"gui.settings.version",
|
||||
version = env!("CARGO_PKG_VERSION")
|
||||
));
|
||||
ui.label(t!(
|
||||
"gui.settings.daemon_version",
|
||||
version = self.audio_player_state.daemon_version
|
||||
))
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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>,
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user