migrate ui components to gpui-kit
This commit is contained in:
+1
-1
@@ -10,7 +10,6 @@ crate-type = ["cdylib", "rlib"]
|
||||
[dependencies]
|
||||
workspace = { path = "../crates/workspace" }
|
||||
ui = { path = "../crates/ui" }
|
||||
theme = { path = "../crates/theme" }
|
||||
state = { path = "../crates/state" }
|
||||
nip4e = { path = "../crates/nip4e" }
|
||||
chat = { path = "../crates/chat" }
|
||||
@@ -21,6 +20,7 @@ person = { path = "../crates/person" }
|
||||
gpui.workspace = true
|
||||
gpui_platform.workspace = true
|
||||
gpui_web.workspace = true
|
||||
gpui-kit.workspace = true
|
||||
|
||||
log.workspace = true
|
||||
instant = { workspace = true, features = ["wasm-bindgen"] }
|
||||
|
||||
+4
-8
@@ -1,5 +1,4 @@
|
||||
use gpui::*;
|
||||
use ui::Root;
|
||||
use universal_time::{Instant, MonotonicClock, SystemTime, WallClock, define_time_provider};
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@@ -47,11 +46,8 @@ pub fn run() -> Result<(), JsValue> {
|
||||
};
|
||||
|
||||
app.run(|cx| {
|
||||
// Initialize components
|
||||
ui::init(cx);
|
||||
|
||||
// Initialize theme
|
||||
theme::init(cx);
|
||||
// Initialize the framework before anything renders
|
||||
gpui_kit::init(cx);
|
||||
|
||||
// Initialize settings
|
||||
settings::init(cx);
|
||||
@@ -73,8 +69,8 @@ pub fn run() -> Result<(), JsValue> {
|
||||
// Initialize groups registry
|
||||
nip29::init(cx);
|
||||
|
||||
cx.open_window(WindowOptions::default(), |window, cx| {
|
||||
cx.new(|cx| Root::new(workspace::init(window, cx).into(), window, cx))
|
||||
gpui_kit::open_window(WindowOptions::default(), cx, |window, cx| {
|
||||
workspace::init(window, cx)
|
||||
})
|
||||
.expect("Failed to open window. Please restart the application.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user