chore: improve render modal and update deps
This commit is contained in:
46
Cargo.lock
generated
46
Cargo.lock
generated
@@ -1075,7 +1075,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "collections"
|
name = "collections"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"rustc-hash 2.1.1",
|
"rustc-hash 2.1.1",
|
||||||
@@ -1476,7 +1476,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "derive_refineable"
|
name = "derive_refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -2328,7 +2328,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui"
|
name = "gpui"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
@@ -2421,7 +2421,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui_macros"
|
name = "gpui_macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -2433,7 +2433,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui_tokio"
|
name = "gpui_tokio"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gpui",
|
"gpui",
|
||||||
"tokio",
|
"tokio",
|
||||||
@@ -2655,7 +2655,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client"
|
name = "http_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -2672,7 +2672,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client_tls"
|
name = "http_client_tls"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustls",
|
"rustls",
|
||||||
"rustls-platform-verifier",
|
"rustls-platform-verifier",
|
||||||
@@ -3449,7 +3449,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "media"
|
name = "media"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bindgen 0.71.1",
|
"bindgen 0.71.1",
|
||||||
@@ -3672,7 +3672,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "nostr"
|
name = "nostr"
|
||||||
version = "0.42.1"
|
version = "0.42.1"
|
||||||
source = "git+https://github.com/rust-nostr/nostr#870bf5eb3e075cd5383e4a92d5f2703a967bef88"
|
source = "git+https://github.com/rust-nostr/nostr#ef342a983007ad46fc681d90afd9d8458f632b7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -3695,7 +3695,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "nostr-connect"
|
name = "nostr-connect"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/rust-nostr/nostr#870bf5eb3e075cd5383e4a92d5f2703a967bef88"
|
source = "git+https://github.com/rust-nostr/nostr#ef342a983007ad46fc681d90afd9d8458f632b7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-utility",
|
"async-utility",
|
||||||
"nostr",
|
"nostr",
|
||||||
@@ -3707,7 +3707,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "nostr-database"
|
name = "nostr-database"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/rust-nostr/nostr#870bf5eb3e075cd5383e4a92d5f2703a967bef88"
|
source = "git+https://github.com/rust-nostr/nostr#ef342a983007ad46fc681d90afd9d8458f632b7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"flatbuffers",
|
"flatbuffers",
|
||||||
"lru",
|
"lru",
|
||||||
@@ -3718,7 +3718,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "nostr-lmdb"
|
name = "nostr-lmdb"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/rust-nostr/nostr#870bf5eb3e075cd5383e4a92d5f2703a967bef88"
|
source = "git+https://github.com/rust-nostr/nostr#ef342a983007ad46fc681d90afd9d8458f632b7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-utility",
|
"async-utility",
|
||||||
"heed",
|
"heed",
|
||||||
@@ -3731,7 +3731,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "nostr-relay-pool"
|
name = "nostr-relay-pool"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/rust-nostr/nostr#870bf5eb3e075cd5383e4a92d5f2703a967bef88"
|
source = "git+https://github.com/rust-nostr/nostr#ef342a983007ad46fc681d90afd9d8458f632b7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-utility",
|
"async-utility",
|
||||||
"async-wsocket",
|
"async-wsocket",
|
||||||
@@ -3747,7 +3747,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "nostr-sdk"
|
name = "nostr-sdk"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/rust-nostr/nostr#870bf5eb3e075cd5383e4a92d5f2703a967bef88"
|
source = "git+https://github.com/rust-nostr/nostr#ef342a983007ad46fc681d90afd9d8458f632b7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-utility",
|
"async-utility",
|
||||||
"nostr",
|
"nostr",
|
||||||
@@ -4802,7 +4802,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "refineable"
|
name = "refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_refineable",
|
"derive_refineable",
|
||||||
"workspace-hack",
|
"workspace-hack",
|
||||||
@@ -4953,7 +4953,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest_client"
|
name = "reqwest_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -5479,7 +5479,7 @@ checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "semantic_version"
|
name = "semantic_version"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -5864,7 +5864,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sum_tree"
|
name = "sum_tree"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"log",
|
"log",
|
||||||
@@ -6838,7 +6838,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "util"
|
name = "util"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed#42b2b65241feafa7bdccfdc81972fd9bd8ab2922"
|
source = "git+https://github.com/zed-industries/zed#b9ff538747556f3f2f5ed4ee109654eb80cc9c9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-fs",
|
"async-fs",
|
||||||
@@ -8018,9 +8018,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zbus"
|
name = "zbus"
|
||||||
version = "5.8.0"
|
version = "5.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "597f45e98bc7e6f0988276012797855613cd8269e23b5be62cc4e5d28b7e515d"
|
checksum = "4bb4f9a464286d42851d18a605f7193b8febaf5b0919d71c6399b7b26e5b0aad"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-broadcast",
|
"async-broadcast",
|
||||||
"async-executor",
|
"async-executor",
|
||||||
@@ -8051,9 +8051,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zbus_macros"
|
name = "zbus_macros"
|
||||||
version = "5.8.0"
|
version = "5.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e5c8e4e14dcdd9d97a98b189cd1220f30e8394ad271e8c987da84f73693862c2"
|
checksum = "ef9859f68ee0c4ee2e8cde84737c78e3f4c54f946f2a38645d0d4c7a95327659"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-crate",
|
"proc-macro-crate",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|||||||
@@ -160,11 +160,6 @@ impl ChatSpace {
|
|||||||
if !state.read(cx).has_signer() {
|
if !state.read(cx).has_signer() {
|
||||||
this.open_onboarding(window, cx);
|
this.open_onboarding(window, cx);
|
||||||
} else {
|
} else {
|
||||||
// Load all chat rooms from database
|
|
||||||
Registry::global(cx).update(cx, |this, cx| {
|
|
||||||
this.load_rooms(window, cx);
|
|
||||||
});
|
|
||||||
// Open chat panels
|
|
||||||
this.open_chats(window, cx);
|
this.open_chats(window, cx);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -229,6 +224,11 @@ impl ChatSpace {
|
|||||||
// Enable the toolbar for logged in users
|
// Enable the toolbar for logged in users
|
||||||
self.toolbar(true, cx);
|
self.toolbar(true, cx);
|
||||||
|
|
||||||
|
// Load all chat rooms from database
|
||||||
|
Registry::global(cx).update(cx, |this, cx| {
|
||||||
|
this.load_rooms(window, cx);
|
||||||
|
});
|
||||||
|
|
||||||
let weak_dock = self.dock.downgrade();
|
let weak_dock = self.dock.downgrade();
|
||||||
let left = DockItem::panel(Arc::new(sidebar::init(window, cx)));
|
let left = DockItem::panel(Arc::new(sidebar::init(window, cx)));
|
||||||
let center = DockItem::split_with_sizes(
|
let center = DockItem::split_with_sizes(
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ impl Compose {
|
|||||||
.map(|profile| Contact::new(profile.public_key()))
|
.map(|profile| Contact::new(profile.public_key()))
|
||||||
.collect_vec();
|
.collect_vec();
|
||||||
|
|
||||||
|
log::info!("get contacts");
|
||||||
|
|
||||||
Ok(contacts)
|
Ok(contacts)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -51,11 +51,11 @@ impl Preferences {
|
|||||||
|
|
||||||
fn open_edit_profile(&self, window: &mut Window, cx: &mut Context<Self>) {
|
fn open_edit_profile(&self, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
let edit_profile = edit_profile::init(window, cx);
|
let edit_profile = edit_profile::init(window, cx);
|
||||||
|
let title = SharedString::new(t!("preferences.modal_profile_title"));
|
||||||
|
|
||||||
window.open_modal(cx, move |modal, _window, _cx| {
|
window.open_modal(cx, move |modal, _window, _cx| {
|
||||||
let title = SharedString::new(t!("preferences.modal_profile_title"));
|
|
||||||
modal
|
modal
|
||||||
.title(title)
|
.title(title.clone())
|
||||||
.width(px(DEFAULT_MODAL_WIDTH))
|
.width(px(DEFAULT_MODAL_WIDTH))
|
||||||
.child(edit_profile.clone())
|
.child(edit_profile.clone())
|
||||||
});
|
});
|
||||||
@@ -63,11 +63,11 @@ impl Preferences {
|
|||||||
|
|
||||||
fn open_relays(&self, window: &mut Window, cx: &mut Context<Self>) {
|
fn open_relays(&self, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
let relays = relays::init(window, cx);
|
let relays = relays::init(window, cx);
|
||||||
|
let title = SharedString::new(t!("preferences.modal_relays_title"));
|
||||||
|
|
||||||
window.open_modal(cx, move |this, _window, _cx| {
|
window.open_modal(cx, move |this, _window, _cx| {
|
||||||
let title = SharedString::new(t!("preferences.modal_relays_title"));
|
|
||||||
this.width(px(DEFAULT_MODAL_WIDTH))
|
this.width(px(DEFAULT_MODAL_WIDTH))
|
||||||
.title(title)
|
.title(title.clone())
|
||||||
.child(relays.clone())
|
.child(relays.clone())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -576,19 +576,24 @@ impl Sidebar {
|
|||||||
|
|
||||||
fn open_compose(&self, window: &mut Window, cx: &mut Context<Self>) {
|
fn open_compose(&self, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
let compose = compose::init(window, cx);
|
let compose = compose::init(window, cx);
|
||||||
|
let title = SharedString::new(t!("sidebar.direct_messages"));
|
||||||
|
|
||||||
window.open_modal(cx, move |modal, _window, _cx| {
|
window.open_modal(cx, move |modal, _window, _cx| {
|
||||||
modal
|
modal
|
||||||
.title(SharedString::new(t!("sidebar.direct_messages")))
|
.title(title.clone())
|
||||||
.width(px(DEFAULT_MODAL_WIDTH))
|
.width(px(DEFAULT_MODAL_WIDTH))
|
||||||
.child(compose.clone())
|
.child(compose.clone())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn open_loading_modal(&self, window: &mut Window, cx: &mut Context<Self>) {
|
fn open_loading_modal(&self, window: &mut Window, cx: &mut Context<Self>) {
|
||||||
|
let title = SharedString::new(t!("sidebar.loading_modal_title"));
|
||||||
|
let text_1 = SharedString::new(t!("sidebar.loading_modal_body_1"));
|
||||||
|
let text_2 = SharedString::new(t!("sidebar.loading_modal_body_2"));
|
||||||
|
let desc = SharedString::new(t!("sidebar.loading_modal_description"));
|
||||||
|
|
||||||
window.open_modal(cx, move |this, _window, cx| {
|
window.open_modal(cx, move |this, _window, cx| {
|
||||||
this.title(SharedString::new(t!("sidebar.loading_modal_title")))
|
this.title(title.clone()).child(
|
||||||
.child(
|
|
||||||
div()
|
div()
|
||||||
.px_4()
|
.px_4()
|
||||||
.pb_4()
|
.pb_4()
|
||||||
@@ -601,14 +606,14 @@ impl Sidebar {
|
|||||||
.flex_col()
|
.flex_col()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
.text_sm()
|
.text_sm()
|
||||||
.child(SharedString::new(t!("sidebar.loading_modal_body_1")))
|
.child(text_1.clone())
|
||||||
.child(SharedString::new(t!("sidebar.loading_modal_body_2"))),
|
.child(text_2.clone()),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
.text_xs()
|
.text_xs()
|
||||||
.text_color(cx.theme().text_muted)
|
.text_color(cx.theme().text_muted)
|
||||||
.child(SharedString::new(t!("sidebar.loading_modal_description"))),
|
.child(desc.clone()),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user