Skip to content

Commit

Permalink
refactor settings + author
Browse files Browse the repository at this point in the history
  • Loading branch information
tikitko committed Nov 23, 2023
1 parent dea8243 commit fe6dcff
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 215 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ chrono = { version = "0.4", features = ["unstable-locales"] }

yew = { version = "0.21" }
yew-router = { version = "0.18" }
yew-alt-html = { version = "0.4" }
yew-hooks = { version = "0.3", optional = true }

wasm-bindgen-futures = { version = "0.4", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions src/components/author_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,15 @@ pub fn author_card(props: &AuthorCardProps) -> Html {
</small>
</p>
<p class="card-text placeholder-glow">
{ "Email: " }
if let Some(author) = author.as_ref() {
{
if author.blocked == 1 {
"(скрыт)".to_owned()
"(Email скрыт)".to_owned()
} else {
author.email
.clone()
.none_if_empty()
.unwrap_or("(не указан)".to_owned())
.unwrap_or("(Email не указан)".to_owned())
}
}
} else {
Expand Down Expand Up @@ -202,6 +201,7 @@ pub fn author_card(props: &AuthorCardProps) -> Html {
</div>
</div>
};

html! {
<div class="card mb-3">
if let (Some(author), true) = (author.as_ref(), link_to) {
Expand Down
Loading

0 comments on commit fe6dcff

Please sign in to comment.