Add global autofill guard for hub, env, and transfer inputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-20 10:18:56 +08:00
parent 00d76ba20f
commit 4a3e6a2a1d
15 changed files with 221 additions and 38 deletions
+10 -9
View File
@@ -3,6 +3,7 @@
<head>
<meta charset="utf-8" />
<script src="/assets/theme.js?v=20260604-hub-inst-theme"></script>
<script src="/assets/autofill_guard.js?v=1"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content" />
<meta name="theme-color" content="#0b0e18" />
<meta name="apple-mobile-web-app-title" content="中控" />
@@ -113,15 +114,15 @@
</label>
<label class="plan-field">
<span>目标位</span>
<input id="plan-create-target" type="text" placeholder="如 68500" />
<input id="plan-create-target" type="text" placeholder="如 68500" autocomplete="off" data-lpignore="true" data-1p-ignore="true" data-form-type="other" />
</label>
<label class="plan-field">
<span>当前区间</span>
<input id="plan-create-range" type="text" placeholder="如 67000-68000" />
<input id="plan-create-range" type="text" placeholder="如 67000-68000" autocomplete="off" data-lpignore="true" data-1p-ignore="true" data-form-type="other" />
</label>
<label class="plan-field plan-field-full">
<span>备注</span>
<textarea id="plan-create-note" rows="2" placeholder="计划说明…"></textarea>
<textarea id="plan-create-note" rows="2" placeholder="计划说明…" autocomplete="off" data-lpignore="true" data-1p-ignore="true" data-form-type="other"></textarea>
</label>
</div>
<button type="submit" class="primary plan-submit-btn">保存并进入进行中</button>
@@ -1077,10 +1078,10 @@
</div>
<p class="settings-display-hint">修改中控网页登录账号密码,写入 <code>manual_trading_hub/.env</code> 后需重启中控生效.当前用户:<code id="hub-pwd-current-user"></code></p>
<div class="settings-grid hub-password-grid">
<div class="field"><label>当前密码</label><input type="password" id="hub-pwd-old" autocomplete="current-password"></div>
<div class="field"><label>新用户名(可选)</label><input type="text" id="hub-pwd-new-username" autocomplete="username"></div>
<div class="field"><label>新密码</label><input type="password" id="hub-pwd-new" autocomplete="new-password"></div>
<div class="field"><label>确认新密码</label><input type="password" id="hub-pwd-confirm" autocomplete="new-password"></div>
<div class="field" data-password-settings="1"><label>当前密码</label><input type="password" id="hub-pwd-old" autocomplete="current-password"></div>
<div class="field" data-password-settings="1"><label>新用户名(可选)</label><input type="text" id="hub-pwd-new-username" autocomplete="username"></div>
<div class="field" data-password-settings="1"><label>新密码</label><input type="password" id="hub-pwd-new" autocomplete="new-password"></div>
<div class="field" data-password-settings="1"><label>确认新密码</label><input type="password" id="hub-pwd-confirm" autocomplete="new-password"></div>
</div>
<div class="hub-settings-tab-actions">
<button type="button" class="primary" id="hub-pwd-save-btn">保存密码</button>
@@ -1378,7 +1379,7 @@
<script src="https://unpkg.com/lightweight-charts@4.2.0/dist/lightweight-charts.standalone.production.js"></script>
<script src="/assets/chart_draw.js?v=20260609-market-day-split"></script>
<script src="/assets/chart.js?v=20260715-fs-landscape"></script>
<script src="/assets/plan.js?v=20260614-plan-refresh"></script>
<script src="/assets/plan.js?v=20260720-autofill"></script>
<script src="/assets/calculator.js?v=20260715-calc-tabs"></script>
<script src="/assets/trade_stats_calendar.js?v=3"></script>
<script src="/assets/archive.js?v=20260717-archive-cal-chart"></script>
@@ -1393,6 +1394,6 @@
<script src="/assets/options_expiry_countdown.js?v=1"></script>
<script src="/assets/options_position_cards.js?v=2"></script>
<script src="/assets/backup.js?v=1"></script>
<script src="/assets/app.js?v=20260717-quotes-feed"></script>
<script src="/assets/app.js?v=20260720-autofill"></script>
</body>
</html>