fix: align message timestamps in greeter panel

This commit is contained in:
2026-10-19 20:55:37 +07:00
parent deed021332
commit 03f98f5fa8
2 changed files with 17 additions and 18 deletions
-6
View File
@@ -73,22 +73,16 @@ pub enum RoomKind {
pub struct Room { pub struct Room {
/// Conversation ID /// Conversation ID
pub id: u64, pub id: u64,
/// The timestamp of the last message in the room /// The timestamp of the last message in the room
pub created_at: Timestamp, pub created_at: Timestamp,
/// Subject of the room /// Subject of the room
pub(crate) subject: Option<SharedString>, pub(crate) subject: Option<SharedString>,
/// All members of the room /// All members of the room
pub(super) members: Vec<PublicKey>, pub(super) members: Vec<PublicKey>,
/// Kind /// Kind
pub kind: RoomKind, pub kind: RoomKind,
/// Configuration /// Configuration
config: RoomConfig, config: RoomConfig,
/// Person directory, attached when the room is registered /// Person directory, attached when the room is registered
directory: Option<Entity<Directory>>, directory: Option<Entity<Directory>>,
} }
+17 -12
View File
@@ -246,18 +246,26 @@ impl GreeterPanel {
.items_center() .items_center()
.justify_end() .justify_end()
.child( .child(
div().group_hover("", |this| this.invisible()).child( div()
div() .absolute()
.text_style(TextStyle::Caption) .left_0()
.text_color(cx.theme().text_faint) .right_0()
.child(created_at), .top_0()
), .bottom_0()
.group_hover("", |this| this.invisible())
.child(
div()
.text_align(gpui::TextAlign::Right)
.text_style(TextStyle::Caption)
.text_color(cx.theme().text_faint)
.child(created_at),
),
) )
.child( .child(
Button::new(format!("response-{index}")) Button::new(format!("response-{index}"))
.label("Response") .label("Response")
.xsmall() .xsmall()
.primary() .ghost()
.invisible() .invisible()
.group_hover("", |this| this.visible()) .group_hover("", |this| this.visible())
.on_click({ .on_click({
@@ -359,13 +367,10 @@ impl GreeterPanel {
.right_0() .right_0()
.top_0() .top_0()
.bottom_0() .bottom_0()
.flex()
.items_center()
.justify_center()
.group_hover("", |this| this.invisible()) .group_hover("", |this| this.invisible())
.child( .child(
div() div()
.font_normal() .text_align(gpui::TextAlign::Right)
.text_style(TextStyle::Caption) .text_style(TextStyle::Caption)
.text_color(cx.theme().text_faint) .text_color(cx.theme().text_faint)
.child(created_at), .child(created_at),
@@ -375,7 +380,7 @@ impl GreeterPanel {
Button::new(format!("reply-{index}")) Button::new(format!("reply-{index}"))
.label("Reply") .label("Reply")
.xsmall() .xsmall()
.primary() .ghost()
.invisible() .invisible()
.group_hover("", |this| this.visible()) .group_hover("", |this| this.visible())
.on_click({ .on_click({