BlueGit

ict rusty-teams

Files

rusty-teams / crates / app / src / views / conversation / notes_space.rs

notes_space.rs

notes_space.rs 1.5 KiB Download Raw
1use gpui_kit::component::v_flex;
2use gpui_kit::*;
3
4use crate::data::Directory;
5use crate::rows::StartInfo;
6use crate::theme;
7use crate::views::avatar::person_avatar;
8
9const NOTES_SPACE_TITLE: &str = "This is your space";
10const NOTES_SPACE_TEXT: &str = "This chat is just for you...with you. Use it for drafts, send files to yourself, or get to know chat features a little better.";
11const NOTES_SPACE_AVATAR_SIZE: f32 = 72.;
12const NOTES_SPACE_TEXT_WIDTH: f32 = 360.;
13
14pub(super) fn render_notes_space(directory: &Directory, start: &StartInfo) -> AnyElement {
15 v_flex()
16 .size_full()
17 .items_center()
18 .justify_center()
19 .gap(px(12.))
20 .px(px(16.))
21 .child(person_avatar(
22 directory,
23 start.user_id.as_deref(),
24 &start.avatar_name,
25 NOTES_SPACE_AVATAR_SIZE,
26 ))
27 .child(
28 v_flex()
29 .items_center()
30 .gap(px(4.))
31 .max_w(px(NOTES_SPACE_TEXT_WIDTH))
32 .child(
33 div()
34 .text_size(px(16.))
35 .font_weight(FontWeight::BOLD)
36 .text_color(theme::text())
37 .child(NOTES_SPACE_TITLE),
38 )
39 .child(
40 div()
41 .text_center()
42 .text_size(px(13.))
43 .text_color(theme::text_muted())
44 .child(NOTES_SPACE_TEXT),
45 ),
46 )
47 .into_any_element()
48}