mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
Adjust UI for desktop
This commit is contained in:
parent
baf90cfbdd
commit
127858d582
8 changed files with 54 additions and 87 deletions
|
@ -5,10 +5,8 @@
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
x:DataType="vms:BackupAndRestoreViewModel"
|
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Styles>
|
<UserControl.Styles>
|
||||||
<Style Selector="Button">
|
<Style Selector="Button">
|
||||||
|
@ -55,7 +53,10 @@
|
||||||
Classes="Margin8"
|
Classes="Margin8"
|
||||||
Content="{x:Static resx:ResUI.menuLocalBackup}" />
|
Content="{x:Static resx:ResUI.menuLocalBackup}" />
|
||||||
|
|
||||||
<Separator Grid.Row="2" Grid.ColumnSpan="2" />
|
<Separator
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
|
@ -80,12 +81,11 @@
|
||||||
Classes="Margin8"
|
Classes="Margin8"
|
||||||
ColumnDefinitions="300,200"
|
ColumnDefinitions="300,200"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel
|
||||||
<TextBlock
|
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Classes="Margin8"
|
Orientation="Horizontal">
|
||||||
Text="{x:Static resx:ResUI.menuRemoteBackupAndRestore}" />
|
<TextBlock Classes="Margin8" Text="{x:Static resx:ResUI.menuRemoteBackupAndRestore}" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Width="30"
|
Width="30"
|
||||||
|
@ -190,7 +190,10 @@
|
||||||
Classes="Margin8"
|
Classes="Margin8"
|
||||||
Content="{x:Static resx:ResUI.menuRemoteBackup}" />
|
Content="{x:Static resx:ResUI.menuRemoteBackup}" />
|
||||||
|
|
||||||
<Separator Grid.Row="2" Grid.ColumnSpan="3" />
|
<Separator
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|
|
@ -9,7 +9,12 @@ namespace v2rayN.Desktop.Views
|
||||||
{
|
{
|
||||||
public partial class BackupAndRestoreView : ReactiveUserControl<BackupAndRestoreViewModel>
|
public partial class BackupAndRestoreView : ReactiveUserControl<BackupAndRestoreViewModel>
|
||||||
{
|
{
|
||||||
private Window _window;
|
private Window? _window;
|
||||||
|
|
||||||
|
public BackupAndRestoreView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
public BackupAndRestoreView(Window window)
|
public BackupAndRestoreView(Window window)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,8 @@
|
||||||
<ListBox
|
<ListBox
|
||||||
x:Name="lstCheckUpdates"
|
x:Name="lstCheckUpdates"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
ItemsSource="{Binding CheckUpdateModels}">
|
ItemsSource="{Binding CheckUpdateModels}"
|
||||||
|
Theme="{StaticResource ButtonRadioGroupListBox}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Orientation="Vertical" />
|
<StackPanel Orientation="Vertical" />
|
||||||
|
|
|
@ -95,7 +95,8 @@
|
||||||
<ListBox
|
<ListBox
|
||||||
x:Name="lstProxyGroups"
|
x:Name="lstProxyGroups"
|
||||||
DockPanel.Dock="Left"
|
DockPanel.Dock="Left"
|
||||||
ItemsSource="{Binding ProxyGroups}">
|
ItemsSource="{Binding ProxyGroups}"
|
||||||
|
Theme="{StaticResource ButtonRadioGroupListBox}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Orientation="Vertical" />
|
<StackPanel Orientation="Vertical" />
|
||||||
|
@ -105,10 +106,9 @@
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border
|
<Border
|
||||||
Width="160"
|
Width="160"
|
||||||
Margin="-6"
|
Margin="-8,-4"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
Theme="{StaticResource CardBorder}">
|
Theme="{StaticResource CardBorder}">
|
||||||
<DockPanel>
|
|
||||||
<Grid Classes="Margin8" RowDefinitions="1*,8,1*">
|
<Grid Classes="Margin8" RowDefinitions="1*,8,1*">
|
||||||
<DockPanel Grid.Row="0">
|
<DockPanel Grid.Row="0">
|
||||||
<TextBlock DockPanel.Dock="Right" Text="{Binding Type}" />
|
<TextBlock DockPanel.Dock="Right" Text="{Binding Type}" />
|
||||||
|
@ -116,13 +116,15 @@
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<TextBlock Grid.Row="2" Text="{Binding Now}" />
|
<TextBlock Grid.Row="2" Text="{Binding Now}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DockPanel>
|
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<ListBox x:Name="lstProxyDetails" ItemsSource="{Binding ProxyDetails}">
|
<ListBox
|
||||||
|
x:Name="lstProxyDetails"
|
||||||
|
ItemsSource="{Binding ProxyDetails}"
|
||||||
|
Theme="{StaticResource ButtonRadioGroupListBox}">
|
||||||
<ItemsControl.ContextMenu>
|
<ItemsControl.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem x:Name="menuProxiesDelaytestPart" Header="{x:Static resx:ResUI.menuProxiesDelaytestPart}" />
|
<MenuItem x:Name="menuProxiesDelaytestPart" Header="{x:Static resx:ResUI.menuProxiesDelaytestPart}" />
|
||||||
|
@ -138,7 +140,7 @@
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border
|
<Border
|
||||||
Width="160"
|
Width="160"
|
||||||
Margin="-6"
|
Margin="-12,-4"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
Theme="{StaticResource CardBorder}">
|
Theme="{StaticResource CardBorder}">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
|
|
|
@ -150,71 +150,20 @@
|
||||||
x:Name="tabMain1"
|
x:Name="tabMain1"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
TabStripPlacement="Left">
|
TabStripPlacement="Left">
|
||||||
<TabItem x:Name="tabMsgView1">
|
<TabItem x:Name="tabMsgView1" Header="{x:Static resx:ResUI.MsgInformationTitle}" />
|
||||||
<TabItem.Header>
|
<TabItem x:Name="tabClashProxies1" Header="{x:Static resx:ResUI.TbProxies}" />
|
||||||
<StackPanel>
|
<TabItem x:Name="tabClashConnections1" Header="{x:Static resx:ResUI.TbConnections}" />
|
||||||
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{x:Static resx:ResUI.MsgInformationTitle}" />
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem.Header>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem x:Name="tabClashProxies1">
|
|
||||||
<TabItem.Header>
|
|
||||||
<StackPanel>
|
|
||||||
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{x:Static resx:ResUI.TbProxies}" />
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem.Header>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem x:Name="tabClashConnections1">
|
|
||||||
<TabItem.Header>
|
|
||||||
<StackPanel>
|
|
||||||
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{x:Static resx:ResUI.TbConnections}" />
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem.Header>
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid x:Name="gridMain2" IsVisible="False">
|
<Grid x:Name="gridMain2" IsVisible="False">
|
||||||
<TabControl x:Name="tabMain2" TabStripPlacement="Left">
|
<TabControl x:Name="tabMain2" TabStripPlacement="Left">
|
||||||
<TabItem x:Name="tabProfiles2">
|
<TabItem x:Name="tabProfiles2" Header="{x:Static resx:ResUI.menuServers}" />
|
||||||
<TabItem.Header>
|
<TabItem x:Name="tabMsgView2" Header="{x:Static resx:ResUI.MsgInformationTitle}" />
|
||||||
<StackPanel>
|
<TabItem x:Name="tabClashProxies2" Header="{x:Static resx:ResUI.TbProxies}" />
|
||||||
|
<TabItem x:Name="tabClashConnections2" Header="{x:Static resx:ResUI.TbConnections}" />
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{x:Static resx:ResUI.menuServers}" />
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem.Header>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem x:Name="tabMsgView2">
|
|
||||||
<TabItem.Header>
|
|
||||||
<StackPanel>
|
|
||||||
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{x:Static resx:ResUI.MsgInformationTitle}" />
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem.Header>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem x:Name="tabClashProxies2">
|
|
||||||
<TabItem.Header>
|
|
||||||
<StackPanel>
|
|
||||||
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{x:Static resx:ResUI.TbProxies}" />
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem.Header>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem x:Name="tabClashConnections2">
|
|
||||||
<TabItem.Header>
|
|
||||||
<StackPanel>
|
|
||||||
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{x:Static resx:ResUI.TbConnections}" />
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem.Header>
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</dialogHost:DialogHost>
|
</dialogHost:DialogHost>
|
||||||
</Window>
|
</Window>
|
|
@ -15,7 +15,12 @@ namespace v2rayN.Desktop.Views
|
||||||
public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||||
{
|
{
|
||||||
private static Config _config;
|
private static Config _config;
|
||||||
private Window _window;
|
private Window? _window;
|
||||||
|
|
||||||
|
public ProfilesView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
public ProfilesView(Window window)
|
public ProfilesView(Window window)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,12 +4,10 @@
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
|
||||||
d:DesignHeight="480"
|
d:DesignHeight="480"
|
||||||
d:DesignWidth="400"
|
d:DesignWidth="400"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid Margin="30" RowDefinitions="Auto,Auto">
|
<Grid Margin="30" RowDefinitions="Auto,Auto">
|
||||||
|
|
||||||
<Image
|
<Image
|
||||||
Name="imgQrcode"
|
Name="imgQrcode"
|
||||||
Width="300"
|
Width="300"
|
||||||
|
@ -24,6 +22,5 @@
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
MaxLines="1" />
|
MaxLines="1" />
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
|
@ -5,6 +5,11 @@ namespace v2rayN.Desktop.Views
|
||||||
{
|
{
|
||||||
public partial class QrcodeView : UserControl
|
public partial class QrcodeView : UserControl
|
||||||
{
|
{
|
||||||
|
public QrcodeView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
public QrcodeView(string? url)
|
public QrcodeView(string? url)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
Loading…
Reference in a new issue