fix: align message timestamps in greeter panel
This commit is contained in:
@@ -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>>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,8 +246,16 @@ impl GreeterPanel {
|
|||||||
.items_center()
|
.items_center()
|
||||||
.justify_end()
|
.justify_end()
|
||||||
.child(
|
.child(
|
||||||
div().group_hover("", |this| this.invisible()).child(
|
|
||||||
div()
|
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_style(TextStyle::Caption)
|
||||||
.text_color(cx.theme().text_faint)
|
.text_color(cx.theme().text_faint)
|
||||||
.child(created_at),
|
.child(created_at),
|
||||||
@@ -257,7 +265,7 @@ impl GreeterPanel {
|
|||||||
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({
|
||||||
|
|||||||
Reference in New Issue
Block a user