UI code reworked

This commit is contained in:
Ultradesu
2025-07-22 23:14:55 +03:00
parent 7cc446d227
commit cba8c58af7
4 changed files with 48 additions and 11 deletions

View File

@@ -154,9 +154,20 @@ async fn main() -> std::io::Result<()> {
// Settings UI mode - just show settings window and exit
if args.settings_ui {
info!("Running settings UI window");
gui::run_settings_window();
return Ok(());
#[cfg(feature = "gui")]
{
info!("Running settings UI window");
gui::run_settings_window();
return Ok(());
}
#[cfg(not(feature = "gui"))]
{
error!("GUI features not compiled. Install system dependencies and rebuild with --features gui");
return Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"GUI features not compiled"
));
}
}
// GUI mode has priority