mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-02 18:10:47 +08:00
feat: menu
This commit is contained in:
@@ -225,7 +225,7 @@ export default {
|
||||
const iconMap = {
|
||||
POST_VIEWED: 'fas fa-eye',
|
||||
COMMENT_REPLY: 'fas fa-reply',
|
||||
POST_REVIEWED: 'fas fa-check',
|
||||
POST_REVIEWED: 'fas fa-shield-alt',
|
||||
POST_REVIEW_REQUEST: 'fas fa-gavel',
|
||||
POST_UPDATED: 'fas fa-comment-dots',
|
||||
USER_ACTIVITY: 'fas fa-user',
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<i class="fas fa-user-minus"></i>
|
||||
取消订阅
|
||||
</div>
|
||||
<DropdownMenu v-if="isAdmin && status === 'PENDING'" :items="reviewMenuItems">
|
||||
<DropdownMenu :items="articleMenuItems">
|
||||
<template #trigger>
|
||||
<i class="fas fa-ellipsis-vertical action-menu-icon"></i>
|
||||
</template>
|
||||
@@ -138,7 +138,8 @@ export default {
|
||||
const loggedIn = computed(() => authState.loggedIn)
|
||||
const isAdmin = computed(() => authState.role === 'ADMIN')
|
||||
const isAuthor = computed(() => authState.username === author.value.username)
|
||||
const reviewMenuItems = [
|
||||
const articleMenuItems = [
|
||||
{ text: '删除文章', color: 'red', onClick: () => deletePost() },
|
||||
{ text: '通过审核', onClick: () => approvePost() },
|
||||
{ text: '驳回', color: 'red', onClick: () => rejectPost() }
|
||||
]
|
||||
@@ -339,6 +340,9 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
const deletePost = async () => {
|
||||
}
|
||||
|
||||
const rejectPost = async () => {
|
||||
const token = getToken()
|
||||
if (!token) return
|
||||
@@ -415,7 +419,7 @@ export default {
|
||||
currentIndex,
|
||||
totalPosts,
|
||||
postReactions,
|
||||
reviewMenuItems,
|
||||
articleMenuItems,
|
||||
postId,
|
||||
postComment,
|
||||
onSliderInput,
|
||||
|
||||
Reference in New Issue
Block a user