diff --git a/app/templates/dashboard.html b/app/templates/dashboard.html
index 41d7e8f..23c5a79 100644
--- a/app/templates/dashboard.html
+++ b/app/templates/dashboard.html
@@ -58,7 +58,7 @@
{{ t.time_fmt }} |
{{ t.machine_name or '—' }} |
{{ t.symbol }} |
- {{ t.side }} |
+ {% if t.side=='buy' %}买入{% elif t.side=='sell' %}卖出{% else %}{{ t.side }}{% endif %} |
{{ t.volume if t.volume is not none else '—' }} |
{% if t.profit is none %}—{% else %}{{ '%.2f'|format(t.profit) }}{% endif %}
@@ -143,11 +143,12 @@
}
body.innerHTML = list.map(function (t) {
var sideCls = t.side === 'buy' ? 'green' : 'red';
+ var sideCn = t.side === 'buy' ? '买入' : (t.side === 'sell' ? '卖出' : (t.side || '—'));
return ' | ' +
'| ' + esc(t.time_fmt) + ' | ' +
'' + esc(t.machine_name || '—') + ' | ' +
'' + esc(t.symbol) + ' | ' +
- '' + esc(t.side) + ' | ' +
+ '' + esc(sideCn) + ' | ' +
'' + esc(t.volume != null ? t.volume : '—') + ' | ' +
'' +
(t.profit == null || t.profit === '' ? '—' : Number(t.profit).toFixed(2)) +
|