Skip to content

Commit 4ed0800

Browse files
committed
ux: command palette layout
Signed-off-by: leo <longshuang@msn.cn>
1 parent a94975b commit 4ed0800

10 files changed

+82
-28
lines changed

src/Resources/Locales/en_US.axaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@
134134
<x:String x:Key="Text.Clone.RemoteURL" xml:space="preserve">Repository URL:</x:String>
135135
<x:String x:Key="Text.Close" xml:space="preserve">CLOSE</x:String>
136136
<x:String x:Key="Text.CodeEditor" xml:space="preserve">Editor</x:String>
137+
<x:String x:Key="Text.CommandPalette.Branches" xml:space="preserve">Branches</x:String>
138+
<x:String x:Key="Text.CommandPalette.BranchesAndTags" xml:space="preserve">Branches &amp; Tags</x:String>
139+
<x:String x:Key="Text.CommandPalette.RepositoryActions" xml:space="preserve">Repository Custom Actions</x:String>
140+
<x:String x:Key="Text.CommandPalette.RevisionFiles" xml:space="preserve">Revision Files</x:String>
137141
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">Checkout Commit</x:String>
138142
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">Cherry-Pick Commit</x:String>
139143
<x:String x:Key="Text.CommitCM.CherryPickMultiple" xml:space="preserve">Cherry-Pick ...</x:String>

src/Resources/Locales/zh_CN.axaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@
138138
<x:String x:Key="Text.Clone.RemoteURL" xml:space="preserve">远程仓库 :</x:String>
139139
<x:String x:Key="Text.Close" xml:space="preserve">关闭</x:String>
140140
<x:String x:Key="Text.CodeEditor" xml:space="preserve">提交信息编辑器</x:String>
141+
<x:String x:Key="Text.CommandPalette.Branches" xml:space="preserve">分支列表</x:String>
142+
<x:String x:Key="Text.CommandPalette.BranchesAndTags" xml:space="preserve">分支 &amp; 标签</x:String>
143+
<x:String x:Key="Text.CommandPalette.RepositoryActions" xml:space="preserve">自定义操作列表</x:String>
144+
<x:String x:Key="Text.CommandPalette.RevisionFiles" xml:space="preserve">文件列表</x:String>
141145
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">检出此提交</x:String>
142146
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">挑选(cherry-pick)此提交</x:String>
143147
<x:String x:Key="Text.CommitCM.CherryPickMultiple" xml:space="preserve">挑选(cherry-pick)...</x:String>

src/Resources/Locales/zh_TW.axaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@
138138
<x:String x:Key="Text.Clone.RemoteURL" xml:space="preserve">遠端存放庫:</x:String>
139139
<x:String x:Key="Text.Close" xml:space="preserve">關閉</x:String>
140140
<x:String x:Key="Text.CodeEditor" xml:space="preserve">提交訊息編輯器</x:String>
141+
<x:String x:Key="Text.CommandPalette.Branches" xml:space="preserve">分支列表</x:String>
142+
<x:String x:Key="Text.CommandPalette.BranchesAndTags" xml:space="preserve">分支 &amp; 標籤</x:String>
143+
<x:String x:Key="Text.CommandPalette.RepositoryActions" xml:space="preserve">自訂動作</x:String>
144+
<x:String x:Key="Text.CommandPalette.RevisionFiles" xml:space="preserve">檔案列表</x:String>
141145
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">簽出 (checkout) 此提交</x:String>
142146
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">揀選 (cherry-pick) 此提交</x:String>
143147
<x:String x:Key="Text.CommitCM.CherryPickMultiple" xml:space="preserve">揀選 (cherry-pick)...</x:String>

src/Views/BlameCommandPalette.axaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
99
x:Class="SourceGit.Views.BlameCommandPalette"
1010
x:DataType="vm:BlameCommandPalette">
11-
<Grid RowDefinitions="Auto,Auto">
11+
<Grid RowDefinitions="Auto,Auto,Auto">
1212
<v:RepositoryCommandPaletteTextBox Grid.Row="0"
1313
x:Name="FilterTextBox"
1414
Height="24"
@@ -50,11 +50,17 @@
5050
</Button>
5151
</TextBox.InnerRightContent>
5252
</v:RepositoryCommandPaletteTextBox>
53+
54+
<TextBlock Grid.Row="1"
55+
Margin="6,12,0,0"
56+
Text="{DynamicResource Text.CommandPalette.RevisionFiles}"
57+
FontWeight="Bold"
58+
Foreground="{DynamicResource Brush.FG2}"/>
5359

