Add curated env config UI with Chinese labels and deploy secret bootstrap
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user