v1.2.0: 数据源完整编辑(模态框所有配置可改) + 定制监控类型(无权重,推送标准由大模型判断推送)
This commit is contained in:
+5
-1
@@ -53,11 +53,15 @@ def _score_color(score):
|
||||
|
||||
def _card(art):
|
||||
ents = "、".join(art.get("entities") or [])
|
||||
src = db.get_source(art.get("source_id") or 0) if art.get("source_id") else None
|
||||
custom = bool(src and src.get("kind") == "custom")
|
||||
badge = ('<span style="background:#ede9fe;color:#6d28d9;padding:2px 8px;'
|
||||
'border-radius:6px;font-size:11px;margin-right:6px;">🎯 定制监控命中</span>') if custom else ""
|
||||
return f"""
|
||||
<div style="border:1px solid #e5e7eb;border-left:4px solid {_score_color(art.get('total_score',0))};
|
||||
border-radius:6px;padding:10px 14px;margin:8px 0;">
|
||||
<div style="font-size:14px;font-weight:bold;color:#1f2937;">
|
||||
<a href="{art.get('url','#')}" style="color:#1f2937;text-decoration:none;">{art['title']}</a>
|
||||
{badge}<a href="{art.get('url','#')}" style="color:#1f2937;text-decoration:none;">{art['title']}</a>
|
||||
</div>
|
||||
<div style="font-size:12px;color:#6b7280;margin:4px 0;">
|
||||
综合分 {art.get('total_score',0)} · 相关度 {art.get('relevance',0)} ·
|
||||
|
||||
Reference in New Issue
Block a user