Json editor with syntax highlighting (#8932)

* Add json editor

* Replace JsonEditor with TextBox

* Replace JsonEditor with TextBox

* Remove TextMateSharp.Grammars

* Fix two way bind

* Update ResUI.ru.resx

---------

Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
This commit is contained in:
DHR60
2026-03-20 08:32:02 +00:00
committed by GitHub
parent 0cec5986cd
commit dd94199bbb
14 changed files with 256 additions and 47 deletions
@@ -3,6 +3,7 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:v2rayN.Desktop.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
@@ -399,12 +400,7 @@
BorderBrush="Gray"
BorderThickness="1"
Header="HTTP/SOCKS">
<TextBox
Name="txtnormalDNSCompatible"
VerticalAlignment="Stretch"
Classes="TextArea"
MinLines="10"
TextWrapping="Wrap" />
<local:JsonEditor Name="txtnormalDNSCompatible" VerticalAlignment="Stretch" />
</HeaderedContentControl>
</DockPanel>
</TabItem>
@@ -473,12 +469,7 @@
BorderBrush="Gray"
BorderThickness="1"
Header="HTTP/SOCKS">
<TextBox
Name="txtnormalDNS2Compatible"
VerticalAlignment="Stretch"
Classes="TextArea"
MinLines="10"
TextWrapping="Wrap" />
<local:JsonEditor Name="txtnormalDNS2Compatible" VerticalAlignment="Stretch" />
</HeaderedContentControl>
<GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" />
@@ -488,12 +479,7 @@
BorderBrush="Gray"
BorderThickness="1"
Header="{x:Static resx:ResUI.TbSettingsTunMode}">
<TextBox
Name="txttunDNS2Compatible"
VerticalAlignment="Stretch"
Classes="TextArea"
MinLines="10"
TextWrapping="Wrap" />
<local:JsonEditor Name="txttunDNS2Compatible" VerticalAlignment="Stretch" />
</HeaderedContentControl>
</Grid>