Turn position/margin/sizing/direction env fields into dropdown selects.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 19:41:47 +08:00
parent 53e55aa4b4
commit aabbbef0a9
5 changed files with 150 additions and 10 deletions
@@ -47,6 +47,13 @@
<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 == 'select' and field.options %}
{% set cur = (field.current or field.default or '') %}
<select class="env-field-input" id="env-f-{{ field.key }}" data-env-key="{{ field.key }}">
{% for opt in field.options %}
<option value="{{ opt.value }}"{% if cur == opt.value %} selected{% endif %}>{{ opt.label }}</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>