feat: setup wizard shell
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -1,5 +1,7 @@
|
||||
use gpui::{bounds, point, prelude::*, px, size};
|
||||
|
||||
use crate::screen::welcome;
|
||||
|
||||
mod api;
|
||||
mod app;
|
||||
mod asset;
|
||||
@@ -12,6 +14,14 @@ mod theme;
|
||||
mod titlebar;
|
||||
|
||||
fn main() {
|
||||
// GPUI polls our async query futures, but reqwest relies on Tokio's
|
||||
// reactor and blocking pool for DNS, sockets, and timers.
|
||||
let runtime = tokio::runtime::Builder::new_multi_thread()
|
||||
.enable_all()
|
||||
.build()
|
||||
.expect("failed to build Tokio runtime");
|
||||
let _runtime_guard = runtime.enter();
|
||||
|
||||
gpui::Application::new()
|
||||
.with_assets(asset::Asset)
|
||||
.run(setup_application);
|
||||
@@ -48,9 +58,10 @@ fn setup_application(cx: &mut gpui::App) {
|
||||
traffic_light_position: Some(top_left + point(px(12.), px(12.))),
|
||||
..Default::default()
|
||||
}),
|
||||
is_resizable: false,
|
||||
..Default::default()
|
||||
},
|
||||
|window, cx| cx.new(|cx| app::Chrome::new(window, cx)),
|
||||
|window, cx| cx.new(|cx| welcome::Screen::new(cx)),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user