ux: better layout for custom action

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-25 17:58:52 +08:00
parent daf4892423
commit 9e20f25e78
No known key found for this signature in database
5 changed files with 19 additions and 8 deletions

View file

@ -201,8 +201,9 @@
<x:String x:Key="Text.Configure.User.Placeholder" xml:space="preserve">User name for this repository</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls" xml:space="preserve">Edit Custom Action Controls</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue" xml:space="preserve">Checked Value:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue.Tip" xml:space="preserve">When checked, this value will be used in command-line arguments</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description" xml:space="preserve">Description:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Placeholder" xml:space="preserve">Used as placeholder in TextBox/PathSelector or tooltip in CheckBox</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Tip" xml:space="preserve">Used as placeholder in TextBox/PathSelector or tooltip in CheckBox</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.DefaultValue" xml:space="preserve">Default:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.IsFolder" xml:space="preserve">Is Folder:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Label" xml:space="preserve">Label:</x:String>

View file

@ -205,8 +205,9 @@
<x:String x:Key="Text.Configure.User.Placeholder" xml:space="preserve">应用于本仓库的用户名</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls" xml:space="preserve">编辑自定义操作输入控件</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue" xml:space="preserve">启用时命令行参数 </x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue.Tip" xml:space="preserve">此CheckBox勾选后该值会被应用于命令行参数</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description" xml:space="preserve">描述 </x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Placeholder" xml:space="preserve">TextBox及Path Selector中用作PlaceholderCheckBox中用作ToolTip</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Tip" xml:space="preserve">TextBox及Path Selector中用作PlaceholderCheckBox中用作ToolTip</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.DefaultValue" xml:space="preserve">默认值 </x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.IsFolder" xml:space="preserve">目标是否是目录 </x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Label" xml:space="preserve">名称 </x:String>

View file

@ -205,8 +205,9 @@
<x:String x:Key="Text.Configure.User.Placeholder" xml:space="preserve">用於本存放庫的使用者名稱</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls" xml:space="preserve">編輯自訂動作輸入控件</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue" xml:space="preserve">啟用時的指令行參數:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue.Tip" xml:space="preserve">勾選 CheckBox 後,此值將用於命令列參數中</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description" xml:space="preserve">描述:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Placeholder" xml:space="preserve">在 TextBox/PathSelector 中用作占位符,或在 CheckBox 中用作工具提示</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Tip" xml:space="preserve">在 TextBox/PathSelector 中用作占位符,或在 CheckBox 中用作工具提示</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.DefaultValue" xml:space="preserve">預設值:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.IsFolder" xml:space="preserve">目標路徑是否為資料夾:</x:String>
<x:String x:Key="Text.ConfigureCustomActionControls.Label" xml:space="preserve">名稱:</x:String>

View file

@ -38,7 +38,7 @@
</Grid>
<!-- Body -->
<Grid Grid.Row="1" ColumnDefinitions="200,*" Height="340" Margin="8,8,8,16">
<Grid Grid.Row="1" ColumnDefinitions="200,*" MinHeight="340" Margin="8,8,8,16">
<Border Grid.Column="0"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
Background="{DynamicResource Brush.Contents}">
@ -138,8 +138,11 @@
<TextBox Margin="0,4,0,0"
CornerRadius="3"
Height="28"
Text="{Binding Description, Mode=TwoWay}"
Watermark="{DynamicResource Text.ConfigureCustomActionControls.Description.Placeholder}"/>
Text="{Binding Description, Mode=TwoWay}"/>
<TextBlock Margin="0,2,0,0"
TextWrapping="Wrap"
Text="{DynamicResource Text.ConfigureCustomActionControls.Description.Tip}"
Foreground="{DynamicResource Brush.FG2}"/>
<!-- Default value -->
<TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.ConfigureCustomActionControls.DefaultValue}"/>
@ -170,7 +173,12 @@
CornerRadius="3"
Height="28"
Text="{Binding StringValue, Mode=TwoWay}"
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/>
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/>
<TextBlock Margin="0,2,0,0"
TextWrapping="Wrap"
Text="{DynamicResource Text.ConfigureCustomActionControls.CheckedValue.Tip}"
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"
Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel>
</DataTemplate>
</ContentControl.DataTemplates>

View file

@ -381,7 +381,7 @@
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Configure.CustomAction}"/>
</TabItem.Header>
<Grid ColumnDefinitions="200,*" Height="380" Margin="0,8,0,16">
<Grid ColumnDefinitions="200,*" MinHeight="380" Margin="0,8,0,16">
<Border Grid.Column="0"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
Background="{DynamicResource Brush.Contents}">