mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-06 13:32:08 +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".
206 lines
8.3 KiB
XML
206 lines
8.3 KiB
XML
<Window
|
|
x:Class="v2rayN.Desktop.Views.AddServer2Window"
|
|
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"
|
|
Title="{x:Static resx:ResUI.menuAddCustomServer}"
|
|
Width="700"
|
|
Height="500"
|
|
x:DataType="vms:AddServer2ViewModel"
|
|
Design.DataContext="{x:Static dd:DesignData.AddServer2}"
|
|
ShowInTaskbar="False"
|
|
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" />
|
|
<Button
|
|
x:Name="btnCancel"
|
|
MinWidth="100"
|
|
Margin="{StaticResource MarginLr8}"
|
|
Content="{x:Static resx:ResUI.TbCancel}"
|
|
IsCancel="True" />
|
|
</StackPanel>
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
|
<Grid ColumnDefinitions="Auto,Auto,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
Text="{x:Static resx:ResUI.menuServers}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TbRemarks}" />
|
|
|
|
<TextBox
|
|
x:Name="txtRemarks"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="400"
|
|
Margin="{StaticResource Margin4}"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center" />
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TbAddress}" />
|
|
<TextBox
|
|
x:Name="txtAddress"
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Width="400"
|
|
Margin="{StaticResource Margin4}"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsReadOnly="True" />
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
x:Name="btnBrowse"
|
|
Margin="{StaticResource MarginLr4}"
|
|
Content="{x:Static resx:ResUI.TbBrowse}" />
|
|
<Button
|
|
x:Name="btnEdit"
|
|
Margin="{StaticResource MarginLr4}"
|
|
Content="{x:Static resx:ResUI.TbEdit}" />
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TbCoreType}" />
|
|
<ComboBox
|
|
x:Name="cmbCoreType"
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Width="200"
|
|
Margin="{StaticResource Margin4}"
|
|
HorizontalAlignment="Left"
|
|
MaxDropDownHeight="1000" />
|
|
|
|
<Separator
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
Margin="{StaticResource Margin4}" />
|
|
|
|
<Grid
|
|
x:Name="gridCustomServer"
|
|
Grid.Row="5"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
ColumnDefinitions="Auto,Auto,Auto"
|
|
RowDefinitions="Auto,Auto,Auto">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TbDisplayLog}" />
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="{StaticResource Margin4}"
|
|
Orientation="Horizontal">
|
|
<ToggleSwitch
|
|
x:Name="togDisplayLog"
|
|
Margin="{StaticResource Margin4}"
|
|
HorizontalAlignment="Left" />
|
|
<TextBlock
|
|
Margin="{StaticResource MarginLr8}"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TipDisplayLog}" />
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TbPreSocksPort}" />
|
|
<TextBox
|
|
x:Name="txtPreSocksPort"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="200"
|
|
Margin="{StaticResource Margin4}"
|
|
HorizontalAlignment="Left" />
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="2"
|
|
Margin="{StaticResource Margin4}">
|
|
<TextBlock
|
|
Width="500"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TipPreSocksPort}"
|
|
TextWrapping="Wrap" />
|
|
<TextBlock
|
|
Width="500"
|
|
Margin="{StaticResource MarginLr8}"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.CustomServerTips}"
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid
|
|
x:Name="gridCustomOutbound"
|
|
Grid.Row="5"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
ColumnDefinitions="Auto,Auto,Auto"
|
|
IsVisible="False"
|
|
RowDefinitions="Auto,Auto,Auto">
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource Margin4}"
|
|
VerticalAlignment="Center"
|
|
Text="Sing-Box Endpoint" />
|
|
<ToggleSwitch
|
|
x:Name="togSingBoxEndpoint"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="{StaticResource Margin4}"
|
|
HorizontalAlignment="Left" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="2"
|
|
Width="500"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Static resx:ResUI.TbCustomOutboundTip}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</DockPanel>
|
|
</Window>
|