Compare commits

...

1 Commits

Author SHA1 Message Date
Tim
d8534fb94d fix: 评论后--需要刷新帖子内容 #939 2025-09-12 10:43:06 +08:00
2 changed files with 14 additions and 13 deletions

View File

@@ -356,7 +356,7 @@ body {
}
.d2h-file-name {
font-size: 12px !important;
font-size: 14px !important;
}
.d2h-file-header {
@@ -371,14 +371,14 @@ body {
padding-left: 10px !important;
}
.d2h-diff-table {
/* .d2h-diff-table {
font-size: 6px !important;
}
.d2h-code-line ins {
height: 100%;
font-size: 13px !important;
}
} */
/* .d2h-code-line {
height: 12px;

View File

@@ -445,7 +445,7 @@ const handleContentClick = (e) => {
const onCommentDeleted = (id) => {
removeCommentFromList(Number(id), comments.value)
fetchComments()
fetchTimeline()
}
const {
@@ -557,7 +557,7 @@ const postComment = async (parentUserName, text, clear) => {
if (res.ok) {
const data = await res.json()
console.debug('Post comment response data', data)
await fetchComments()
await fetchTimeline()
clear()
if (data.reward && data.reward > 0) {
toast.success(`评论成功,获得 ${data.reward} 经验值`)
@@ -612,7 +612,7 @@ const approvePost = async () => {
status.value = 'PUBLISHED'
toast.success('已通过审核')
await refreshPost()
await fetchChangeLogs()
await fetchTimeline()
} else {
toast.error('操作失败')
}
@@ -628,7 +628,7 @@ const pinPost = async () => {
if (res.ok) {
toast.success('已置顶')
await refreshPost()
await fetchChangeLogs()
await fetchTimeline()
} else {
toast.error('操作失败')
}
@@ -644,7 +644,7 @@ const unpinPost = async () => {
if (res.ok) {
toast.success('已取消置顶')
await refreshPost()
await fetchChangeLogs()
await fetchTimeline()
} else {
toast.error('操作失败')
}
@@ -660,7 +660,7 @@ const excludeRss = async () => {
if (res.ok) {
rssExcluded.value = true
toast.success('已标记为rss不推荐')
await fetchChangeLogs()
await fetchTimeline()
} else {
toast.error('操作失败')
}
@@ -676,7 +676,8 @@ const includeRss = async () => {
if (res.ok) {
rssExcluded.value = false
toast.success('已标记为rss推荐')
await fetchChangeLogs()
await refreshPost()
await fetchTimeline()
} else {
toast.error('操作失败')
}
@@ -693,7 +694,7 @@ const closePost = async () => {
closed.value = true
toast.success('已关闭')
await refreshPost()
await fetchChangeLogs()
await fetchTimeline()
} else {
toast.error('操作失败')
}
@@ -710,7 +711,7 @@ const reopenPost = async () => {
closed.value = false
toast.success('已重新打开')
await refreshPost()
await fetchChangeLogs()
await fetchTimeline()
} else {
toast.error('操作失败')
}
@@ -755,7 +756,7 @@ const rejectPost = async () => {
status.value = 'REJECTED'
toast.success('已驳回')
await refreshPost()
await fetchChangeLogs()
await fetchTimeline()
} else {
toast.error('操作失败')
}