feat: 彻底重构后台 UI 与对话上下文引用模块,全面优化移动端适配 (v1.0.4) #6
+1
-1
@@ -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()
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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() }
|
||||||
|
|||||||
Reference in New Issue
Block a user