diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml
index 6fab3b0d..0d3bcd11 100644
--- a/src/Resources/Locales/de_DE.axaml
+++ b/src/Resources/Locales/de_DE.axaml
@@ -471,7 +471,6 @@ $1, $2, … Werte der Eingabe-Steuerelemente
Remote:
Verfolge alle ‚{0}‘ Dateien
Verfolge alle *{0} Dateien
- Vorgänger auswählen
VERLAUF
AUTOR
AUTOR-ZEITPUNKT
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index bdd14810..9bc3c7b7 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -468,7 +468,7 @@
Remote:
Track files named '{0}'
Track all *{0} files
- Select Parent
+ Select Commit
HISTORY
AUTHOR
AUTHOR TIME
@@ -498,6 +498,7 @@
Stage all changes and commit
Fetch, starts directly
Dashboard mode (Default)
+ Goto child of selected commit
Goto parent of selected commit
Open command palette
Commit search mode
diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml
index 4f18cb0e..7b5ba54a 100644
--- a/src/Resources/Locales/es_ES.axaml
+++ b/src/Resources/Locales/es_ES.axaml
@@ -472,7 +472,6 @@
Remoto:
Seguir archivos llamados '{0}'
Seguir todos los archivos *{0}
- Seleccionar Padre
Historias
AUTOR
HORA DEL AUTOR
diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml
index 95b41d0f..0066e612 100644
--- a/src/Resources/Locales/ru_RU.axaml
+++ b/src/Resources/Locales/ru_RU.axaml
@@ -472,7 +472,6 @@
Внешнее хранилище:
Отслеживать файлы с именем «{0}»
Отслеживать все файлы (*{0})
- Выбрать родительский
Истории
АВТОР
ВРЕМЯ АВТОРА
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml
index 9260b56b..2f82c0fd 100644
--- a/src/Resources/Locales/zh_CN.axaml
+++ b/src/Resources/Locales/zh_CN.axaml
@@ -472,7 +472,7 @@
远程 :
跟踪名为'{0}'的文件
跟踪所有 *{0} 文件
- 选择前往的父提交
+ 选择前往的提交
历史记录
作者
修改时间
@@ -502,6 +502,7 @@
自动暂存全部变更并提交
拉取 (fetch) 远程变更
切换左边栏为分支/标签等显示模式(默认)
+ 前往选中提交的子提交
前往选中提交的父提交
打开快捷命令面板
切换左边栏为提交搜索模式
diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml
index 9cedfb3a..2fdb310e 100644
--- a/src/Resources/Locales/zh_TW.axaml
+++ b/src/Resources/Locales/zh_TW.axaml
@@ -472,7 +472,7 @@
遠端存放庫:
追蹤名稱為「{0}」的檔案
追蹤所有 *{0} 檔案
- 選取要前往的父提交
+ 選取要前往的提交
歷史記錄
作者
修改時間
@@ -502,6 +502,7 @@
自動暫存全部變更並提交
提取 (fetch) 遠端的變更
切換左邊欄為分支/標籤等顯示模式 (預設)
+ 前往所選提交的子提交
前往所選提交的父提交
開啟命令面板
切換左邊欄為歷史搜尋模式
diff --git a/src/Views/GotoParentSelector.axaml b/src/Views/GotoRevisionSelector.axaml
similarity index 94%
rename from src/Views/GotoParentSelector.axaml
rename to src/Views/GotoRevisionSelector.axaml
index cb871186..f2f363d6 100644
--- a/src/Views/GotoParentSelector.axaml
+++ b/src/Views/GotoRevisionSelector.axaml
@@ -6,10 +6,10 @@
xmlns:v="using:SourceGit.Views"
xmlns:c="using:SourceGit.Converters"
mc:Ignorable="d" d:DesignWidth="520" d:DesignHeight="230"
- x:Class="SourceGit.Views.GotoParentSelector"
+ x:Class="SourceGit.Views.GotoRevisionSelector"
x:Name="ThisControl"
Icon="/App.ico"
- Title="{DynamicResource Text.GotoParentSelector}"
+ Title="{DynamicResource Text.GotoRevisionSelector}"
Width="600" SizeToContent="Height"
CanResize="False"
WindowStartupLocation="CenterOwner">
@@ -27,7 +27,7 @@
IsVisible="{OnPlatform True, macOS=False}"/>
@@ -37,7 +37,7 @@
+
1 && TopLevel.GetTopLevel(this) is Window owner)
{
- var dialog = new GotoParentSelector();
- dialog.ParentList.ItemsSource = parents;
+ var dialog = new GotoRevisionSelector();
+ dialog.RevisionList.ItemsSource = parents;
+
+ var c = await dialog.ShowDialog(owner);
+ if (c != null)
+ vm.NavigateTo(c.SHA);
+ }
+
+ e.Handled = true;
+ }
+
+ private async void OnGotoChild(object sender, RoutedEventArgs e)
+ {
+ if (DataContext is not ViewModels.Histories vm)
+ return;
+
+ if (!CommitListContainer.IsKeyboardFocusWithin)
+ return;
+
+ if (CommitListContainer.SelectedItems is not { Count: 1 } selected)
+ return;
+
+ if (selected[0] is not Models.Commit { Parents.Count: > 0 } commit)
+ return;
+
+ var children = new List();
+ var sha = commit.SHA;
+ foreach (var c in vm.Commits)
+ {
+ foreach (var p in c.Parents)
+ {
+ if (sha.StartsWith(p, StringComparison.Ordinal))
+ children.Add(c);
+ }
+
+ if (sha.Equals(c.SHA, StringComparison.Ordinal))
+ break;
+ }
+
+ if (children.Count == 1)
+ {
+ vm.NavigateTo(children[0].SHA);
+ }
+ else if (children.Count > 1 && TopLevel.GetTopLevel(this) is Window owner)
+ {
+ var dialog = new GotoRevisionSelector();
+ dialog.RevisionList.ItemsSource = children;
var c = await dialog.ShowDialog(owner);
if (c != null)
diff --git a/src/Views/Hotkeys.axaml b/src/Views/Hotkeys.axaml
index 73cb378c..e800906a 100644
--- a/src/Views/Hotkeys.axaml
+++ b/src/Views/Hotkeys.axaml
@@ -83,7 +83,7 @@
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Increase}}"
Margin="0,8"/>
-
+
@@ -123,8 +123,11 @@
-
-
+
+
+
+
+