Fix Jinja conflict: rename display meta items to entries

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 20:38:52 +08:00
parent 68e03ccd97
commit 0b91d26f71
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -98,7 +98,7 @@
section.appendChild(title);
const grid = document.createElement("div");
grid.className = "display-prefs-checks";
(group.items || []).forEach((item) => {
(group.entries || []).forEach((item) => {
const label = document.createElement("label");
label.className = "chk-label";
const cb = document.createElement("input");
+2 -2
View File
@@ -113,6 +113,6 @@ def display_meta_for_ui() -> list[dict[str, Any]]:
"show_settings_options_transfer",
]
return [
{"group": "顶栏导航", "items": [{"key": k, "label": DISPLAY_LABELS[k]} for k in nav_keys]},
{"group": "系统设置区块", "items": [{"key": k, "label": DISPLAY_LABELS[k]} for k in settings_keys]},
{"group": "顶栏导航", "entries": [{"key": k, "label": DISPLAY_LABELS[k]} for k in nav_keys]},
{"group": "系统设置区块", "entries": [{"key": k, "label": DISPLAY_LABELS[k]} for k in settings_keys]},
]
@@ -8,7 +8,7 @@
<div class="display-prefs-group">
<h3 class="settings-subcard-title">{{ group.group }}</h3>
<div class="display-prefs-checks">
{% for item in group.items %}
{% for item in group.entries %}
<label class="chk-label">
<input type="checkbox" data-pref-key="{{ item.key }}"{% if display.get(item.key, true) %} checked{% endif %}>
{{ item.label }}
+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=4"></script>
<script src="/static/instance_settings_prefs.js?v=5"></script>
<script src="/static/instance_live.js?v=4"></script>
<script src="/static/instance_embed.js?v=19"></script>
</body>
+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=4"></script>
<script src="/static/instance_settings_prefs.js?v=5"></script>
</body>
</html>