Files
2dust_v2rayN/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml
T
2dust f85326cf0e Add per-core prerelease update selection
Replaces the global prerelease toggle with per-core prerelease options in both WPF and Avalonia update views, and persists selections via `CheckPreReleaseCoreTypes` in config. Update checks now resolve prerelease mode per selected core (including auto-check flow), and the sing-box max-version lock is removed to allow newer versions.
2026-10-03 14:58:45 +08:00

114 lines
5.0 KiB
XML

<UserControl
x:Class="v2rayN.Desktop.Views.CheckUpdateView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dd="clr-namespace:v2rayN.Desktop.DesignData"
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"
d:DesignHeight="600"
d:DesignWidth="800"
x:DataType="vms:CheckUpdateViewModel"
Design.DataContext="{x:Static dd:DesignData.CheckUpdate}"
mc:Ignorable="d">
<DockPanel Margin="{StaticResource Margin8}">
<Border
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
DockPanel.Dock="Bottom"
Theme="{DynamicResource CardBorder}">
<StackPanel
Margin="{StaticResource Margin4}"
HorizontalAlignment="Center"
Orientation="Horizontal">
<TextBlock
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSettingsEnableUpdateViaProxy}" />
<ToggleSwitch
x:Name="togEnableUpdateViaProxy"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" />
<Button
x:Name="btnCheckOnly"
Width="100"
Margin="{StaticResource Margin4}"
Content="{x:Static resx:ResUI.menuCheckOnly}" />
<Button
x:Name="btnCheckUpdate"
Width="100"
Margin="{StaticResource Margin4}"
Content="{x:Static resx:ResUI.menuCheckAndUpdate}" />
</StackPanel>
</Border>
<Border
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Theme="{DynamicResource CardBorder}">
<ListBox
x:Name="lstCheckUpdates"
BorderThickness="1"
ItemsSource="{Binding CheckUpdateModels}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Panel Width="680" VerticalAlignment="Center">
<Grid ColumnDefinitions="1*,3*,1*,3*" RowDefinitions="Auto">
<ToggleSwitch
x:Name="togAutoRefresh"
Grid.Column="0"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
IsChecked="{Binding IsSelected}" />
<StackPanel
Grid.Column="1"
Margin="{StaticResource Margin4}"
IsVisible="{Binding ShowCheckPreRelease}"
Orientation="Horizontal">
<ToggleSwitch
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
IsChecked="{Binding IsCheckPreRelease}"
OffContent=""
OnContent="" />
<TextBlock
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}" />
</StackPanel>
<TextBlock
Grid.Column="2"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{Binding CoreTypeForStorage}" />
<TextBlock
Grid.Column="3"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Text="{Binding Remarks}"
TextWrapping="WrapWithOverflow" />
</Grid>
</Panel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ListBox>
</Border>
</DockPanel>
</UserControl>