feat(profile): show when the user has joined lemmy

This commit is contained in:
Bnyro
2023-08-08 18:52:12 +02:00
parent 355a3da2fa
commit 929e2b8556
3 changed files with 16 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ use crate::dialogs::editor::EditorType;
use crate::settings;
use crate::util::get_web_image_msg;
use crate::util::markdown_to_pango_markup;
use crate::util::format_elapsed_time;
use super::comment_row::CommentRow;
use super::moderates_row::ModeratesRow;
@@ -74,6 +75,12 @@ impl SimpleComponent for ProfilePage {
set_use_markup: true,
},
gtk::Label {
set_margin_top: 5,
#[watch]
set_text: &format!("Joined {}", format_elapsed_time(model.info.person_view.person.published)),
},
gtk::Box {
set_orientation: gtk::Orientation::Horizontal,
set_margin_top: 10,
@@ -95,6 +102,7 @@ impl SimpleComponent for ProfilePage {
gtk::Button {
set_label: "Send message",
connect_clicked => ProfileInput::SendMessageRequest,
#[watch]
set_visible: settings::get_current_account().jwt.is_some(),
}
},