refactor poll and lottery forms, add poll notifications

This commit is contained in:
Tim
2025-08-31 01:49:37 +08:00
parent db1d7981c5
commit 5a09934866
15 changed files with 442 additions and 316 deletions

View File

@@ -195,6 +195,44 @@
已开奖
</NotificationContainer>
</template>
<template v-else-if="item.type === 'POLL_VOTE'">
<NotificationContainer :item="item" :markRead="markRead">
有用户参与了你的投票贴
<NuxtLink
class="notif-content-text"
@click="markRead(item.id)"
:to="`/posts/${item.post.id}`"
>
{{ stripMarkdownLength(item.post.title, 100) }}
</NuxtLink>
</NotificationContainer>
</template>
<template v-else-if="item.type === 'POLL_RESULT_OWNER'">
<NotificationContainer :item="item" :markRead="markRead">
你的投票帖
<NuxtLink
class="notif-content-text"
@click="markRead(item.id)"
:to="`/posts/${item.post.id}`"
>
{{ stripMarkdownLength(item.post.title, 100) }}
</NuxtLink>
已出结果
</NotificationContainer>
</template>
<template v-else-if="item.type === 'POLL_RESULT_PARTICIPANT'">
<NotificationContainer :item="item" :markRead="markRead">
你参与的投票帖
<NuxtLink
class="notif-content-text"
@click="markRead(item.id)"
:to="`/posts/${item.post.id}`"
>
{{ stripMarkdownLength(item.post.title, 100) }}
</NuxtLink>
已出结果
</NotificationContainer>
</template>
<template v-else-if="item.type === 'POST_UPDATED'">
<NotificationContainer :item="item" :markRead="markRead">
您关注的帖子