Skip to content

Commit 9e20f25

Browse files
committed
ux: better layout for custom action
Signed-off-by: leo <[email protected]>
1 parent daf4892 commit 9e20f25

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

src/Resources/Locales/en_US.axaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@
201201
<x:String x:Key="Text.Configure.User.Placeholder" xml:space="preserve">User name for this repository</x:String>
202202
<x:String x:Key="Text.ConfigureCustomActionControls" xml:space="preserve">Edit Custom Action Controls</x:String>
203203
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue" xml:space="preserve">Checked Value:</x:String>
204+
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue.Tip" xml:space="preserve">When checked, this value will be used in command-line arguments</x:String>
204205
<x:String x:Key="Text.ConfigureCustomActionControls.Description" xml:space="preserve">Description:</x:String>
205-
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Placeholder" xml:space="preserve">Used as placeholder in TextBox/PathSelector or tooltip in CheckBox</x:String>
206+
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Tip" xml:space="preserve">Used as placeholder in TextBox/PathSelector or tooltip in CheckBox</x:String>
206207
<x:String x:Key="Text.ConfigureCustomActionControls.DefaultValue" xml:space="preserve">Default:</x:String>
207208
<x:String x:Key="Text.ConfigureCustomActionControls.IsFolder" xml:space="preserve">Is Folder:</x:String>
208209
<x:String x:Key="Text.ConfigureCustomActionControls.Label" xml:space="preserve">Label:</x:String>

src/Resources/Locales/zh_CN.axaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,9 @@
205205
<x:String x:Key="Text.Configure.User.Placeholder" xml:space="preserve">应用于本仓库的用户名</x:String>
206206
<x:String x:Key="Text.ConfigureCustomActionControls" xml:space="preserve">编辑自定义操作输入控件</x:String>
207207
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue" xml:space="preserve">启用时命令行参数 :</x:String>
208+
<x:String x:Key="Text.ConfigureCustomActionControls.CheckedValue.Tip" xml:space="preserve">此CheckBox勾选后,该值会被应用于命令行参数</x:String>
208209
<x:String x:Key="Text.ConfigureCustomActionControls.Description" xml:space="preserve">描述 :</x:String>
209-
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Placeholder" xml:space="preserve">TextBox及Path Selector中用作Placeholder,CheckBox中用作ToolTip</x:String>
210+
<x:String x:Key="Text.ConfigureCustomActionControls.Description.Tip" xml:space="preserve">TextBox及Path Selector中用作Placeholder,CheckBox中用作ToolTip</x:String>
210211
<x:String x:Key="Text.ConfigureCustomActionControls.DefaultValue" xml:space="preserve">默认值 :</x:String>
211212
<x:String x:Key="Text.ConfigureCustomActionControls.IsFolder" xml:space="preserve">目标是否是目录 :</x:String>
212213
<x:String x:Key="Text.ConfigureCustomActionControls.Label" xml:space="preserve">名称 :</x:String>

src/Resources/Locales/zh_TW.axaml

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

src/Views/ConfigureCustomActionControls.axaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</Grid>
3939

4040
<!-- Body -->
41-
<Grid Grid.Row="1" ColumnDefinitions="200,*" Height="340" Margin="8,8,8,16">
41+
<Grid Grid.Row="1" ColumnDefinitions="200,*" MinHeight="340" Margin="8,8,8,16">
4242
<Border Grid.Column="0"
4343
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
4444
Background="{DynamicResource Brush.Contents}">
@@ -138,8 +138,11 @@
138138
<TextBox Margin="0,4,0,0"
139139
CornerRadius="3"
140140
Height="28"
141-
Text="{Binding Description, Mode=TwoWay}"
142-
Watermark="{DynamicResource Text.ConfigureCustomActionControls.Description.Placeholder}"/>
141+
Text="{Binding Description, Mode=TwoWay}"/>
142+
<TextBlock Margin="0,2,0,0"
143+
TextWrapping="Wrap"
144+
Text="{DynamicResource Text.ConfigureCustomActionControls.Description.Tip}"
145+
Foreground="{DynamicResource Brush.FG2}"/>
143146

144147
<!-- Default value -->
145148
<TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.ConfigureCustomActionControls.DefaultValue}"/>
@@ -170,7 +173,12 @@
170173
CornerRadius="3"
171174
Height="28"
172175
Text="{Binding StringValue, Mode=TwoWay}"
173-
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/>
176+
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/>
177+
<TextBlock Margin="0,2,0,0"
178+
TextWrapping="Wrap"
179+
Text="{DynamicResource Text.ConfigureCustomActionControls.CheckedValue.Tip}"
180+
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"
181+
Foreground="{DynamicResource Brush.FG2}"/>
174182
</StackPanel>
175183
</DataTemplate>
176184
</ContentControl.DataTemplates>

src/Views/RepositoryConfigure.axaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Configure.CustomAction}"/>
382382
</TabItem.Header>
383383

384-
<Grid ColumnDefinitions="200,*" Height="380" Margin="0,8,0,16">
384+
<Grid ColumnDefinitions="200,*" MinHeight="380" Margin="0,8,0,16">
385385
<Border Grid.Column="0"
386386
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
387387
Background="{DynamicResource Brush.Contents}">

0 commit comments

Comments
 (0)