Load server details when opening from the launcher sidebar
Use the shared open_server path so stopped servers load settings immediately and switching servers clears stale detail state. Co-Authored-By: Codex (GPT-6.1) <noreply@openai.com>
This commit is contained in:
@@ -1793,7 +1793,7 @@ impl Launcher {
|
|||||||
.child(sub(tr(if up { "Running" } else { "Stopped" }).into())),
|
.child(sub(tr(if up { "Running" } else { "Stopped" }).into())),
|
||||||
)
|
)
|
||||||
.on_click(cx.listener(move |this, _: &ClickEvent, _, cx| {
|
.on_click(cx.listener(move |this, _: &ClickEvent, _, cx| {
|
||||||
this.servers.open = Some(dir.clone());
|
this.open_server(dir.clone());
|
||||||
this.go(Page::Servers);
|
this.go(Page::Servers);
|
||||||
cx.notify();
|
cx.notify();
|
||||||
})),
|
})),
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ impl Launcher {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn open_server(&mut self, dir: PathBuf) {
|
pub(super) fn open_server(&mut self, dir: PathBuf) {
|
||||||
if self.servers.open.as_ref() == Some(&dir) {
|
if self.servers.open.as_ref() == Some(&dir) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user