fix(ui): 补齐 generator.html 和 listmanager.html 的问号剥离兜底

- generator.html: 新增 ds() 钩子,在 renderList / batch 预览 / showToast 三个渲染点统一问号剥离
- listmanager.html: 新增 ds() 钩子,在 renderList / renderSequence / 自定义 select 选项 / showToast 四个点统一问号剥离
- APP_VERSION_TEXT bump 到 v1.0.107
This commit is contained in:
2026-08-17 17:32:01 +08:00
parent 4c049050ce
commit 5e466f4553
11 changed files with 438 additions and 53 deletions
+19 -6
View File
@@ -725,6 +725,14 @@
<div class="toast-container" id="toast-container"></div>
<script>
function ds(x) {
let v = String(x == null ? '' : x)
.replace(/[?¿?]+/g, '')
.replace(/\s+/g, ' ')
.trim();
return v === '' ? '-' : v;
}
const TTS_MODEL = "s2.1-pro-free";
const ZH_REFERENCE_ID = "0aee9f0f5683480d987c9e3c5d2de04c";
const JA_REFERENCE_ID = "38985e545cff41b79c11c32b0196c9a0";
@@ -826,8 +834,8 @@
toast.className = 'toast';
toast.innerHTML = `
<div>
<div style="font-weight:600; font-size:0.9rem; margin-bottom:2px">${title}</div>
<div style="font-size:0.8rem; color:var(--text-muted)">${message}</div>
<div style="font-weight:600; font-size:0.9rem; margin-bottom:2px">${ds(title)}</div>
<div style="font-size:0.8rem; color:var(--text-muted)">${ds(message)}</div>
</div>
`;
container.appendChild(toast);
@@ -940,11 +948,15 @@
item.style.alignItems = 'stretch';
item.style.gap = '8px';
const dsCode = ds(task.code);
const dsZh = ds(task.zh || '');
const dsJa = ds(task.en || '');
item.innerHTML = `
<div style="display:flex; justify-content:space-between; align-items:flex-start;">
<div style="display:flex; flex-direction:column; gap:2px;">
<span style="font-weight:600; color:var(--accent)">${task.code}</span>
<span class="edit-file-name" style="color:var(--text-muted)">ZH: ${task.zh} | JA: ${task.en}</span>
<span style="font-weight:600; color:var(--accent)">${dsCode}</span>
<span class="edit-file-name" style="color:var(--text-muted)">ZH: ${dsZh} | JA: ${dsJa}</span>
</div>
<span id="batch-status-span-${index}" style="font-size:0.8rem; color:var(--text-muted)">Pending</span>
</div>
@@ -1306,10 +1318,11 @@
div.className = 'list-item';
div.style.gridTemplateColumns = '100px 1fr auto';
const tagsHtml = item.files.map(f => `<span style="background:var(--bg-hover); padding:2px 6px; border-radius:4px; font-size:0.8rem; margin-right:4px;">${f}</span>`).join('');
const dsCode = ds(item.code);
const tagsHtml = (item.files || []).map(f => `<span style="background:var(--bg-hover); padding:2px 6px; border-radius:4px; font-size:0.8rem; margin-right:4px;">${ds(f)}</span>`).join('');
div.innerHTML = `
<div style="font-family:var(--font-mono); font-weight:600;">${item.code}</div>
<div style="font-family:var(--font-mono); font-weight:600;">${dsCode}</div>
<div>${tagsHtml || '<span style="color:var(--text-muted);font-style:italic">No files</span>'}</div>
<div style="display:flex; gap:8px;">
<button class="btn-icon" onclick="openEditModal(${index})">${ICONS.edit}</button>