mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
Merge branch 'develop'
This commit is contained in:
commit
13805f794a
11 changed files with 13 additions and 103 deletions
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
## Translation Status
|
## Translation Status
|
||||||
|
|
||||||
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-98.56%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.86%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-86.60%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-99.86%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-99.86%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
|
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-98.70%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-100.00%25-brightgreen)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-86.58%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-100.00%25-brightgreen)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
|
||||||
|
|
||||||
## How to Use
|
## How to Use
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
### de_DE.axaml: 98.56%
|
### de_DE.axaml: 98.70%
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Missing Keys</summary>
|
<summary>Missing Keys</summary>
|
||||||
|
|
||||||
- Text.CommitDetail.Info.Children
|
|
||||||
- Text.Diff.SaveAsPatch
|
- Text.Diff.SaveAsPatch
|
||||||
- Text.Diff.VisualLines.All
|
- Text.Diff.VisualLines.All
|
||||||
- Text.Hotkeys.Repo.CreateBranchOnCommit
|
- Text.Hotkeys.Repo.CreateBranchOnCommit
|
||||||
|
@ -17,17 +16,17 @@
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### es_ES.axaml: 99.86%
|
### es_ES.axaml: 100.00%
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Missing Keys</summary>
|
<summary>Missing Keys</summary>
|
||||||
|
|
||||||
- Text.CommitDetail.Info.Children
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### fr_FR.axaml: 86.60%
|
### fr_FR.axaml: 86.58%
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
@ -129,23 +128,23 @@
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### pt_BR.axaml: 99.86%
|
### pt_BR.axaml: 100.00%
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Missing Keys</summary>
|
<summary>Missing Keys</summary>
|
||||||
|
|
||||||
- Text.CommitDetail.Info.Children
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### ru_RU.axaml: 99.86%
|
### ru_RU.axaml: 100.00%
|
||||||
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Missing Keys</summary>
|
<summary>Missing Keys</summary>
|
||||||
|
|
||||||
- Text.CommitDetail.Info.Children
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
namespace SourceGit.Commands
|
|
||||||
{
|
|
||||||
public class QueryCommitChildren : Command
|
|
||||||
{
|
|
||||||
public QueryCommitChildren(string repo, string sha)
|
|
||||||
{
|
|
||||||
WorkingDirectory = repo;
|
|
||||||
Context = repo;
|
|
||||||
_sha = sha;
|
|
||||||
Args = $"rev-list --children --all {sha}^..";
|
|
||||||
}
|
|
||||||
|
|
||||||
public string[] Result()
|
|
||||||
{
|
|
||||||
var rs = ReadToEnd();
|
|
||||||
if (!rs.IsSuccess)
|
|
||||||
return [];
|
|
||||||
|
|
||||||
int start = rs.StdOut.IndexOf($"\n{_sha}");
|
|
||||||
if (start != -1)
|
|
||||||
{
|
|
||||||
int end = rs.StdOut.IndexOf('\n', start + 1);
|
|
||||||
if (end == -1)
|
|
||||||
end = rs.StdOut.Length;
|
|
||||||
start = rs.StdOut.IndexOf(' ', start);
|
|
||||||
if (start != -1 && start < end)
|
|
||||||
return rs.StdOut.Substring(start + 1, end - start - 1).Split(' ', System.StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
}
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
private string _sha;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -125,7 +125,6 @@
|
||||||
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">INFORMATION</x:String>
|
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">INFORMATION</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">AUTHOR</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">AUTHOR</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">CHANGED</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">CHANGED</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Children" xml:space="preserve">CHILDREN</x:String>
|
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">COMMITTER</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">COMMITTER</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">Check refs that contains this commit</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">Check refs that contains this commit</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">COMMIT IS CONTAINED BY</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">COMMIT IS CONTAINED BY</x:String>
|
||||||
|
|
|
@ -118,7 +118,6 @@
|
||||||
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">INFORMATIONS</x:String>
|
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">INFORMATIONS</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">AUTEUR</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">AUTEUR</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">CHANGÉ</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">CHANGÉ</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Children" xml:space="preserve">ENFANTS</x:String>
|
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">COMMITTER</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">COMMITTER</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">Vérifier les références contenant ce commit</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">Vérifier les références contenant ce commit</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">LE COMMIT EST CONTENU PAR</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">LE COMMIT EST CONTENU PAR</x:String>
|
||||||
|
|
|
@ -128,7 +128,6 @@
|
||||||
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">基本信息</x:String>
|
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">基本信息</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">修改者</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">修改者</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">变更列表</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">变更列表</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Children" xml:space="preserve">子提交</x:String>
|
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">提交者</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">提交者</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">查看包含此提交的分支/标签</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">查看包含此提交的分支/标签</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">本提交已被以下分支/标签包含</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">本提交已被以下分支/标签包含</x:String>
|
||||||
|
|
|
@ -128,7 +128,6 @@
|
||||||
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">基本資訊</x:String>
|
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">基本資訊</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">作者</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">作者</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">變更列表</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">變更列表</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Children" xml:space="preserve">子提交</x:String>
|
|
||||||
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">提交者</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">提交者</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">檢視包含此提交的分支或標籤</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">檢視包含此提交的分支或標籤</x:String>
|
||||||
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">本提交包含於以下分支或標籤</x:String>
|
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">本提交包含於以下分支或標籤</x:String>
|
||||||
|
|
|
@ -78,12 +78,6 @@ namespace SourceGit.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AvaloniaList<string> Children
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
private set;
|
|
||||||
} = new AvaloniaList<string>();
|
|
||||||
|
|
||||||
public string SearchChangeFilter
|
public string SearchChangeFilter
|
||||||
{
|
{
|
||||||
get => _searchChangeFilter;
|
get => _searchChangeFilter;
|
||||||
|
@ -513,7 +507,6 @@ namespace SourceGit.ViewModels
|
||||||
VisibleChanges = null;
|
VisibleChanges = null;
|
||||||
SelectedChanges = null;
|
SelectedChanges = null;
|
||||||
ViewRevisionFileContent = null;
|
ViewRevisionFileContent = null;
|
||||||
Children.Clear();
|
|
||||||
|
|
||||||
if (_commit == null)
|
if (_commit == null)
|
||||||
return;
|
return;
|
||||||
|
@ -530,12 +523,6 @@ namespace SourceGit.ViewModels
|
||||||
Dispatcher.UIThread.Invoke(() => SignInfo = signInfo);
|
Dispatcher.UIThread.Invoke(() => SignInfo = signInfo);
|
||||||
});
|
});
|
||||||
|
|
||||||
Task.Run(() =>
|
|
||||||
{
|
|
||||||
var children = new Commands.QueryCommitChildren(_repo.FullPath, _commit.SHA).Result();
|
|
||||||
Dispatcher.UIThread.Invoke(() => Children.AddRange(children));
|
|
||||||
});
|
|
||||||
|
|
||||||
if (_cancelToken != null)
|
if (_cancelToken != null)
|
||||||
_cancelToken.Requested = true;
|
_cancelToken.Requested = true;
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
<Rectangle Height=".65" Margin="8" Fill="{DynamicResource Brush.Border2}" VerticalAlignment="Center"/>
|
<Rectangle Height=".65" Margin="8" Fill="{DynamicResource Brush.Border2}" VerticalAlignment="Center"/>
|
||||||
|
|
||||||
<!-- Base Information -->
|
<!-- Base Information -->
|
||||||
<Grid RowDefinitions="24,Auto,Auto,Auto,Auto" ColumnDefinitions="96,*">
|
<Grid RowDefinitions="24,Auto,Auto,Auto" ColumnDefinitions="96,*">
|
||||||
<!-- SHA -->
|
<!-- SHA -->
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.SHA}" />
|
<TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.SHA}" />
|
||||||
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
|
||||||
|
@ -122,37 +122,9 @@
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
<!-- CHILDREN -->
|
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
||||||
Classes="info_label"
|
|
||||||
Text="{DynamicResource Text.CommitDetail.Info.Children}"
|
|
||||||
IsVisible="{Binding #ThisControl.Children.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"/>
|
|
||||||
<ItemsControl Grid.Row="2" Grid.Column="1"
|
|
||||||
Height="24" Margin="12,0,0,0"
|
|
||||||
ItemsSource="{Binding #ThisControl.Children}"
|
|
||||||
IsVisible="{Binding #ThisControl.Children.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center"/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Classes="primary"
|
|
||||||
Text="{Binding Converter={x:Static c:StringConverters.ToShortSHA}}"
|
|
||||||
Foreground="DarkOrange"
|
|
||||||
TextDecorations="Underline"
|
|
||||||
Cursor="Hand"
|
|
||||||
Margin="0,0,16,0"
|
|
||||||
PointerPressed="OnSHAPressed"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
|
|
||||||
<!-- REFS -->
|
<!-- REFS -->
|
||||||
<TextBlock Grid.Row="3" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Refs}" IsVisible="{Binding HasDecorators}"/>
|
<TextBlock Grid.Row="2" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Refs}" IsVisible="{Binding HasDecorators}"/>
|
||||||
<Border Grid.Row="3" Grid.Column="1" Margin="12,0,0,0" Height="24" IsVisible="{Binding HasDecorators}">
|
<Border Grid.Row="2" Grid.Column="1" Margin="12,0,0,0" Height="24" IsVisible="{Binding HasDecorators}">
|
||||||
<v:CommitRefsPresenter TagBackground="{DynamicResource Brush.DecoratorTag}"
|
<v:CommitRefsPresenter TagBackground="{DynamicResource Brush.DecoratorTag}"
|
||||||
Foreground="{DynamicResource Brush.FG1}"
|
Foreground="{DynamicResource Brush.FG1}"
|
||||||
FontFamily="{DynamicResource Fonts.Primary}"
|
FontFamily="{DynamicResource Fonts.Primary}"
|
||||||
|
@ -162,7 +134,7 @@
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Messages -->
|
<!-- Messages -->
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Message}" VerticalAlignment="Top" Margin="0,4,0,0" />
|
<TextBlock Grid.Row="3" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Message}" VerticalAlignment="Top" Margin="0,4,0,0" />
|
||||||
<v:CommitMessagePresenter Grid.Row="4" Grid.Column="1"
|
<v:CommitMessagePresenter Grid.Row="4" Grid.Column="1"
|
||||||
Margin="12,5,8,0"
|
Margin="12,5,8,0"
|
||||||
Classes="primary"
|
Classes="primary"
|
||||||
|
|
|
@ -53,15 +53,6 @@ namespace SourceGit.Views
|
||||||
set => SetValue(IssueTrackerRulesProperty, value);
|
set => SetValue(IssueTrackerRulesProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly StyledProperty<AvaloniaList<string>> ChildrenProperty =
|
|
||||||
AvaloniaProperty.Register<CommitBaseInfo, AvaloniaList<string>>(nameof(Children));
|
|
||||||
|
|
||||||
public AvaloniaList<string> Children
|
|
||||||
{
|
|
||||||
get => GetValue(ChildrenProperty);
|
|
||||||
set => SetValue(ChildrenProperty, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CommitBaseInfo()
|
public CommitBaseInfo()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
SignInfo="{Binding SignInfo}"
|
SignInfo="{Binding SignInfo}"
|
||||||
SupportsContainsIn="True"
|
SupportsContainsIn="True"
|
||||||
WebLinks="{Binding WebLinks}"
|
WebLinks="{Binding WebLinks}"
|
||||||
Children="{Binding Children}"
|
|
||||||
IssueTrackerRules="{Binding IssueTrackerRules}"/>
|
IssueTrackerRules="{Binding IssueTrackerRules}"/>
|
||||||
|
|
||||||
<!-- Line -->
|
<!-- Line -->
|
||||||
|
|
Loading…
Reference in a new issue