mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-05 13:02:07 +03:00
6152cab494
* fix(ui): let update and backup buttons fit their labels The update dialog gives its two buttons a fixed 100 px width, and the backup view puts its buttons in a fixed 200 px grid column, so longer labels are cut off, for example "Only Chec", "Check and" and "Backup to remote (WebD" in English. Use MinWidth="100" for the update buttons and an Auto column with MinWidth="200" for the backup buttons: short labels keep their current size and long ones fit. The "Automatic update interval (minutes)" label of the subscription window is cut off the same way between the switch and the interval field, so let it wrap. * fix(ui): show cut-off input hints as tooltips The hints of the previous and next proxy remarks fields in the subscription window and of the server and log filters are wider than their fields, so their end is cut off and there is no way to read it. Show the same text as a tooltip, as the custom config socks port field of the subscription window already does. * fix(ui): let dialog buttons and backup labels fit longer translations The Confirm and Cancel buttons of the editing and settings windows, and the Reset button of the hotkey window, have a fixed 100 px width, and the backup view puts its labels in a fixed 300 px column. Translations longer than the English text are cut off there: the Russian "Подтвердить" reads "Подтверди", and "Резервное копирование на удалённый сервер (WebDAV)" loses its end. Use MinWidth="100" for these buttons, as the message box already does with MinWidth="90", and an Auto label column with MinWidth="300".
321 lines
14 KiB
XML
321 lines
14 KiB
XML
<base:WindowBase
|
|
x:Class="v2rayN.Views.AddGroupServerWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:base="clr-namespace:v2rayN.Base"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:reactiveui="http://reactiveui.net"
|
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
|
Title="{x:Static resx:ResUI.menuServers}"
|
|
Width="900"
|
|
Height="700"
|
|
x:TypeArguments="vms:AddGroupServerViewModel"
|
|
ResizeMode="CanResize"
|
|
ShowInTaskbar="False"
|
|
Style="{StaticResource WindowGlobal}"
|
|
WindowStartupLocation="CenterScreen"
|
|
mc:Ignorable="d">
|
|
|
|
<DockPanel Margin="{StaticResource Margin8}">
|
|
<StackPanel
|
|
Margin="{StaticResource Margin4}"
|
|
HorizontalAlignment="Center"
|
|
DockPanel.Dock="Bottom"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
x:Name="btnSave"
|
|
MinWidth="100"
|
|
Content="{x:Static resx:ResUI.TbConfirm}"
|
|
IsDefault="True"
|
|
Style="{StaticResource DefButton}" />
|
|
<Button
|
|
x:Name="btnCancel"
|
|
MinWidth="100"
|
|
Margin="{StaticResource MarginLeftRight8}"
|
|
Content="{x:Static resx:ResUI.TbCancel}"
|
|
IsCancel="true"
|
|
Style="{StaticResource DefButton}" />
|
|
</StackPanel>
|
|
|
|
<Grid DockPanel.Dock="Top">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="300" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
Style="{StaticResource ModuleTitle}"
|
|
Text="{x:Static resx:ResUI.menuServers}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource ToolbarTextBlock}"
|
|
Text="{x:Static resx:ResUI.TbRemarks}" />
|
|
<TextBox
|
|
x:Name="txtRemarks"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="400"
|
|
Margin="{StaticResource Margin4}"
|
|
Style="{StaticResource DefTextBox}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource ToolbarTextBlock}"
|
|
Text="{x:Static resx:ResUI.TbCoreType}" />
|
|
<ComboBox
|
|
x:Name="cmbCoreType"
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Width="200"
|
|
Margin="{StaticResource Margin4}"
|
|
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TbCoreType}"
|
|
Style="{StaticResource DefComboBox}" />
|
|
|
|
<Grid
|
|
x:Name="gridPolicyGroup"
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="300" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource ToolbarTextBlock}"
|
|
Text="{x:Static resx:ResUI.TbPolicyGroupType}" />
|
|
<ComboBox
|
|
x:Name="cmbPolicyGroupType"
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Width="200"
|
|
Margin="{StaticResource Margin4}"
|
|
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TbPolicyGroupType}"
|
|
Style="{StaticResource DefComboBox}" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<TabControl
|
|
x:Name="tabControl"
|
|
Margin="{StaticResource Margin8}"
|
|
HorizontalContentAlignment="Left"
|
|
DockPanel.Dock="Top">
|
|
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
|
<Grid Margin="{StaticResource Margin8}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource ToolbarTextBlock}"
|
|
Text="{x:Static resx:ResUI.menuSubscription}" />
|
|
<ComboBox
|
|
x:Name="cmbSubChildItems"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Width="600"
|
|
Margin="{StaticResource Margin4}"
|
|
DisplayMemberPath="Remarks"
|
|
Style="{StaticResource DefComboBox}" />
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource ToolbarTextBlock}"
|
|
Text="{x:Static resx:ResUI.TbPolicyGroupSubChildTip}"
|
|
TextWrapping="Wrap" />
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource ToolbarTextBlock}"
|
|
Text="{x:Static resx:ResUI.LvFilter}" />
|
|
<ComboBox
|
|
x:Name="cmbFilter"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="600"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
IsEditable="True"
|
|
Style="{StaticResource DefComboBox}" />
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList2}">
|
|
<DataGrid
|
|
x:Name="lstChild"
|
|
AutoGenerateColumns="False"
|
|
BorderThickness="1"
|
|
CanUserAddRows="False"
|
|
CanUserResizeRows="False"
|
|
CanUserSortColumns="False"
|
|
EnableRowVirtualization="True"
|
|
GridLinesVisibility="All"
|
|
HeadersVisibility="Column"
|
|
IsReadOnly="True"
|
|
Style="{StaticResource DefDataGrid}">
|
|
<DataGrid.ContextMenu>
|
|
<ContextMenu Style="{StaticResource DefContextMenu}">
|
|
<MenuItem
|
|
x:Name="menuAddChildServer"
|
|
Height="{StaticResource MenuItemHeight}"
|
|
Header="{x:Static resx:ResUI.menuAddChildServer}" />
|
|
<MenuItem
|
|
x:Name="menuRemoveChildServer"
|
|
Height="{StaticResource MenuItemHeight}"
|
|
Header="{x:Static resx:ResUI.menuRemoveChildServer}" />
|
|
<MenuItem
|
|
x:Name="menuSelectAllChild"
|
|
Height="{StaticResource MenuItemHeight}"
|
|
Header="{x:Static resx:ResUI.menuSelectAll}"
|
|
InputGestureText="Ctrl+A" />
|
|
<Separator />
|
|
<MenuItem
|
|
x:Name="menuMoveTop"
|
|
Height="{StaticResource MenuItemHeight}"
|
|
Header="{x:Static resx:ResUI.menuMoveTop}"
|
|
InputGestureText="T" />
|
|
<MenuItem
|
|
x:Name="menuMoveUp"
|
|
Height="{StaticResource MenuItemHeight}"
|
|
Header="{x:Static resx:ResUI.menuMoveUp}"
|
|
InputGestureText="U" />
|
|
<MenuItem
|
|
x:Name="menuMoveDown"
|
|
Height="{StaticResource MenuItemHeight}"
|
|
Header="{x:Static resx:ResUI.menuMoveDown}"
|
|
InputGestureText="D" />
|
|
<MenuItem
|
|
x:Name="menuMoveBottom"
|
|
Height="{StaticResource MenuItemHeight}"
|
|
Header="{x:Static resx:ResUI.menuMoveBottom}"
|
|
InputGestureText="B" />
|
|
</ContextMenu>
|
|
</DataGrid.ContextMenu>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Width="150"
|
|
Binding="{Binding ConfigType}"
|
|
Header="{x:Static resx:ResUI.LvServiceType}" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding Remarks}"
|
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding Address}"
|
|
Header="{x:Static resx:ResUI.LvAddress}" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Port}"
|
|
Header="{x:Static resx:ResUI.LvPort}" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Network}"
|
|
Header="{x:Static resx:ResUI.LvTransportProtocol}" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding StreamSecurity}"
|
|
Header="{x:Static resx:ResUI.LvTLS}" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</TabItem>
|
|
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerListPreview}">
|
|
<DataGrid
|
|
x:Name="lstPreviewChild"
|
|
AutoGenerateColumns="False"
|
|
BorderThickness="1"
|
|
CanUserAddRows="False"
|
|
CanUserResizeRows="False"
|
|
CanUserSortColumns="False"
|
|
EnableRowVirtualization="True"
|
|
GridLinesVisibility="All"
|
|
HeadersVisibility="Column"
|
|
IsReadOnly="True"
|
|
Style="{StaticResource DefDataGrid}">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Width="150"
|
|
Binding="{Binding ConfigType}"
|
|
Header="{x:Static resx:ResUI.LvServiceType}" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding Remarks}"
|
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding Address}"
|
|
Header="{x:Static resx:ResUI.LvAddress}" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Port}"
|
|
Header="{x:Static resx:ResUI.LvPort}" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Network}"
|
|
Header="{x:Static resx:ResUI.LvTransportProtocol}" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding StreamSecurity}"
|
|
Header="{x:Static resx:ResUI.LvTLS}" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</TabItem>
|
|
</TabControl>
|
|
</DockPanel>
|
|
</base:WindowBase>
|