54-
<ListBox Grid.Row="1"
60+
<ListBox Grid.Row="2"
5561
x:Name="FileListBox"
56-
MaxHeight="250"
57-
Margin="4,8,4,0"
62+
MaxHeight="360"
63+
Margin="4,8"
5864
BorderThickness="0"
5965
SelectionMode="Single"
6066
Background="Transparent"

src/Views/CheckoutCommandPalette.axaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
1010
x:Class="SourceGit.Views.CheckoutCommandPalette"
1111
x:DataType="vm:CheckoutCommandPalette">
12-
<Grid RowDefinitions="Auto,Auto">
12+
<Grid RowDefinitions="Auto,Auto,Auto">
1313
<v:RepositoryCommandPaletteTextBox Grid.Row="0"
1414
x:Name="FilterTextBox"
1515
Height="24"
@@ -52,10 +52,16 @@
5252
</TextBox.InnerRightContent>
5353
</v:RepositoryCommandPaletteTextBox>
5454

55-
<ListBox Grid.Row="1"
55+
<TextBlock Grid.Row="1"
56+
Margin="6,12,0,0"
57+
Text="{DynamicResource Text.CommandPalette.Branches}"
58+
FontWeight="Bold"
59+
Foreground="{DynamicResource Brush.FG2}"/>
60+
61+
<ListBox Grid.Row="2"
5662
x:Name="BranchListBox"
57-
MaxHeight="250"
58-
Margin="4,8,4,0"
63+
MaxHeight="360"
64+
Margin="4,8"
5965
BorderThickness="0"
6066
SelectionMode="Single"
6167
Background="Transparent"

src/Views/CompareCommandPalette.axaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
1010
x:Class="SourceGit.Views.CompareCommandPalette"
1111
x:DataType="vm:CompareCommandPalette">
12-
<Grid RowDefinitions="Auto,Auto">
12+
<Grid RowDefinitions="Auto,Auto,Auto">
1313
<v:RepositoryCommandPaletteTextBox Grid.Row="0"
1414
x:Name="FilterTextBox"
1515
Height="24"
@@ -64,10 +64,16 @@
6464
</TextBox.InnerRightContent>
6565
</v:RepositoryCommandPaletteTextBox>
6666

67-
<ListBox Grid.Row="1"
67+
<TextBlock Grid.Row="1"
68+
Margin="6,12,0,0"
69+
Text="{DynamicResource Text.CommandPalette.BranchesAndTags}"
70+
FontWeight="Bold"
71+
Foreground="{DynamicResource Brush.FG2}"/>
72+
73+
<ListBox Grid.Row="2"
6874
x:Name="RefsListBox"
69-
MaxHeight="250"
70-
Margin="4,8,4,0"
75+
MaxHeight="360"
76+
Margin="4,8"
7177
BorderThickness="0"
7278
SelectionMode="Single"
7379
Background="Transparent"

src/Views/ExecuteCustomActionCommandPalette.axaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
99
x:Class="SourceGit.Views.ExecuteCustomActionCommandPalette"
1010
x:DataType="vm:ExecuteCustomActionCommandPalette">
11-
<Grid RowDefinitions="Auto,Auto">
11+
<Grid RowDefinitions="Auto,Auto,Auto">
1212
<v:RepositoryCommandPaletteTextBox Grid.Row="0"
1313
x:Name="FilterTextBox"
1414
Height="24"
@@ -51,10 +51,16 @@
5151
</TextBox.InnerRightContent>
5252
</v:RepositoryCommandPaletteTextBox>
5353

