feat(profile): show when the user has joined lemmy
This commit is contained in:
parent
355a3da2fa
commit
929e2b8556
|
@ -469,6 +469,7 @@ dependencies = [
|
||||||
"iana-time-zone",
|
"iana-time-zone",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
|
"pure-rust-locales",
|
||||||
"serde",
|
"serde",
|
||||||
"time 0.1.45",
|
"time 0.1.45",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
@ -2040,6 +2041,12 @@ dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pure-rust-locales"
|
||||||
|
version = "0.5.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b45c49fc4f91f35bae654f85ebb3a44d60ac64f11b3166ffa609def390c732d8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.32"
|
version = "1.0.32"
|
||||||
|
|
|
@ -14,6 +14,6 @@ markdown = "0.3"
|
||||||
html2pango = "0.5"
|
html2pango = "0.5"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
mime_guess = "2.0"
|
mime_guess = "2.0"
|
||||||
chrono = "0.4"
|
chrono = { version ="0.4", features = ["unstable-locales"] }
|
||||||
timeago = "0.4"
|
timeago = "0.4"
|
||||||
itertools = "0.11"
|
itertools = "0.11"
|
||||||
|
|
|
@ -11,6 +11,7 @@ use crate::dialogs::editor::EditorType;
|
||||||
use crate::settings;
|
use crate::settings;
|
||||||
use crate::util::get_web_image_msg;
|
use crate::util::get_web_image_msg;
|
||||||
use crate::util::markdown_to_pango_markup;
|
use crate::util::markdown_to_pango_markup;
|
||||||
|
use crate::util::format_elapsed_time;
|
||||||
|
|
||||||
use super::comment_row::CommentRow;
|
use super::comment_row::CommentRow;
|
||||||
use super::moderates_row::ModeratesRow;
|
use super::moderates_row::ModeratesRow;
|
||||||
|
@ -74,6 +75,12 @@ impl SimpleComponent for ProfilePage {
|
||||||
set_use_markup: true,
|
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 {
|
gtk::Box {
|
||||||
set_orientation: gtk::Orientation::Horizontal,
|
set_orientation: gtk::Orientation::Horizontal,
|
||||||
set_margin_top: 10,
|
set_margin_top: 10,
|
||||||
|
@ -95,6 +102,7 @@ impl SimpleComponent for ProfilePage {
|
||||||
gtk::Button {
|
gtk::Button {
|
||||||
set_label: "Send message",
|
set_label: "Send message",
|
||||||
connect_clicked => ProfileInput::SendMessageRequest,
|
connect_clicked => ProfileInput::SendMessageRequest,
|
||||||
|
#[watch]
|
||||||
set_visible: settings::get_current_account().jwt.is_some(),
|
set_visible: settings::get_current_account().jwt.is_some(),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue