Fix Jinja conflict: rename display meta items to entries
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user