summaryrefslogtreecommitdiffstats
path: root/src/routes/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/mod.rs')
-rw-r--r--src/routes/mod.rs38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/routes/mod.rs b/src/routes/mod.rs
index 72268d0..f5236c8 100644
--- a/src/routes/mod.rs
+++ b/src/routes/mod.rs
@@ -3,8 +3,8 @@ use std::borrow::Cow;
use std::sync::Arc;
use crate::components::{
- Comment, Content, HTPage, MaybeFillInput, MaybeFillTextArea, NotificationItem, PostItem,
- ThingItem, UserLink,
+ Comment, Content, HTPage, IconExt, MaybeFillInput, MaybeFillTextArea, NotificationItem,
+ PostItem, ThingItem, UserLink,
};
use crate::resp_types::{
RespCommentInfo, RespInstanceInfo, RespNotification, RespPostCommentInfo, RespPostListPost,
@@ -232,21 +232,6 @@ async fn page_comment_inner(
}
<p>
{
- if let Some(parent) = &comment.parent {
- Some(render::rsx! {
- <div>
- <small><a href={format!("/comments/{}", parent.id)}>{"<- "}{lang.tr("to_parent", None)}</a></small>
- </div>
- })
- } else {
- None
- }
- }
- <small><cite><UserLink user={comment.as_ref().author.as_ref()} /></cite>{":"}</small>
- <Content src={&comment} />
- </p>
- <div class={"actionList"}>
- {
if base_data.login.is_some() {
Some(render::rsx! {
<>
@@ -254,13 +239,13 @@ async fn page_comment_inner(
if comment.as_ref().your_vote.is_some() {
render::rsx! {
<form method={"POST"} action={format!("/comments/{}/unlike", comment.as_ref().as_ref().id)}>
- <button type={"submit"}>{lang.tr("like_undo", None)}</button>
+ <button type={"submit"} class={"iconbutton"}>{hitide_icons::UPVOTED.img()}</button>
</form>
}
} else {
render::rsx! {
<form method={"POST"} action={format!("/comments/{}/like", comment.as_ref().as_ref().id)}>
- <button type={"submit"}>{lang.tr("like", None)}</button>
+ <button type={"submit"} class={"iconbutton"}>{hitide_icons::UPVOTE.img()}</button>
</form>
}
}
@@ -272,6 +257,21 @@ async fn page_comment_inner(
}
}
{
+ if let Some(parent) = &comment.parent {
+ Some(render::rsx! {
+ <div>
+ <small><a href={format!("/comments/{}", parent.id)}>{"<- "}{lang.tr("to_parent", None)}</a></small>
+ </div>
+ })
+ } else {
+ None
+ }
+ }
+ <small><cite><UserLink user={comment.as_ref().author.as_ref()} /></cite>{":"}</small>
+ <Content src={&comment} />
+ </p>
+ <div class={"actionList"}>
+ {
if author_is_me(&comment.as_ref().author, &base_data.login) {
Some(render::rsx! {
<a href={format!("/comments/{}/delete", comment.as_ref().as_ref().id)}>{lang.tr("delete", None)}</a>