From 03f98f5fa8802ecac681ad4950a844e1e353dfa9 Mon Sep 17 00:00:00 2001 From: Ren Amamiya Date: Mon, 19 Oct 2026 20:55:37 +0700 Subject: [PATCH] fix: align message timestamps in greeter panel --- crates/chat/src/room.rs | 6 ------ crates/workspace/src/panels/greeter.rs | 29 +++++++++++++++----------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/crates/chat/src/room.rs b/crates/chat/src/room.rs index ad37fc8a..c119f823 100644 --- a/crates/chat/src/room.rs +++ b/crates/chat/src/room.rs @@ -73,22 +73,16 @@ pub enum RoomKind { pub struct Room { /// Conversation ID pub id: u64, - /// The timestamp of the last message in the room pub created_at: Timestamp, - /// Subject of the room pub(crate) subject: Option, - /// All members of the room pub(super) members: Vec, - /// Kind pub kind: RoomKind, - /// Configuration config: RoomConfig, - /// Person directory, attached when the room is registered directory: Option>, } diff --git a/crates/workspace/src/panels/greeter.rs b/crates/workspace/src/panels/greeter.rs index d530439f..bfcb99d3 100644 --- a/crates/workspace/src/panels/greeter.rs +++ b/crates/workspace/src/panels/greeter.rs @@ -246,18 +246,26 @@ impl GreeterPanel { .items_center() .justify_end() .child( - div().group_hover("", |this| this.invisible()).child( - div() - .text_style(TextStyle::Caption) - .text_color(cx.theme().text_faint) - .child(created_at), - ), + div() + .absolute() + .left_0() + .right_0() + .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( Button::new(format!("response-{index}")) .label("Response") .xsmall() - .primary() + .ghost() .invisible() .group_hover("", |this| this.visible()) .on_click({ @@ -359,13 +367,10 @@ impl GreeterPanel { .right_0() .top_0() .bottom_0() - .flex() - .items_center() - .justify_center() .group_hover("", |this| this.invisible()) .child( div() - .font_normal() + .text_align(gpui::TextAlign::Right) .text_style(TextStyle::Caption) .text_color(cx.theme().text_faint) .child(created_at), @@ -375,7 +380,7 @@ impl GreeterPanel { Button::new(format!("reply-{index}")) .label("Reply") .xsmall() - .primary() + .ghost() .invisible() .group_hover("", |this| this.visible()) .on_click({