Improved UI for Desktop version

pull/5829/head
2dust 2024-10-02 21:08:17 +08:00
parent 1b2b838bc0
commit 5fbeb4b0fb
5 changed files with 44 additions and 12 deletions

View File

@ -673,7 +673,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Importing Share Links from clipboard (Ctrl+V) 的本地化字符串。 /// 查找类似 Import Share Links from clipboard (Ctrl+V) 的本地化字符串。
/// </summary> /// </summary>
public static string menuAddServerViaClipboard { public static string menuAddServerViaClipboard {
get { get {
@ -1717,7 +1717,7 @@ namespace ServiceLib.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 Servers Filter, press Enter to execute 的本地化字符串。 /// 查找类似 Server filter, press Enter to execute 的本地化字符串。
/// </summary> /// </summary>
public static string MsgServerTitle { public static string MsgServerTitle {
get { get {
@ -3481,6 +3481,15 @@ namespace ServiceLib.Resx {
} }
} }
/// <summary>
/// 查找类似 Active 的本地化字符串。
/// </summary>
public static string TipActiveServer {
get {
return ResourceManager.GetString("TipActiveServer", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Routing setting is changed 的本地化字符串。 /// 查找类似 Routing setting is changed 的本地化字符串。
/// </summary> /// </summary>

View File

@ -1321,4 +1321,7 @@
<data name="ConnectionsHostFilterTitle" xml:space="preserve"> <data name="ConnectionsHostFilterTitle" xml:space="preserve">
<value>Host filter</value> <value>Host filter</value>
</data> </data>
<data name="TipActiveServer" xml:space="preserve">
<value>Active</value>
</data>
</root> </root>

View File

@ -1318,4 +1318,7 @@
<data name="ConnectionsHostFilterTitle" xml:space="preserve"> <data name="ConnectionsHostFilterTitle" xml:space="preserve">
<value>主机过滤器</value> <value>主机过滤器</value>
</data> </data>
<data name="TipActiveServer" xml:space="preserve">
<value>活动</value>
</data>
</root> </root>

View File

@ -1198,4 +1198,7 @@
<data name="ConnectionsHostFilterTitle" xml:space="preserve"> <data name="ConnectionsHostFilterTitle" xml:space="preserve">
<value>主機過濾</value> <value>主機過濾</value>
</data> </data>
<data name="TipActiveServer" xml:space="preserve">
<value>活動</value>
</data>
</root> </root>

View File

@ -83,7 +83,7 @@
BorderThickness="1" BorderThickness="1"
CanUserResizeColumns="True" CanUserResizeColumns="True"
GridLinesVisibility="All" GridLinesVisibility="All"
HeadersVisibility="Column" HeadersVisibility="All"
IsReadOnly="True" IsReadOnly="True"
ItemsSource="{Binding ProfileItems}"> ItemsSource="{Binding ProfileItems}">
<DataGrid.KeyBindings> <DataGrid.KeyBindings>
@ -143,20 +143,34 @@
</DataGrid.ContextMenu> </DataGrid.ContextMenu>
<DataGrid.Columns> <DataGrid.Columns>
<DataGridCheckBoxColumn
Width="40"
Binding="{Binding isActive}"
Tag="isActive" />
<DataGridTextColumn <DataGridTextColumn
Width="80" Width="80"
Binding="{Binding configType}" Binding="{Binding configType}"
Header="{x:Static resx:ResUI.LvServiceType}" Header="{x:Static resx:ResUI.LvServiceType}"
Tag="configType" /> Tag="configType" />
<DataGridTextColumn
Width="150" <DataGridTemplateColumn SortMemberPath="remarks" Tag="remarks">
Binding="{Binding remarks}" <DataGridTemplateColumn.Header>
Header="{x:Static resx:ResUI.LvRemarks}" <TextBlock Text="{x:Static resx:ResUI.LvRemarks}" />
Tag="remarks" /> </DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Margin="8,0" Orientation="Horizontal">
<Label
Margin="0,0,8,0"
Classes="Solid Red"
Content="{x:Static resx:ResUI.TipActiveServer}"
IsVisible="{Binding isActive}"
Theme="{StaticResource TagLabel}" />
<Label
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{Binding remarks}" />
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn <DataGridTextColumn
Width="120" Width="120"
Binding="{Binding address}" Binding="{Binding address}"