mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-08-14 23:31:01 +00:00
feat: add BaseUserAvatar and unify avatar usage
This commit is contained in:
@@ -26,10 +26,14 @@
|
||||
<span v-if="level >= 2" class="reply-item">
|
||||
<next class="reply-icon" />
|
||||
<span class="reply-info">
|
||||
<BaseImage
|
||||
<BaseUserAvatar
|
||||
v-if="comment.parentUserName"
|
||||
class="reply-avatar"
|
||||
:src="comment.parentUserAvatar || '/default-avatar.svg'"
|
||||
alt="avatar"
|
||||
:user-id="comment.parentUserId"
|
||||
:avatar="comment.parentUserAvatar"
|
||||
:username="comment.parentUserName"
|
||||
:width="20"
|
||||
:link="Boolean(comment.parentUserId)"
|
||||
@click="comment.parentUserClick && comment.parentUserClick()"
|
||||
/>
|
||||
<span class="reply-user-name">{{ comment.parentUserName }}</span>
|
||||
@@ -253,16 +257,19 @@ const submitReply = async (parentUserName, text, clear) => {
|
||||
replyList.push({
|
||||
id: data.id,
|
||||
userName: data.author.username,
|
||||
userId: data.author.id,
|
||||
time: TimeManager.format(data.createdAt),
|
||||
avatar: data.author.avatar,
|
||||
medal: data.author.displayMedal,
|
||||
text: data.content,
|
||||
parentUserName: parentUserName,
|
||||
parentUserAvatar: props.comment.avatar,
|
||||
parentUserId: props.comment.userId,
|
||||
reactions: [],
|
||||
reply: (data.replies || []).map((r) => ({
|
||||
id: r.id,
|
||||
userName: r.author.username,
|
||||
userId: r.author.id,
|
||||
time: TimeManager.format(r.createdAt),
|
||||
avatar: r.author.avatar,
|
||||
text: r.content,
|
||||
@@ -394,9 +401,7 @@ const handleContentClick = (e) => {
|
||||
.reply-avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.reply-icon {
|
||||
|
||||
Reference in New Issue
Block a user