BIN
assets/brand/system.png
Normal file
BIN
assets/brand/system.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -436,11 +436,6 @@ impl ChatSpace {
|
|||||||
} else {
|
} else {
|
||||||
css.signal.send(SignalKind::RelaysNotFound).await;
|
css.signal.send(SignalKind::RelaysNotFound).await;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
for (id, relays) in client.subscriptions().await {
|
|
||||||
log::info!("sub id: {id:?}");
|
|
||||||
log::info!("relays: {relays:?}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Kind::ContactList => {
|
Kind::ContactList => {
|
||||||
|
|||||||
@@ -395,6 +395,7 @@ impl Chat {
|
|||||||
cx.spawn_in(window, async move |this, cx| {
|
cx.spawn_in(window, async move |this, cx| {
|
||||||
match task.await {
|
match task.await {
|
||||||
Ok(reports) => {
|
Ok(reports) => {
|
||||||
|
if !reports.is_empty() {
|
||||||
this.update(cx, |this, cx| {
|
this.update(cx, |this, cx| {
|
||||||
this.reports_by_id.entry(id_clone).and_modify(|this| {
|
this.reports_by_id.entry(id_clone).and_modify(|this| {
|
||||||
*this = reports;
|
*this = reports;
|
||||||
@@ -403,6 +404,7 @@ impl Chat {
|
|||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
cx.update(|window, cx| {
|
cx.update(|window, cx| {
|
||||||
window.push_notification(e.to_string(), cx);
|
window.push_notification(e.to_string(), cx);
|
||||||
@@ -643,17 +645,28 @@ impl Chat {
|
|||||||
fn render_warning(&mut self, ix: usize, content: String, cx: &mut Context<Self>) -> AnyElement {
|
fn render_warning(&mut self, ix: usize, content: String, cx: &mut Context<Self>) -> AnyElement {
|
||||||
div()
|
div()
|
||||||
.id(ix)
|
.id(ix)
|
||||||
|
.relative()
|
||||||
.w_full()
|
.w_full()
|
||||||
.py_1()
|
.py_1()
|
||||||
.px_3()
|
.px_3()
|
||||||
|
.bg(cx.theme().warning_background)
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
h_flex()
|
||||||
.gap_3()
|
.gap_3()
|
||||||
.text_sm()
|
.text_sm()
|
||||||
.text_color(cx.theme().warning_foreground)
|
.text_color(cx.theme().warning_foreground)
|
||||||
.child(Avatar::new("brand/avatar.png").size(rems(2.)))
|
.child(Avatar::new("brand/system.png").size(rems(2.)))
|
||||||
.child(SharedString::from(content)),
|
.child(SharedString::from(content)),
|
||||||
)
|
)
|
||||||
|
.child(
|
||||||
|
div()
|
||||||
|
.absolute()
|
||||||
|
.left_0()
|
||||||
|
.top_0()
|
||||||
|
.w(px(2.))
|
||||||
|
.h_full()
|
||||||
|
.bg(cx.theme().warning_active),
|
||||||
|
)
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -704,7 +717,8 @@ impl Chat {
|
|||||||
.py_1()
|
.py_1()
|
||||||
.px_3()
|
.px_3()
|
||||||
.child(
|
.child(
|
||||||
h_flex()
|
div()
|
||||||
|
.flex()
|
||||||
.gap_3()
|
.gap_3()
|
||||||
.when(!hide_avatar, |this| {
|
.when(!hide_avatar, |this| {
|
||||||
this.child(Avatar::new(author.avatar_url(proxy)).size(rems(2.)))
|
this.child(Avatar::new(author.avatar_url(proxy)).size(rems(2.)))
|
||||||
|
|||||||
Reference in New Issue
Block a user