fix: 默认不推荐

This commit is contained in:
tim
2025-08-18 19:51:57 +08:00
parent 4462d8f711
commit 425ad03e6f
2 changed files with 5 additions and 6 deletions

View File

@@ -67,7 +67,6 @@ public class Post {
@Column
private LocalDateTime pinnedAt;
@Column(nullable = false)
private boolean rssExcluded = false;
@Column(nullable = true)
private boolean rssExcluded = true;
}

View File

@@ -358,9 +358,9 @@ const articleMenuItems = computed(() => {
items.push({ text: '置顶', onClick: () => pinPost() })
}
if (rssExcluded.value) {
items.push({ text: '取消rss推荐', onClick: () => includeRss() })
items.push({ text: 'rss推荐', onClick: () => includeRss() })
} else {
items.push({ text: 'rss推荐', onClick: () => excludeRss() })
items.push({ text: '取消rss推荐', onClick: () => excludeRss() })
}
}
if (isAdmin.value && status.value === 'PENDING') {
@@ -676,7 +676,7 @@ const includeRss = async () => {
})
if (res.ok) {
rssExcluded.value = false
toast.success('已取消rss推荐')
toast.success('已标记为rss推荐')
} else {
toast.error('操作失败')
}