fix: adapt frontend for legacy Chrome and runtime config
This commit is contained in:
1 parent
db2f21191c
commit
388a9133fc
84 files changed
+1186
-528
No files matched your search
@@ -406,8 +406,8 @@ export function stripFlowFence(text: string, streaming: boolean): string {
|
||||
const tail = close >= 0 ? after.slice(close + 3) : "";
|
||||
const placeholder =
|
||||
close < 0 && streaming
|
||||
? "\n\n> 📊 正在输出结构化流程数据,流程图画布同步绘制中…"
|
||||
: "\n\n> 📊 已生成结构化流程数据,可在右侧「流程图」画布查看(点击节点看详情)。";
|
||||
? "\n\n> 正在输出结构化流程数据,流程图画布同步绘制中…"
|
||||
: "\n\n> 已生成结构化流程数据,可在右侧「流程图」画布查看(点击节点看详情)。";
|
||||
return `${text.slice(0, start).trimEnd()}${placeholder}${tail}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,8 +138,8 @@ export function stripReportFence(text: string, streaming: boolean): string {
|
||||
// ── 解析(容错:取最后一个 report-json 代码块;缺字段给安全默认) ─────────────────
|
||||
|
||||
const FENCE = "```report-json";
|
||||
const STREAM_MSG = "\n\n> 📊 正在输出大屏结构化数据,右侧沙箱稍后自动渲染…";
|
||||
const DONE_MSG = "\n\n> 📊 已生成大屏数据,右侧沙箱已渲染预览(可继续输入修改要求调整)。";
|
||||
const STREAM_MSG = "\n\n> 正在输出大屏结构化数据,右侧沙箱稍后自动渲染…";
|
||||
const DONE_MSG = "\n\n> 已生成大屏数据,右侧沙箱已渲染预览(可继续输入修改要求调整)。";
|
||||
|
||||
/** 文本是否像本契约 JSON(含关键键),避免把无关 {} 误当数据。 */
|
||||
function looksLikeReportJson(s: string): boolean {
|
||||
@@ -753,7 +753,7 @@ export function renderDashboardHtml(
|
||||
const allActive = seatBase ? `${ovBase},${seatBase}` : ovBase;
|
||||
const navActiveCss = `${allActive}{background:var(--navactive);color:var(--primary);box-shadow:0 1px 5px rgba(15,23,42,.1);font-weight:700;border-color:${P.primary}33}`;
|
||||
|
||||
const KPI_ICONS = ["📊", "📈", "⚠️", "🧩", "🏆", "📅"];
|
||||
const KPI_ICONS = ["数", "趋", "险", "组", "优", "期"];
|
||||
const kpis = data.kpis
|
||||
.map((k, i) => {
|
||||
const ac = P.accents[i % P.accents.length];
|
||||
@@ -787,7 +787,7 @@ export function renderDashboardHtml(
|
||||
|
||||
const console = data.charts.length
|
||||
? `<section class="console">
|
||||
<div class="chead"><h2 class="sec">📊 数据研判中心</h2><span class="status">STATUS: REAL-TIME CONSOLE</span></div>
|
||||
<div class="chead"><h2 class="sec">数据研判中心</h2><span class="status">STATUS: REAL-TIME CONSOLE</span></div>
|
||||
<div class="charts3">${data.charts.map(chartHtml).join("")}</div>
|
||||
</section>`
|
||||
: "";
|
||||
@@ -799,7 +799,7 @@ export function renderDashboardHtml(
|
||||
<a class="more" href="#consensus-modal">查看研讨详情 →</a>
|
||||
</div>
|
||||
${console}
|
||||
<h2 class="sec">📋 席位交付总览 <small>点击卡片进入对应席位专页</small></h2>
|
||||
<h2 class="sec">席位交付总览 <small>点击卡片进入对应席位专页</small></h2>
|
||||
<div class="seats">${seatCards}</div>
|
||||
${timeline}
|
||||
</section>`;
|
||||
@@ -955,7 +955,7 @@ body:has(.page:target) #overview:not(:target){display:none}
|
||||
.fill{height:100%;border-radius:99px}
|
||||
.chips{display:flex;flex-direction:column;gap:6px;margin-top:12px;padding-top:11px;border-top:1px solid var(--line)}
|
||||
.chip{font-size:10px;padding:3px 8px;border-radius:4px;border-left:2px solid;display:flex;align-items:center;gap:5px}
|
||||
.chip::before{content:"⚠";font-size:9px}
|
||||
.chip::before{content:"!";font-size:9px}
|
||||
.tl{margin-top:2px}
|
||||
.tl ol{list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:11px}
|
||||
.tl li{position:relative;padding:12px 14px;border:1px solid var(--line);border-left:3px solid var(--primary);background:var(--track);border-radius:0 5px 5px 0}
|
||||
|
||||
Reference in new issue
Block a user