mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2025-03-15 06:28:27 +03:00
fix(ui): fixed hostname option in sandbox settings
This commit is contained in:
parent
f42a91c0ea
commit
f64d60128c
2 changed files with 17 additions and 2 deletions
|
@ -94,13 +94,13 @@ impl SimpleAsyncComponent for EnvironmentApp {
|
|||
connect_changed => |entry| {
|
||||
if let Ok(mut config) = Config::get() {
|
||||
let command = entry.text().trim().to_string();
|
||||
|
||||
|
||||
config.game.command = if command.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(command)
|
||||
};
|
||||
|
||||
|
||||
Config::update(config);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,6 +191,21 @@ impl SimpleAsyncComponent for SandboxApp {
|
|||
|
||||
adw::EntryRow {
|
||||
set_title: &tr("hostname"),
|
||||
set_text: CONFIG.sandbox.hostname.as_ref().unwrap_or(&String::new()).trim(),
|
||||
|
||||
connect_changed => |entry| {
|
||||
if let Ok(mut config) = Config::get() {
|
||||
let command = entry.text().trim().to_string();
|
||||
|
||||
config.sandbox.hostname = if command.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(command)
|
||||
};
|
||||
|
||||
Config::update(config);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue