mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-11 21:27:31 +08:00
feat: update timeline ui
This commit is contained in:
@@ -109,7 +109,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (id) {
|
if (id) {
|
||||||
this.$router.push(`/users/${id}`)
|
this.$router.push(`/users/${id}`).then(() => {
|
||||||
|
window.location.reload()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goToSignup() {
|
goToSignup() {
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ export default {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.reaction-option {
|
.reaction-option {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<span class="notif-type">
|
<span class="notif-type">
|
||||||
<template v-if="item.type === 'COMMENT_REPLY' && item.parentComment">
|
<template v-if="item.type === 'COMMENT_REPLY' && item.parentComment">
|
||||||
<div class="notif-content-container">
|
<div class="notif-content-container">
|
||||||
<span class="notif-user">{{ item.comment.author.username }} </span> 对我的评论
|
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/users/${item.comment.author.id}`">{{ item.comment.author.username }} </router-link> 对我的评论
|
||||||
<span>
|
<span>
|
||||||
<router-link class="notif-content-text" @click="markRead(item.id)"
|
<router-link class="notif-content-text" @click="markRead(item.id)"
|
||||||
:to="`/posts/${item.post.id}#comment-${item.parentComment.id}`">
|
:to="`/posts/${item.post.id}#comment-${item.parentComment.id}`">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.type === 'COMMENT_REPLY' && !item.parentComment">
|
<template v-else-if="item.type === 'COMMENT_REPLY' && !item.parentComment">
|
||||||
<div class="notif-content-container">
|
<div class="notif-content-container">
|
||||||
<span class="notif-user">{{ item.comment.author.username }} </span> 对我的文章
|
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/users/${item.comment.author.id}`">{{ item.comment.author.username }} </router-link> 对我的文章
|
||||||
<span>
|
<span>
|
||||||
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}`">
|
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}`">
|
||||||
{{ sanitizeDescription(item.post.title) }}
|
{{ sanitizeDescription(item.post.title) }}
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.type === 'REACTION' && item.comment">
|
<template v-else-if="item.type === 'REACTION' && item.comment">
|
||||||
<div class="notif-content-container">
|
<div class="notif-content-container">
|
||||||
<span class="notif-user">{{ item.fromUser.username }} </span> 对我的评论
|
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/users/${item.fromUser.id}`">{{ item.fromUser.username }} </router-link> 对我的评论
|
||||||
<span>
|
<span>
|
||||||
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}#comment-${item.comment.id}`">
|
<router-link class="notif-content-text" @click="markRead(item.id)" :to="`/posts/${item.post.id}#comment-${item.comment.id}`">
|
||||||
{{ sanitizeDescription(item.comment.content) }}
|
{{ sanitizeDescription(item.comment.content) }}
|
||||||
|
|||||||
@@ -157,6 +157,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="selectedTab === 'timeline'" class="profile-timeline">
|
<div v-else-if="selectedTab === 'timeline'" class="profile-timeline">
|
||||||
|
<div v-if="timelineItems.length === 0" class="no-timeline">
|
||||||
|
<i class="fas fa-inbox no-timeline-icon"></i>
|
||||||
|
<div class="no-timeline-text">
|
||||||
|
暂无时间线
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<BaseTimeline :items="timelineItems">
|
<BaseTimeline :items="timelineItems">
|
||||||
<template #item="{ item }">
|
<template #item="{ item }">
|
||||||
<template v-if="item.type === 'post'">
|
<template v-if="item.type === 'post'">
|
||||||
@@ -627,4 +633,18 @@ export default {
|
|||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-timeline {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 10px;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 300px;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-timeline-text {
|
||||||
|
font-size: 16px;
|
||||||
|
color: var(--text-color);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user