fix: render POSITION_SIZING_MODE as select in env SSR template.

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 19:12:48 +08:00
parent 2e049dbbd9
commit b7966fd935
@@ -47,6 +47,15 @@
<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>
{% elif field.type == 'enum' and field.options %}
<select class="env-field-input" id="env-f-{{ field.key }}" data-env-key="{{ field.key }}">
{% set cur = field.current or field.default or '' %}
{% for opt in field.options %}
{% set ov = opt.value if opt is mapping else opt %}
{% set ol = (opt.label if opt is mapping else opt) %}
<option value="{{ ov }}"{% if cur == ov %} selected{% endif %}>{{ ol }}</option>
{% endfor %}
</select>
{% elif field.sensitive %}
{% if field.has_value %}
<div class="env-sensitive-current muted">已配置 <span class="env-masked-value">{{ field.masked }}</span></div>
@@ -56,6 +65,8 @@
id="env-f-{{ field.key }}"
type="password"
data-env-key="{{ field.key }}"
data-env-sensitive="1"
data-env-dirty="0"
placeholder="{% if field.has_value %}修改时填写新值,留空不修改{% else %}请输入{% endif %}"
autocomplete="off"
>
@@ -66,6 +77,7 @@
type="text"
data-env-key="{{ field.key }}"
value="{{ field.current or field.default or '' }}"
autocomplete="off"
>
{% endif %}
</div>