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
|
@ -191,6 +191,21 @@ impl SimpleAsyncComponent for SandboxApp {
|
||||||
|
|
||||||
adw::EntryRow {
|
adw::EntryRow {
|
||||||
set_title: &tr("hostname"),
|
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…
Reference in a new issue