parent
8af9fa6320
commit
c084b6aade
1 changed files with 7 additions and 8 deletions
|
@ -132,12 +132,7 @@ impl DevServerProjects {
|
||||||
let markdown = cx.new_view(|cx| Markdown::new("".to_string(), markdown_style, None, cx));
|
let markdown = cx.new_view(|cx| Markdown::new("".to_string(), markdown_style, None, cx));
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
mode: Mode::CreateDevServer(CreateDevServer {
|
mode: Mode::Default(None),
|
||||||
creating: false,
|
|
||||||
dev_server_id: None,
|
|
||||||
access_token: None,
|
|
||||||
manual_setup: false,
|
|
||||||
}),
|
|
||||||
focus_handle,
|
focus_handle,
|
||||||
scroll_handle: ScrollHandle::new(),
|
scroll_handle: ScrollHandle::new(),
|
||||||
dev_server_store,
|
dev_server_store,
|
||||||
|
@ -154,12 +149,16 @@ impl DevServerProjects {
|
||||||
dev_server_id: DevServerId,
|
dev_server_id: DevServerId,
|
||||||
cx: &mut ViewContext<Self>,
|
cx: &mut ViewContext<Self>,
|
||||||
) {
|
) {
|
||||||
let path = self.project_path_input.read(cx).text(cx).trim().to_string();
|
let mut path = self.project_path_input.read(cx).text(cx).trim().to_string();
|
||||||
|
|
||||||
if path == "" {
|
if path == "" {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !path.starts_with('/') && !path.starts_with('~') {
|
||||||
|
path = format!("~/{}", path);
|
||||||
|
}
|
||||||
|
|
||||||
if self
|
if self
|
||||||
.dev_server_store
|
.dev_server_store
|
||||||
.read(cx)
|
.read(cx)
|
||||||
|
@ -381,7 +380,7 @@ impl DevServerProjects {
|
||||||
creating: false,
|
creating: false,
|
||||||
dev_server_id: Some(DevServerId(dev_server.dev_server_id)),
|
dev_server_id: Some(DevServerId(dev_server.dev_server_id)),
|
||||||
access_token: Some(dev_server.access_token),
|
access_token: Some(dev_server.access_token),
|
||||||
manual_setup: false,
|
manual_setup,
|
||||||
});
|
});
|
||||||
cx.notify();
|
cx.notify();
|
||||||
})?;
|
})?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue