This commit is contained in:
BFlat committed 2023-03-19 14:27:41 +07:00
1 parent 7047393460
commit 73407de67f
4 files changed
+18 -9

No files matched your search

@@ -7,7 +7,7 @@ interface Props {
}
function Gravatar(props: Props) {
const gravatarUrl = `https://www.gravatar.com/avatar/${props.email_hash}?s=${props.size}&d=https://placehold.co/60x60.png`;
const gravatarUrl = `https://www.gravatar.com/avatar/${props.email_hash}?s=${props.size}&d=https://placehold.co/600x600.png`;
let altText = "gravatar";
if (props.username !== undefined) {
@@ -16,7 +16,7 @@ function Gravatar(props: Props) {
return (
<img
className="rounded-circle border border-2 h-100"
className="rounded-circle border border-2 h-100 gravatar-img"
alt={altText}
src={gravatarUrl}
height={props.size}
@@ -1054,6 +1054,10 @@ styles with important tags:
.comment-time {
font-size: 14px;
}
.gravatar-img {
pointer-events: none;
}
}
select {
@@ -6,6 +6,7 @@ import { SafeDeleteCommentButton } from "./SafeDeleteCommentButton";
import { motion } from "framer-motion";
import { container, item } from "../../../../data/animation";
import { Gravatar } from "@storyteller/components/src/elements/Gravatar";
import { Link } from "react-router-dom";
interface Props {
entityType: string;
@@ -55,6 +56,8 @@ function CommentList(props: Props) {
);
}
let profileLink = `/profile/${comment.username}`;
rows.push(
<motion.tr key={comment.token} variants={item}>
<td className="px-0">
@@ -62,9 +65,9 @@ function CommentList(props: Props) {
<Gravatar size={40} email_hash={comment.user_gravatar_hash} />
<div>
<div className="d-flex gap-2 align-items-center">
<span className="fw-medium text-white">
<Link to={profileLink} className="fw-medium text-white">
{comment.user_display_name}
</span>
</Link>
<span>·</span>
<span className="opacity-75 comment-time">
{relativeCreateTime}
@@ -535,11 +535,13 @@ function ProfilePage(this: any, props: Props) {
role="tabpanel"
aria-labelledby="comments-tab"
>
<CommentComponent
entityType="user"
entityToken={userData?.user_token}
sessionWrapper={props.sessionWrapper}
/>
<div className="mt-3 mt-lg-0">
<CommentComponent
entityType="user"
entityToken={userData?.user_token}
sessionWrapper={props.sessionWrapper}
/>
</div>
</div>
</div>
</div>