3x-ui/frontend/src/components
MHSanaei ce4c42e09c
feat(json): swap raw textareas for a CodeMirror 6 JsonEditor
A new JsonEditor.vue component wraps CodeMirror 6 + lang-json with
line numbers, JSON syntax highlighting, bracket matching, code
folding, search (Ctrl+F), undo/redo, lint (red squiggle and gutter
icon on invalid JSON), tab indent, and line wrapping. It is wired
into the four raw-JSON spots that previously used <a-textarea
class="json-editor">: the Xray Advanced Template tab, the Outbound
JSON tab, the Balancer Observatory pane, and the Inbound Advanced
tab (settings / streamSettings / sniffing).

Chrome colors are driven by EditorView.theme so they win the
specificity fight cleanly against CodeMirror's own injected styles.
A single buildDarkTheme() factory yields a Dark+ palette (#1e1e1e
background, #252526 active line, #2d2d30 panels) for the regular
dark mode and a near-black variant (#0a0a0a / #141414 / #1f1f1f
border) for ultra-dark — both pair with oneDarkHighlightStyle for
the syntax colors. Light mode stays on basicSetup's default.

CodeMirror lazy-loads as a ~17 kB gzipped chunk that only appears
on the Xray/Inbounds bundles.
2026-05-14 00:02:59 +02:00
..
AppSidebar.vue Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
CustomStatistic.vue feat(xray/dns): align DNS settings with Xray docs + UI polish 2026-05-10 17:03:11 +02:00
DateTimePicker.vue feat(frontend): refresh dark theme + redesign login page 2026-05-11 01:10:05 +02:00
FinalMaskForm.vue feat(xray/dns): align DNS settings with Xray docs + UI polish 2026-05-10 17:03:11 +02:00
InfinityIcon.vue feat(xray/dns): align DNS settings with Xray docs + UI polish 2026-05-10 17:03:11 +02:00
JsonEditor.vue feat(json): swap raw textareas for a CodeMirror 6 JsonEditor 2026-05-14 00:02:59 +02:00
PromptModal.vue feat(xray/dns): align DNS settings with Xray docs + UI polish 2026-05-10 17:03:11 +02:00
SettingListItem.vue feat(xray/dns): align DNS settings with Xray docs + UI polish 2026-05-10 17:03:11 +02:00
Sparkline.vue fix(graphs): increase y-axis paddingLeft from 32 to 56 to prevent clipped labels (#4309) 2026-05-13 01:47:54 +02:00
TableSortable.vue feat(xray/dns): align DNS settings with Xray docs + UI polish 2026-05-10 17:03:11 +02:00
TextModal.vue feat(xray/dns): align DNS settings with Xray docs + UI polish 2026-05-10 17:03:11 +02:00