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
@@ -67,7 +67,6 @@ public class Post {
@Column @Column
private LocalDateTime pinnedAt; private LocalDateTime pinnedAt;
@Column(nullable = false) @Column(nullable = true)
private boolean rssExcluded = false; private boolean rssExcluded = true;
} }
+3 -3
View File
@@ -358,9 +358,9 @@ const articleMenuItems = computed(() => {
items.push({ text: '置顶', onClick: () => pinPost() }) items.push({ text: '置顶', onClick: () => pinPost() })
} }
if (rssExcluded.value) { if (rssExcluded.value) {
items.push({ text: '取消rss推荐', onClick: () => includeRss() }) items.push({ text: 'rss推荐', onClick: () => includeRss() })
} else { } else {
items.push({ text: 'rss推荐', onClick: () => excludeRss() }) items.push({ text: '取消rss推荐', onClick: () => excludeRss() })
} }
} }
if (isAdmin.value && status.value === 'PENDING') { if (isAdmin.value && status.value === 'PENDING') {
@@ -676,7 +676,7 @@ const includeRss = async () => {
}) })
if (res.ok) { if (res.ok) {
rssExcluded.value = false rssExcluded.value = false
toast.success('已取消rss推荐') toast.success('已标记为rss推荐')
} else { } else {
toast.error('操作失败') toast.error('操作失败')
} }