Normalize fullwidth punctuation to ASCII across codebase.
Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* 内照明心:复盘语录 + 当日交易记录 + 按需 K 线。
|
||||
* 内照明心:复盘语录 + 当日交易记录 + 按需 K 线.
|
||||
*/
|
||||
(function () {
|
||||
const page = document.getElementById("page-archive");
|
||||
@@ -597,7 +597,7 @@
|
||||
|
||||
function quotePreview(text) {
|
||||
const s = String(text || "").replace(/\s+/g, " ").trim();
|
||||
if (!s) return "(空)";
|
||||
if (!s) return "(空)";
|
||||
return s.length > 36 ? s.slice(0, 36) + "…" : s;
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@
|
||||
elQuotesCount.textContent = quotes.length ? quotes.length + " 条" : "";
|
||||
}
|
||||
if (!quotes.length) {
|
||||
elQuotesList.innerHTML = '<p class="archive-empty">暂无复盘语录,可在上方添加。</p>';
|
||||
elQuotesList.innerHTML = '<p class="archive-empty">暂无复盘语录,可在上方添加.</p>';
|
||||
return;
|
||||
}
|
||||
elQuotesList.innerHTML = quotes
|
||||
@@ -675,7 +675,7 @@
|
||||
(selected
|
||||
? '<div class="archive-quote-detail">' +
|
||||
'<div class="archive-quote-full">' +
|
||||
esc(q.content || "(空)") +
|
||||
esc(q.content || "(空)") +
|
||||
"</div>" +
|
||||
'<div class="archive-quote-actions">' +
|
||||
'<button type="button" class="ghost archive-quote-edit-btn" data-id="' +
|
||||
@@ -778,7 +778,7 @@
|
||||
const q = findQuote(quoteId);
|
||||
const content = q && String(q.content || "").trim();
|
||||
if (!q || !content) {
|
||||
setStatus("语录内容为空,无法发起 AI 对话");
|
||||
setStatus("语录内容为空,无法发起 AI 对话");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -801,7 +801,7 @@
|
||||
}
|
||||
|
||||
async function deleteQuote(id) {
|
||||
if (!id || !window.confirm("确定删除这条复盘语录?")) return;
|
||||
if (!id || !window.confirm("确定删除这条复盘语录?")) return;
|
||||
const r = await apiFetch("/api/archive/quotes/" + id, { method: "DELETE" });
|
||||
if (!r.ok) {
|
||||
const j = await r.json().catch(function () {
|
||||
@@ -1170,7 +1170,7 @@
|
||||
const exKey = String(tr.exchange_key || "").toLowerCase();
|
||||
const sym = tr.symbol || "";
|
||||
if (!exKey || !sym) {
|
||||
setStatus("该笔交易缺少交易所或合约,无法切换");
|
||||
setStatus("该笔交易缺少交易所或合约,无法切换");
|
||||
return;
|
||||
}
|
||||
const key = tradeRowKey(tr);
|
||||
@@ -1206,7 +1206,7 @@
|
||||
const exKey = String(tr.exchange_key || "").toLowerCase();
|
||||
const sym = tr.symbol || "";
|
||||
if (!exKey || !sym) {
|
||||
setStatus("该笔交易缺少交易所或合约,无法加载图表");
|
||||
setStatus("该笔交易缺少交易所或合约,无法加载图表");
|
||||
return;
|
||||
}
|
||||
setChartOpen(true);
|
||||
@@ -1217,7 +1217,7 @@
|
||||
if (!elTrades) return;
|
||||
if (!dailyTrades.length) {
|
||||
elTrades.innerHTML =
|
||||
'<p class="archive-empty">该日暂无交易记录。可调整日期或点击「同步」拉取数据。</p>';
|
||||
'<p class="archive-empty">该日暂无交易记录.可调整日期或点击「同步」拉取数据.</p>';
|
||||
return;
|
||||
}
|
||||
elTrades.innerHTML =
|
||||
@@ -1390,7 +1390,7 @@
|
||||
async function deleteTrade(tradeId, exchangeKey) {
|
||||
const exKey = exchangeKey || (selected && selected.exchange_key);
|
||||
if (!exKey || tradeId == null) return;
|
||||
if (!window.confirm("从档案移除该笔交易?(不影响交易所实例里的复盘记录)")) return;
|
||||
if (!window.confirm("从档案移除该笔交易?(不影响交易所实例里的复盘记录)")) return;
|
||||
const r = await apiFetch("/api/archive/trade/" + exKey + "/" + tradeId, { method: "DELETE" });
|
||||
if (!r.ok) {
|
||||
const j = await r.json().catch(function () {
|
||||
@@ -1510,7 +1510,7 @@
|
||||
}
|
||||
|
||||
async function syncAll() {
|
||||
setStatus("同步中(可能需数分钟)…");
|
||||
setStatus("同步中(可能需数分钟)…");
|
||||
if (elBtnSync) elBtnSync.disabled = true;
|
||||
try {
|
||||
const r = await apiFetch("/api/archive/sync", { method: "POST" });
|
||||
|
||||
Reference in New Issue
Block a user