This commit is contained in:
2026-10-27 09:17:11 +07:00
parent b0121f8df2
commit 6fdbedac14
11 changed files with 77 additions and 179 deletions
+26 -14
View File
@@ -1390,21 +1390,26 @@ impl ChatPanel {
}
let reply_id = *id;
let copy_id = *id;
let dropdown_id = *id;
let public_key = *public_key;
actions
.reply(cx.listener(move |this, _event, _window, cx| {
this.reply_to(&reply_id, cx);
}))
.copy(cx.listener(move |this, _event, _window, cx| {
this.copy_message(&copy_id, cx);
}))
.dropdown(move |menu, _window, _cx| {
menu.menu("Copy author", Box::new(Command::Copy(public_key)))
.menu("Seen on", Box::new(Command::Trace(dropdown_id)))
})
let actions = actions.reply(cx.listener(move |this, _event, _window, cx| {
this.reply_to(&reply_id, cx);
}));
let actions = if let Some(message) = self.message(id) {
actions.copy(
SharedString::from(format!("message-copy-{id}")),
message.preview(),
)
} else {
actions
};
actions.dropdown(move |menu, _window, _cx| {
menu.menu("Copy author", Box::new(Command::Copy(public_key)))
.menu("Seen on", Box::new(Command::Trace(dropdown_id)))
})
}
fn render_attachment(&self, url: &Url, cx: &Context<Self>) -> impl IntoElement {
@@ -1879,7 +1884,7 @@ impl Render for ChatPanel {
.items_end()
.child(
Button::new("upload")
.icon(IconName::Plus)
.icon(IconName::Paperclip)
.tooltip("Upload media")
.loading(self.uploading)
.disabled(self.uploading)
@@ -1888,7 +1893,14 @@ impl Render for ChatPanel {
this.upload(window, cx);
})),
)
.child(Textarea::new(&self.input).appearance(false).flex_1())
.child(
Textarea::new(&self.input)
.appearance(false)
.small()
.min_h_8()
.py_1()
.flex_1(),
)
.child(
h_flex()
.pl_1()