Add curated env config UI with Chinese labels and deploy secret bootstrap

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 21:03:00 +08:00
parent 0b91d26f71
commit 0d2ce9c126
11 changed files with 767 additions and 23 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ const ORDER_ENTRY_MODEL_CODE_TO_CATEGORY = {{ entry_model_code_to_category | toj
<script>
window.__INSTANCE_DISPLAY__ = {{ display | tojson }};
</script>
<script src="/static/instance_settings_prefs.js?v=5"></script>
<script src="/static/instance_settings_prefs.js?v=6"></script>
<script src="/static/instance_live.js?v=4"></script>
<script src="/static/instance_embed.js?v=19"></script>
</body>
+5 -5
View File
@@ -1,8 +1,8 @@
{# env配置:按功能分组,三列卡片布局(SSR 预渲染) #}
{# env配置:白名单分组,仅中文标签 #}
<div class="env-config-page">
<div class="env-config-head card">
<h2>env 配置</h2>
<p class="settings-env-hint">读取并编辑本实例 <code>.env</code>。标注「保存即生效」的项会立即应用;标注「需重启」的项保存后请点「保存并重启」。</p>
<p class="settings-env-hint">仅展示运营相关配置。标注「保存即生效」的项会立即应用;标注「需重启」的项保存后请点「保存并重启」。完整说明见项目文档 <code>docs/env配置说明.md</code></p>
<div class="env-config-toolbar">
<button type="button" class="btn-primary btn-sm" id="env-config-save">保存</button>
<button type="button" class="btn-secondary btn-sm" id="env-config-save-restart">保存并重启</button>
@@ -18,15 +18,15 @@
<div class="env-group-fields">
{% for field in group.fields %}
<div class="env-field-card">
<label class="env-field-label">{{ field.key }}</label>
<label class="env-field-label">{{ field.label or field.key }}</label>
{% if field.note %}
<div class="env-field-note muted">{{ field.note }}</div>
{% endif %}
{% if field.type == 'bool' %}
<select class="env-field-input" data-env-key="{{ field.key }}">
{% set cur = (field.current or field.default or 'false')|lower %}
<option value="true"{% if cur in ('true', '1', 'yes', 'on') %} selected{% endif %}>true</option>
<option value="false"{% if cur not in ('true', '1', 'yes', 'on') %} selected{% endif %}>false</option>
<option value="true"{% if cur in ('true', '1', 'yes', 'on') %} selected{% endif %}>开启</option>
<option value="false"{% if cur not in ('true', '1', 'yes', 'on') %} selected{% endif %}>关闭</option>
</select>
{% else %}
<input
+1 -1
View File
@@ -2038,6 +2038,6 @@ setInterval(refreshPriceSnapshotConditional, {{ price_refresh_seconds * 1000 }})
<script>
window.__INSTANCE_DISPLAY__ = {{ display | tojson }};
</script>
<script src="/static/instance_settings_prefs.js?v=5"></script>
<script src="/static/instance_settings_prefs.js?v=6"></script>
</body>
</html>
@@ -1,5 +1,6 @@
{# 系统设置:2 列独立卡片 #}
<div class="settings-page settings-page--grid">
<p class="settings-env-hint muted" style="margin:0 0 10px">各区块说明见 <code>docs/系统设置说明.md</code></p>
<div class="settings-grid-2col">
<div class="settings-grid-cell">
{% include 'display_prefs_panel.html' %}