Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c669e72189 | ||
|
|
46db5efef3 | ||
|
|
610418b42b | ||
|
|
508eb24fc3 |
@@ -1,7 +1,7 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>7.13.6</Version>
|
<Version>7.13.7</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.2" />
|
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.3" />
|
||||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.2" />
|
<PackageVersion Include="Avalonia.Desktop" Version="11.3.3" />
|
||||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.2" />
|
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.3" />
|
||||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.3.2" />
|
<PackageVersion Include="Avalonia.ReactiveUI" Version="11.3.3" />
|
||||||
<PackageVersion Include="CliWrap" Version="3.9.0" />
|
<PackageVersion Include="CliWrap" Version="3.9.0" />
|
||||||
<PackageVersion Include="Downloader" Version="4.0.2" />
|
<PackageVersion Include="Downloader" Version="4.0.2" />
|
||||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.0" />
|
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.0" />
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public class CoreHandler
|
|||||||
Environment.SetEnvironmentVariable(Global.V2RayLocalAsset, Utils.GetBinPath(""), EnvironmentVariableTarget.Process);
|
Environment.SetEnvironmentVariable(Global.V2RayLocalAsset, Utils.GetBinPath(""), EnvironmentVariableTarget.Process);
|
||||||
Environment.SetEnvironmentVariable(Global.XrayLocalAsset, Utils.GetBinPath(""), EnvironmentVariableTarget.Process);
|
Environment.SetEnvironmentVariable(Global.XrayLocalAsset, Utils.GetBinPath(""), EnvironmentVariableTarget.Process);
|
||||||
Environment.SetEnvironmentVariable(Global.XrayLocalCert, Utils.GetBinPath(""), EnvironmentVariableTarget.Process);
|
Environment.SetEnvironmentVariable(Global.XrayLocalCert, Utils.GetBinPath(""), EnvironmentVariableTarget.Process);
|
||||||
|
// TODO Temporary addition to support proper use of sing-box v1.12
|
||||||
|
Environment.SetEnvironmentVariable("ENABLE_DEPRECATED_SPECIAL_OUTBOUNDS", "true", EnvironmentVariableTarget.Process);
|
||||||
|
|
||||||
//Copy the bin folder to the storage location (for init)
|
//Copy the bin folder to the storage location (for init)
|
||||||
if (Environment.GetEnvironmentVariable(Global.LocalAppData) == "1")
|
if (Environment.GetEnvironmentVariable(Global.LocalAppData) == "1")
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ public class ThemeSettingViewModel : MyReactiveObject
|
|||||||
x.OfType<Button>(),
|
x.OfType<Button>(),
|
||||||
x.OfType<TextBox>(),
|
x.OfType<TextBox>(),
|
||||||
x.OfType<TextBlock>(),
|
x.OfType<TextBlock>(),
|
||||||
|
x.OfType<SelectableTextBlock>(),
|
||||||
x.OfType<Menu>(),
|
x.OfType<Menu>(),
|
||||||
x.OfType<ContextMenu>(),
|
x.OfType<ContextMenu>(),
|
||||||
x.OfType<DataGridRow>(),
|
x.OfType<DataGridRow>(),
|
||||||
@@ -146,6 +147,7 @@ public class ThemeSettingViewModel : MyReactiveObject
|
|||||||
x.OfType<Button>(),
|
x.OfType<Button>(),
|
||||||
x.OfType<TextBox>(),
|
x.OfType<TextBox>(),
|
||||||
x.OfType<TextBlock>(),
|
x.OfType<TextBlock>(),
|
||||||
|
x.OfType<SelectableTextBlock>(),
|
||||||
x.OfType<Menu>(),
|
x.OfType<Menu>(),
|
||||||
x.OfType<ContextMenu>(),
|
x.OfType<ContextMenu>(),
|
||||||
x.OfType<DataGridRow>(),
|
x.OfType<DataGridRow>(),
|
||||||
|
|||||||
@@ -69,34 +69,35 @@
|
|||||||
IsChecked="True"
|
IsChecked="True"
|
||||||
Theme="{DynamicResource SimpleToggleSwitch}" />
|
Theme="{DynamicResource SimpleToggleSwitch}" />
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<TextBox
|
|
||||||
Name="txtMsg"
|
<ScrollViewer x:Name="msgScrollViewer" VerticalScrollBarVisibility="Auto">
|
||||||
VerticalAlignment="Stretch"
|
<SelectableTextBlock
|
||||||
BorderThickness="0"
|
Name="txtMsg"
|
||||||
Classes="TextArea"
|
VerticalAlignment="Stretch"
|
||||||
IsReadOnly="True"
|
Classes="TextArea"
|
||||||
TextAlignment="Left"
|
TextAlignment="Left"
|
||||||
TextWrapping="Wrap">
|
TextWrapping="Wrap">
|
||||||
<TextBox.ContextMenu>
|
<SelectableTextBlock.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
x:Name="menuMsgViewSelectAll"
|
x:Name="menuMsgViewSelectAll"
|
||||||
Click="menuMsgViewSelectAll_Click"
|
Click="menuMsgViewSelectAll_Click"
|
||||||
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}" />
|
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
x:Name="menuMsgViewCopy"
|
x:Name="menuMsgViewCopy"
|
||||||
Click="menuMsgViewCopy_Click"
|
Click="menuMsgViewCopy_Click"
|
||||||
Header="{x:Static resx:ResUI.menuMsgViewCopy}" />
|
Header="{x:Static resx:ResUI.menuMsgViewCopy}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
x:Name="menuMsgViewCopyAll"
|
x:Name="menuMsgViewCopyAll"
|
||||||
Click="menuMsgViewCopyAll_Click"
|
Click="menuMsgViewCopyAll_Click"
|
||||||
Header="{x:Static resx:ResUI.menuMsgViewCopyAll}" />
|
Header="{x:Static resx:ResUI.menuMsgViewCopyAll}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
x:Name="menuMsgViewClear"
|
x:Name="menuMsgViewClear"
|
||||||
Click="menuMsgViewClear_Click"
|
Click="menuMsgViewClear_Click"
|
||||||
Header="{x:Static resx:ResUI.menuMsgViewClear}" />
|
Header="{x:Static resx:ResUI.menuMsgViewClear}" />
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</TextBox.ContextMenu>
|
</SelectableTextBlock.ContextMenu>
|
||||||
</TextBox>
|
</SelectableTextBlock>
|
||||||
|
</ScrollViewer>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
|
using Avalonia.Controls;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
@@ -9,9 +10,12 @@ namespace v2rayN.Desktop.Views;
|
|||||||
|
|
||||||
public partial class MsgView : ReactiveUserControl<MsgViewModel>
|
public partial class MsgView : ReactiveUserControl<MsgViewModel>
|
||||||
{
|
{
|
||||||
|
private readonly ScrollViewer _scrollViewer;
|
||||||
|
|
||||||
public MsgView()
|
public MsgView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
_scrollViewer = this.FindControl<ScrollViewer>("msgScrollViewer");
|
||||||
|
|
||||||
ViewModel = new MsgViewModel(UpdateViewHandler);
|
ViewModel = new MsgViewModel(UpdateViewHandler);
|
||||||
|
|
||||||
@@ -43,14 +47,14 @@ public partial class MsgView : ReactiveUserControl<MsgViewModel>
|
|||||||
txtMsg.Text = msg.ToString();
|
txtMsg.Text = msg.ToString();
|
||||||
if (togScrollToEnd.IsChecked ?? true)
|
if (togScrollToEnd.IsChecked ?? true)
|
||||||
{
|
{
|
||||||
txtMsg.CaretIndex = int.MaxValue;
|
_scrollViewer?.ScrollToEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearMsg()
|
public void ClearMsg()
|
||||||
{
|
{
|
||||||
ViewModel?.ClearMsg();
|
ViewModel?.ClearMsg();
|
||||||
txtMsg.Clear();
|
txtMsg.Text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void menuMsgViewSelectAll_Click(object? sender, RoutedEventArgs e)
|
private void menuMsgViewSelectAll_Click(object? sender, RoutedEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user