feat: 彻底重构后台 UI 与对话上下文引用模块,全面优化移动端适配 (v1.0.4) #6

Merged
bbb-lsy07 merged 11 commits from main into main 2026-06-21 12:20:25 +08:00
3 changed files with 11 additions and 5 deletions
Showing only changes of commit 4d8b6ffc76 - Show all commits
+1 -1
View File
@@ -5,7 +5,7 @@ plugins {
} }
group 'top.nxxy335.commentaiautopilot' group 'top.nxxy335.commentaiautopilot'
version '1.0.0' version '1.0.1'
repositories { repositories {
mavenCentral() mavenCentral()
+1 -1
View File
@@ -30,4 +30,4 @@ spec:
url: "https://github.com/sunny-335/plugin-comment-ai-autopilot/blob/main/LICENSE" url: "https://github.com/sunny-335/plugin-comment-ai-autopilot/blob/main/LICENSE"
settingName: "comment-ai-autopilot-settings" settingName: "comment-ai-autopilot-settings"
configMapName: "comment-ai-autopilot-configmap" configMapName: "comment-ai-autopilot-configmap"
version: "1.0.0" version: "1.0.1"
+9 -3
View File
@@ -283,16 +283,22 @@ const stripHtml = (html: string) => {
const truncateQuote = (content: string, length = 40) => { const truncateQuote = (content: string, length = 40) => {
if (!content) return "" if (!content) return ""
const plain = stripHtml(content) let plain = stripHtml(content)
// 清理旧版本测试时残留的 Markdown 引用文本,防止摘要里套娃
plain = plain.replace(/^>\s*(?:💬\s*)?\*\*(.*?)\*\*\s*[:]\s*/gm, '').trim()
return plain.length > length ? plain.substring(0, length) + "..." : plain return plain.length > length ? plain.substring(0, length) + "..." : plain
} }
const renderContent = (content: string) => { const renderContent = (content: string) => {
if (!content) return "<span class='opacity-50'>(空)</span>" if (!content) return "<span class='opacity-50'>(空)</span>"
return content let parsed = content
.replace(/<script[^>]*>[\s\S]*?<\/script>/gi, "") .replace(/<script[^>]*>[\s\S]*?<\/script>/gi, "")
.replace(/<iframe[^>]*>[\s\S]*?<\/iframe>/gi, "") .replace(/<iframe[^>]*>[\s\S]*?<\/iframe>/gi, "")
.replace(/\n/g, "<br/>")
// 清理之前测试时已经存入数据库的历史遗留 "> 💬 @某人 :" 文本
parsed = parsed.replace(/^>\s*(?:💬\s*)?\*\*(.*?)\*\*\s*[:]\s*/gm, "")
return parsed.replace(/\n/g, "<br/>")
} }
const resetFilters = () => { filterStatus.value = ""; filterSentiment.value = ""; filterKeyword.value = ""; page.value = 1; fetchReplies() } const resetFilters = () => { filterStatus.value = ""; filterSentiment.value = ""; filterKeyword.value = ""; page.value = 1; fetchReplies() }