54-
<ListBox Grid.Row="1"
54+
<TextBlock Grid.Row="1"
55+
Margin="6,12,0,0"
56+
Text="{DynamicResource Text.CommandPalette.RepositoryActions}"
57+
FontWeight="Bold"
58+
Foreground="{DynamicResource Brush.FG2}"/>
59+
60+
<ListBox Grid.Row="2"
5561
x:Name="ActionListBox"
56-
MaxHeight="250"
57-
Margin="4,8,4,0"
62+
MaxHeight="360"
63+
Margin="4,8"
5864
BorderThickness="0"
5965
SelectionMode="Single"
6066
Background="Transparent"

src/Views/FileHistoryCommandPalette.axaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
99
x:Class="SourceGit.Views.FileHistoryCommandPalette"
1010
x:DataType="vm:FileHistoryCommandPalette">
11-
<Grid RowDefinitions="Auto,Auto">
11+
<Grid RowDefinitions="Auto,Auto,Auto">
1212
<v:RepositoryCommandPaletteTextBox Grid.Row="0"
1313
x:Name="FilterTextBox"
1414
Height="24"
@@ -51,10 +51,16 @@
5151
</TextBox.InnerRightContent>
5252
</v:RepositoryCommandPaletteTextBox>
5353

54-
<ListBox Grid.Row="1"
54+
<TextBlock Grid.Row="1"
55+
Margin="6,12,0,0"
56+
Text="{DynamicResource Text.CommandPalette.RevisionFiles}"
57+
FontWeight="Bold"
58+
Foreground="{DynamicResource Brush.FG2}"/>
59+
60+
<ListBox Grid.Row="2"
5561
x:Name="FileListBox"
56-
MaxHeight="250"
57-
Margin="4,8,4,0"
62+
MaxHeight="360"
63+
Margin="4,8"
5864
BorderThickness="0"
5965
SelectionMode="Single"
6066
Background="Transparent"

src/Views/MergeCommandPalette.axaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
1010
x:Class="SourceGit.Views.MergeCommandPalette"
1111
x:DataType="vm:MergeCommandPalette">
12-
<Grid RowDefinitions="Auto,Auto">
12+
<Grid RowDefinitions="Auto,Auto,Auto">
1313
<v:RepositoryCommandPaletteTextBox Grid.Row="0"
1414
x:Name="FilterTextBox"
1515
Height="24"
@@ -52,10 +52,16 @@
5252
</TextBox.InnerRightContent>
5353
</v:RepositoryCommandPaletteTextBox>
5454

55-
<ListBox Grid.Row="1"
55+
<TextBlock Grid.Row="1"
56+
Margin="6,12,0,0"
57+
Text="{DynamicResource Text.CommandPalette.Branches}"
58+
FontWeight="Bold"
59+
Foreground="{DynamicResource Brush.FG2}"/>
60+
61+
<ListBox Grid.Row="2"
5662
x:Name="BranchListBox"
57-
MaxHeight="250"
58-
Margin="4,8,4,0"
63+
MaxHeight="360"
64+
Margin="4,8"
5965
BorderThickness="0"
6066
SelectionMode="Single"
6167
Background="Transparent"

src/Views/OpenFileCommandPalette.axaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
99
x:Class="SourceGit.Views.OpenFileCommandPalette"
1010
x:DataType="vm:OpenFileCommandPalette">
11-
<Grid RowDefinitions="Auto,Auto">
11+
<Grid RowDefinitions="Auto,Auto,Auto">
1212
<v:RepositoryCommandPaletteTextBox Grid.Row="0"
1313
x:Name="FilterTextBox"
1414
Height="24"
@@ -51,10 +51,16 @@
5151
</TextBox.InnerRightContent>
5252
</v:RepositoryCommandPaletteTextBox>
5353

54-
<ListBox Grid.Row="1"
54+
<TextBlock Grid.Row="1"
55+
Margin="6,12,0,0"
56+
Text="{DynamicResource Text.CommandPalette.RevisionFiles}"
57+
FontWeight="Bold"
58+
Foreground="{DynamicResource Brush.FG2}"/>
59+
60+
<ListBox Grid.Row="2"
5561
x:Name="FileListBox"
56-
MaxHeight="250"
57-
Margin="4,8,4,0"
62+
MaxHeight="360"
63+
Margin="4,8"
5864
BorderThickness="0"
5965
SelectionMode="Single"
6066
Background="Transparent"

0 commit comments

Comments
 (0)