From 8dbc7c4ab25145b67e58ce9df5434887f948856a Mon Sep 17 00:00:00 2001 From: Mavis Date: Tue, 9 Jun 2026 14:38:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20ArticleDetail=20=E4=B8=89=E6=AE=B5?= =?UTF-8?q?=E5=BC=8F(=E8=AF=84=E8=AE=BA/=E8=AF=91=E6=96=87/=E5=8E=9F?= =?UTF-8?q?=E6=96=87)=20+=20LLM=20=E5=B1=8F=E8=94=BD=E8=AF=8D=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20+=20.diary-para=20=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - types: Source / LlmSetting 加 blocklist_tags 字段 - AdminLlmSettings: - 新增 '全局屏蔽分类(命中即删文章)' 卡片(逗号/换行分隔,双向绑 blocklist_tags) - 分类 prompt 提示加 {blocklist} / drop 字段说明 - ArticleDetail 三段式: - 顶部:评论(LLM 点评) - 中部:文章译文(优先 LLM 排版版 / fallback 原始译文) - 底部:文章原文 - AI 插图挂在译文卡片下作附属 - style.css: .diary-para 兜底规则(margin 0 0 1.5em 0 / line-height 1.7 / color #3e3e3e) --- frontend/src/api/articles.ts | 4 +++ frontend/src/style.css | 13 ++++++++ frontend/src/views/AdminLlmSettings.vue | 37 +++++++++++++++++++-- frontend/src/views/ArticleDetail.vue | 43 ++++++++++++++----------- 4 files changed, 76 insertions(+), 21 deletions(-) diff --git a/frontend/src/api/articles.ts b/frontend/src/api/articles.ts index 47a35f9..c5085aa 100644 --- a/frontend/src/api/articles.ts +++ b/frontend/src/api/articles.ts @@ -15,6 +15,8 @@ export interface Source { last_fetched_at?: string | null last_status?: string | null consecutive_failures: number + // 源级屏蔽分类标签;与 llm_settings.blocklist_tags 合并后注入 classify prompt + blocklist_tags?: string[] } export interface ArticleListItem { @@ -71,6 +73,8 @@ export interface LlmSetting { image_model: string interval_sec: number enabled: boolean + // 全局屏蔽分类标签;与 sources.blocklist_tags 合并后注入 classify prompt + blocklist_tags?: string[] updated_at?: string | null } diff --git a/frontend/src/style.css b/frontend/src/style.css index 9a50048..548b72f 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -45,3 +45,16 @@ img { max-width: 100%; } .article-body p:last-child { margin-bottom: 0; } + +/* === 排版段落(.diary-para)兜底规则 === + * 后端 enrichment._wrap_article_body 会内联 style 到

; + * 这里做兜底,保证 v-html 渲染时一定有合理的行距和段距。 + */ +.diary-para { + margin: 0 0 1.5em 0; + line-height: 1.7; + color: #3e3e3e; +} +.diary-para:last-child { + margin-bottom: 0; +} diff --git a/frontend/src/views/AdminLlmSettings.vue b/frontend/src/views/AdminLlmSettings.vue index 9520f22..31623c8 100644 --- a/frontend/src/views/AdminLlmSettings.vue +++ b/frontend/src/views/AdminLlmSettings.vue @@ -1,5 +1,5 @@