diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 204c1afb..5d7acac8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: build-windows: name: Build Windows x64 - runs-on: windows-latest + runs-on: windows-2019 steps: - name: Checkout sources uses: actions/checkout@v4 @@ -30,7 +30,7 @@ jobs: path: publish build-macos-intel: name: Build macOS (Intel) - runs-on: macos-latest + runs-on: macos-13 steps: - name: Checkout sources uses: actions/checkout@v4 @@ -76,7 +76,7 @@ jobs: path: sourcegit.osx-arm64.tar build-linux: name: Build Linux - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout sources uses: actions/checkout@v4 diff --git a/README.md b/README.md index 2ea6ebec..b03e707c 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Opensource Git GUI client. You can download the latest stable from [Releases](https://github.com/sourcegit-scm/sourcegit/releases/latest) or download workflow artifacts from [Github Actions](https://github.com/sourcegit-scm/sourcegit/actions) to try this app based on latest commits. -This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationData}/SourceGit"`, which is platform-dependent, to store user settings, downloaded avatars and crash logs. +This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationData}/SourceGit"`, which is platform-dependent, to store user settings, downloaded avatars and crash logs. | OS | PATH | |---------|-------------------------------------------------| @@ -52,8 +52,16 @@ This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationD For **Windows** users: * **MSYS Git is NOT supported**. Please use official [Git for Windows](https://git-scm.com/download/win) instead. -* You can install the latest stable by `winget install SourceGit`. - - Note: `winget` will install this software as a commandline tool. You need run `SourceGit` from console or `Win+R` at the first time. Then you can add it to the taskbar. +* You can install the latest stable from `winget` with follow commands: + ```shell + winget install SourceGit + ``` + > `winget` will install this software as a commandline tool. You need run `SourceGit` from console or `Win+R` at the first time. Then you can add it to the taskbar. +* You can install the latest stable by `scoope` with follow commands: + ```shell + scoop bucket add extras + scoop install sourcegit + ``` * Portable versions can be found in [Releases](https://github.com/sourcegit-scm/sourcegit/releases/latest) For **macOS** users: @@ -68,7 +76,7 @@ For **Linux** users: * `xdg-open` must be installed to support open native file manager. * Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your linux. -* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI. +* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI. ## External Tools @@ -82,7 +90,7 @@ This app supports open repository in external tools listed in the table below. | JetBrains Fleet | YES | YES | YES | FLEET_PATH | | Sublime Text | YES | YES | YES | SUBLIME_TEXT_PATH | -* You can set the given environment variable for special tool if it can NOT be found by this app automatically. +* You can set the given environment variable for special tool if it can NOT be found by this app automatically. * Installing `JetBrains Toolbox` will help this app to find other JetBrains tools installed on your device. * On macOS, you may need to use `launchctl setenv` to make sure the app can read these environment variables. @@ -90,15 +98,15 @@ This app supports open repository in external tools listed in the table below. * Dark Theme -![Theme Dark](./screenshots/theme_dark.png) + ![Theme Dark](./screenshots/theme_dark.png) * Light Theme -![Theme Light](./screenshots/theme_light.png) + ![Theme Light](./screenshots/theme_light.png) -* Custom Themes +* Custom -You can find custom themes from [sourcegit-theme](https://github.com/sourcegit-scm/sourcegit-theme.git) + You can find custom themes from [sourcegit-theme](https://github.com/sourcegit-scm/sourcegit-theme.git) ## Contributing diff --git a/VERSION b/VERSION index 3a580d88..721f4dd5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.21 \ No newline at end of file +8.22 \ No newline at end of file diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 67bd3aad..7abf8293 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -188,6 +188,8 @@ namespace SourceGit else Models.CommitGraph.SetDefaultPens(overrides.GraphPenThickness); + Models.Commit.OpacityForNotMerged = overrides.OpacityForNotMergedCommits; + app.Resources.MergedDictionaries.Add(resDic); app._themeOverrides = resDic; } diff --git a/src/Commands/Diff.cs b/src/Commands/Diff.cs index aaa6e125..56c924e5 100644 --- a/src/Commands/Diff.cs +++ b/src/Commands/Diff.cs @@ -14,6 +14,11 @@ namespace SourceGit.Commands public Diff(string repo, Models.DiffOption opt, int unified) { + _result.TextDiff = new Models.TextDiff() { + Repo = repo, + Option = opt, + }; + WorkingDirectory = repo; Context = repo; Args = $"diff --ignore-cr-at-eol --unified={unified} {opt}"; @@ -214,7 +219,7 @@ namespace SourceGit.Commands } } - private readonly Models.DiffResult _result = new Models.DiffResult() { TextDiff = new Models.TextDiff() }; + private readonly Models.DiffResult _result = new Models.DiffResult(); private readonly List _deleted = new List(); private readonly List _added = new List(); private int _oldLine = 0; diff --git a/src/Commands/GC.cs b/src/Commands/GC.cs index f40b665c..61735f53 100644 --- a/src/Commands/GC.cs +++ b/src/Commands/GC.cs @@ -10,7 +10,7 @@ namespace SourceGit.Commands WorkingDirectory = repo; Context = repo; TraitErrorAsOutput = true; - Args = "gc"; + Args = "gc --prune"; } protected override void OnReadline(string line) diff --git a/src/Commands/QueryBranches.cs b/src/Commands/QueryBranches.cs index 9200db4b..c55d6760 100644 --- a/src/Commands/QueryBranches.cs +++ b/src/Commands/QueryBranches.cs @@ -24,20 +24,8 @@ namespace SourceGit.Commands { Exec(); - foreach (var b in _branches) - { - if (b.IsLocal && !string.IsNullOrEmpty(b.UpstreamTrackStatus)) - { - if (b.UpstreamTrackStatus == "=") - { - b.UpstreamTrackStatus = string.Empty; - } - else - { - b.UpstreamTrackStatus = ParseTrackStatus(b.Name, b.Upstream); - } - } - } + foreach (var b in _needQueryTrackStatus) + b.TrackStatus = new QueryTrackStatus(WorkingDirectory, b.Name, b.Upstream).Result(); return _branches; } @@ -84,35 +72,16 @@ namespace SourceGit.Commands branch.Head = parts[1]; branch.IsCurrent = parts[2] == "*"; branch.Upstream = parts[3]; - branch.UpstreamTrackStatus = parts[4]; + + if (branch.IsLocal && !parts[4].Equals("=", StringComparison.Ordinal)) + _needQueryTrackStatus.Add(branch); + else + branch.TrackStatus = new Models.BranchTrackStatus(); + _branches.Add(branch); } - private string ParseTrackStatus(string local, string upstream) - { - var cmd = new Command(); - cmd.WorkingDirectory = WorkingDirectory; - cmd.Context = Context; - cmd.Args = $"rev-list --left-right --count {local}...{upstream}"; - - var rs = cmd.ReadToEnd(); - if (!rs.IsSuccess) - return string.Empty; - - var match = REG_AHEAD_BEHIND().Match(rs.StdOut); - if (!match.Success) - return string.Empty; - - var ahead = int.Parse(match.Groups[1].Value); - var behind = int.Parse(match.Groups[2].Value); - var track = ""; - if (ahead > 0) - track += $"{ahead}↑"; - if (behind > 0) - track += $" {behind}↓"; - return track.Trim(); - } - private readonly List _branches = new List(); + private List _needQueryTrackStatus = new List(); } } diff --git a/src/Commands/QueryCommits.cs b/src/Commands/QueryCommits.cs index 66a1ee28..ef80566e 100644 --- a/src/Commands/QueryCommits.cs +++ b/src/Commands/QueryCommits.cs @@ -14,20 +14,29 @@ namespace SourceGit.Commands _findFirstMerged = needFindHead; } - public QueryCommits(string repo, int maxCount, string messageFilter) + public QueryCommits(string repo, int maxCount, string messageFilter, bool isFile) { - var argsBuilder = new StringBuilder(); - var words = messageFilter.Split(new[] { ' ', '\t', '\r' }, StringSplitOptions.RemoveEmptyEntries); - foreach (var word in words) + string search; + if (isFile) { - var escaped = word.Trim().Replace("\"", "\\\"", StringComparison.Ordinal); - argsBuilder.Append($"--grep=\"{escaped}\" "); + search = $"-- \"{messageFilter}\""; + } + else + { + var argsBuilder = new StringBuilder(); + var words = messageFilter.Split(new[] { ' ', '\t', '\r' }, StringSplitOptions.RemoveEmptyEntries); + foreach (var word in words) + { + var escaped = word.Trim().Replace("\"", "\\\"", StringComparison.Ordinal); + argsBuilder.Append($"--grep=\"{escaped}\" "); + } + argsBuilder.Append("--all-match -i"); + search = argsBuilder.ToString(); } - argsBuilder.Append("--all-match"); WorkingDirectory = repo; Context = repo; - Args = $"log -{maxCount} --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s " + argsBuilder.ToString(); + Args = $"log -{maxCount} --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s --branches --remotes " + search; _findFirstMerged = false; } @@ -53,7 +62,9 @@ namespace SourceGit.Commands ParseParent(line); break; case 2: - ParseDecorators(line); + _current.ParseDecorators(line); + if (_current.IsMerged && !_isHeadFounded) + _isHeadFounded = true; break; case 3: _current.Author = Models.User.FindOrAdd(line); @@ -104,74 +115,6 @@ namespace SourceGit.Commands _current.Parents.Add(data.Substring(idx + 1)); } - private void ParseDecorators(string data) - { - if (data.Length < 3) - return; - - var subs = data.Split(',', StringSplitOptions.RemoveEmptyEntries); - foreach (var sub in subs) - { - var d = sub.Trim(); - if (d.EndsWith("/HEAD", StringComparison.Ordinal)) - continue; - - if (d.StartsWith("tag: refs/tags/", StringComparison.Ordinal)) - { - _current.Decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.Tag, - Name = d.Substring(15), - }); - } - else if (d.StartsWith("HEAD -> refs/heads/", StringComparison.Ordinal)) - { - _current.IsMerged = true; - _current.Decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.CurrentBranchHead, - Name = d.Substring(19), - }); - } - else if (d.Equals("HEAD")) - { - _current.IsMerged = true; - _current.Decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.CurrentCommitHead, - Name = d, - }); - } - else if (d.StartsWith("refs/heads/", StringComparison.Ordinal)) - { - _current.Decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.LocalBranchHead, - Name = d.Substring(11), - }); - } - else if (d.StartsWith("refs/remotes/", StringComparison.Ordinal)) - { - _current.Decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.RemoteBranchHead, - Name = d.Substring(13), - }); - } - } - - _current.Decorators.Sort((l, r) => - { - if (l.Type != r.Type) - return (int)l.Type - (int)r.Type; - else - return string.Compare(l.Name, r.Name, StringComparison.Ordinal); - }); - - if (_current.IsMerged && !_isHeadFounded) - _isHeadFounded = true; - } - private void MarkFirstMerged() { Args = $"log --since=\"{_commits[^1].CommitterTimeStr}\" --format=\"%H\""; diff --git a/src/Commands/QuerySingleCommit.cs b/src/Commands/QuerySingleCommit.cs index f65b6ce1..eef08b7e 100644 --- a/src/Commands/QuerySingleCommit.cs +++ b/src/Commands/QuerySingleCommit.cs @@ -26,7 +26,7 @@ namespace SourceGit.Commands if (!string.IsNullOrEmpty(lines[1])) commit.Parents.AddRange(lines[1].Split(' ', StringSplitOptions.RemoveEmptyEntries)); if (!string.IsNullOrEmpty(lines[2])) - commit.IsMerged = ParseDecorators(commit.Decorators, lines[2]); + commit.ParseDecorators(lines[2]); commit.Author = Models.User.FindOrAdd(lines[3]); commit.AuthorTime = ulong.Parse(lines[4]); commit.Committer = Models.User.FindOrAdd(lines[5]); @@ -39,70 +39,6 @@ namespace SourceGit.Commands return null; } - private bool ParseDecorators(List decorators, string data) - { - bool isHeadOfCurrent = false; - - var subs = data.Split(',', StringSplitOptions.RemoveEmptyEntries); - foreach (var sub in subs) - { - var d = sub.Trim(); - if (d.EndsWith("/HEAD", StringComparison.Ordinal)) - continue; - - if (d.StartsWith("tag: refs/tags/", StringComparison.Ordinal)) - { - decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.Tag, - Name = d.Substring(15), - }); - } - else if (d.StartsWith("HEAD -> refs/heads/", StringComparison.Ordinal)) - { - isHeadOfCurrent = true; - decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.CurrentBranchHead, - Name = d.Substring(19), - }); - } - else if (d.Equals("HEAD")) - { - isHeadOfCurrent = true; - decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.CurrentCommitHead, - Name = d, - }); - } - else if (d.StartsWith("refs/heads/", StringComparison.Ordinal)) - { - decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.LocalBranchHead, - Name = d.Substring(11), - }); - } - else if (d.StartsWith("refs/remotes/", StringComparison.Ordinal)) - { - decorators.Add(new Models.Decorator() - { - Type = Models.DecoratorType.RemoteBranchHead, - Name = d.Substring(13), - }); - } - } - - decorators.Sort((l, r) => - { - if (l.Type != r.Type) - return (int)l.Type - (int)r.Type; - else - return string.Compare(l.Name, r.Name, StringComparison.Ordinal); - }); - - return isHeadOfCurrent; - } + } } diff --git a/src/Commands/QueryTrackStatus.cs b/src/Commands/QueryTrackStatus.cs new file mode 100644 index 00000000..ce8e4d0e --- /dev/null +++ b/src/Commands/QueryTrackStatus.cs @@ -0,0 +1,34 @@ +using System; + +namespace SourceGit.Commands +{ + public class QueryTrackStatus : Command + { + public QueryTrackStatus(string repo, string local, string upstream) + { + WorkingDirectory = repo; + Context = repo; + Args = $"rev-list --left-right {local}...{upstream}"; + } + + public Models.BranchTrackStatus Result() + { + var status = new Models.BranchTrackStatus(); + + var rs = ReadToEnd(); + if (!rs.IsSuccess) + return status; + + var lines = rs.StdOut.Split(['\n', '\r'], StringSplitOptions.RemoveEmptyEntries); + foreach (var line in lines) + { + if (line[0] == '>') + status.Behind.Add(line.Substring(1)); + else + status.Ahead.Add(line.Substring(1)); + } + + return status; + } + } +} diff --git a/src/Converters/BookmarkConverters.cs b/src/Converters/BookmarkConverters.cs index 9896d9aa..ea755a00 100644 --- a/src/Converters/BookmarkConverters.cs +++ b/src/Converters/BookmarkConverters.cs @@ -1,4 +1,6 @@ -using Avalonia.Data.Converters; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Data.Converters; using Avalonia.Media; namespace SourceGit.Converters @@ -6,9 +8,12 @@ namespace SourceGit.Converters public static class BookmarkConverters { public static readonly FuncValueConverter ToBrush = - new FuncValueConverter(bookmark => Models.Bookmarks.Brushes[bookmark]); - - public static readonly FuncValueConverter ToStrokeThickness = - new FuncValueConverter(bookmark => bookmark == 0 ? 1.0 : 0); + new FuncValueConverter(bookmark => + { + if (bookmark == 0) + return Application.Current?.FindResource("Brush.FG1") as IBrush; + else + return Models.Bookmarks.Brushes[bookmark]; + }); } } diff --git a/src/Converters/BoolConverters.cs b/src/Converters/BoolConverters.cs index 2eb8c60a..2d738700 100644 --- a/src/Converters/BoolConverters.cs +++ b/src/Converters/BoolConverters.cs @@ -1,5 +1,4 @@ using Avalonia.Data.Converters; -using Avalonia.Media; namespace SourceGit.Converters { @@ -7,11 +6,5 @@ namespace SourceGit.Converters { public static readonly FuncValueConverter ToPageTabWidth = new FuncValueConverter(x => x ? 200 : double.NaN); - - public static readonly FuncValueConverter HalfIfFalse = - new FuncValueConverter(x => x ? 1 : 0.5); - - public static readonly FuncValueConverter BoldIfTrue = - new FuncValueConverter(x => x ? FontWeight.Bold : FontWeight.Regular); } } diff --git a/src/Models/Branch.cs b/src/Models/Branch.cs index 07f5374e..f6742d5b 100644 --- a/src/Models/Branch.cs +++ b/src/Models/Branch.cs @@ -1,5 +1,26 @@ -namespace SourceGit.Models +using System.Collections.Generic; + +namespace SourceGit.Models { + public class BranchTrackStatus + { + public List Ahead { get; set; } = new List(); + public List Behind { get; set; } = new List(); + + public override string ToString() + { + if (Ahead.Count == 0 && Behind.Count == 0) + return string.Empty; + + var track = ""; + if (Ahead.Count > 0) + track += $"{Ahead.Count}↑"; + if (Behind.Count > 0) + track += $" {Behind.Count}↓"; + return track.Trim(); + } + } + public class Branch { public string Name { get; set; } @@ -8,7 +29,7 @@ public bool IsLocal { get; set; } public bool IsCurrent { get; set; } public string Upstream { get; set; } - public string UpstreamTrackStatus { get; set; } + public BranchTrackStatus TrackStatus { get; set; } public string Remote { get; set; } public bool IsHead { get; set; } diff --git a/src/Models/Commit.cs b/src/Models/Commit.cs index 30c2c499..38436fe3 100644 --- a/src/Models/Commit.cs +++ b/src/Models/Commit.cs @@ -2,11 +2,18 @@ using System.Collections.Generic; using Avalonia; +using Avalonia.Media; namespace SourceGit.Models { public class Commit { + public static double OpacityForNotMerged + { + get; + set; + } = 0.65; + public string SHA { get; set; } = string.Empty; public User Author { get; set; } = User.Invalid; public ulong AuthorTime { get; set; } = 0; @@ -16,7 +23,10 @@ namespace SourceGit.Models public List Parents { get; set; } = new List(); public List Decorators { get; set; } = new List(); public bool HasDecorators => Decorators.Count > 0; + public bool IsMerged { get; set; } = false; + public bool CanPushToUpstream { get; set; } = false; + public bool CanPullFromUpstream { get; set; } = false; public Thickness Margin { get; set; } = new Thickness(0); public string AuthorTimeStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString("yyyy/MM/dd HH:mm:ss"); @@ -25,5 +35,73 @@ namespace SourceGit.Models public bool IsCommitterVisible => !Author.Equals(Committer) || AuthorTime != CommitterTime; public bool IsCurrentHead => Decorators.Find(x => x.Type is DecoratorType.CurrentBranchHead or DecoratorType.CurrentCommitHead) != null; + + public double Opacity => IsMerged ? 1 : OpacityForNotMerged; + public FontWeight FontWeight => IsCurrentHead ? FontWeight.Bold : FontWeight.Regular; + + public void ParseDecorators(string data) + { + if (data.Length < 3) + return; + + var subs = data.Split(',', StringSplitOptions.RemoveEmptyEntries); + foreach (var sub in subs) + { + var d = sub.Trim(); + if (d.EndsWith("/HEAD", StringComparison.Ordinal)) + continue; + + if (d.StartsWith("tag: refs/tags/", StringComparison.Ordinal)) + { + Decorators.Add(new Decorator() + { + Type = DecoratorType.Tag, + Name = d.Substring(15), + }); + } + else if (d.StartsWith("HEAD -> refs/heads/", StringComparison.Ordinal)) + { + IsMerged = true; + Decorators.Add(new Decorator() + { + Type = DecoratorType.CurrentBranchHead, + Name = d.Substring(19), + }); + } + else if (d.Equals("HEAD")) + { + IsMerged = true; + Decorators.Add(new Decorator() + { + Type = DecoratorType.CurrentCommitHead, + Name = d, + }); + } + else if (d.StartsWith("refs/heads/", StringComparison.Ordinal)) + { + Decorators.Add(new Decorator() + { + Type = DecoratorType.LocalBranchHead, + Name = d.Substring(11), + }); + } + else if (d.StartsWith("refs/remotes/", StringComparison.Ordinal)) + { + Decorators.Add(new Decorator() + { + Type = DecoratorType.RemoteBranchHead, + Name = d.Substring(13), + }); + } + } + + Decorators.Sort((l, r) => + { + if (l.Type != r.Type) + return (int)l.Type - (int)r.Type; + else + return string.Compare(l.Name, r.Name, StringComparison.Ordinal); + }); + } } } diff --git a/src/Models/CommitGraph.cs b/src/Models/CommitGraph.cs index 6f371594..c5c66482 100644 --- a/src/Models/CommitGraph.cs +++ b/src/Models/CommitGraph.cs @@ -128,7 +128,7 @@ namespace SourceGit.Models _penCount = colors.Count; } - public static CommitGraph Parse(List commits) + public static CommitGraph Parse(List commits, HashSet canPushCommits, HashSet canPullCommits) { double UNIT_WIDTH = 12; double HALF_WIDTH = 6; @@ -148,6 +148,9 @@ namespace SourceGit.Models var isMerged = commit.IsMerged; var oldCount = unsolved.Count; + commit.CanPushToUpstream = canPushCommits.Remove(commit.SHA); + commit.CanPullFromUpstream = canPullCommits.Remove(commit.SHA); + // Update current y offset offsetY += UNIT_HEIGHT; diff --git a/src/Models/DiffResult.cs b/src/Models/DiffResult.cs index a625fc7b..500ff549 100644 --- a/src/Models/DiffResult.cs +++ b/src/Models/DiffResult.cs @@ -66,6 +66,83 @@ namespace SourceGit.Models public Vector SyncScrollOffset { get; set; } = Vector.Zero; public int MaxLineNumber = 0; + public string Repo { get; set; } = null; + public DiffOption Option { get; set; } = null; + + public TextDiffSelection MakeSelection(int startLine, int endLine, bool isCombined, bool isOldSide) + { + var rs = new TextDiffSelection(); + rs.StartLine = startLine; + rs.EndLine = endLine; + + for (int i = 0; i < startLine - 1; i++) + { + var line = Lines[i]; + if (line.Type == TextDiffLineType.Added) + { + rs.HasLeftChanges = true; + rs.IgnoredAdds++; + } + else if (line.Type == TextDiffLineType.Deleted) + { + rs.HasLeftChanges = true; + rs.IgnoredDeletes++; + } + } + + for (int i = startLine - 1; i < endLine; i++) + { + var line = Lines[i]; + if (line.Type == TextDiffLineType.Added) + { + if (isCombined) + { + rs.HasChanges = true; + break; + } + else if (isOldSide) + { + rs.HasLeftChanges = true; + } + else + { + rs.HasChanges = true; + } + } + else if (line.Type == TextDiffLineType.Deleted) + { + if (isCombined) + { + rs.HasChanges = true; + break; + } + else if (isOldSide) + { + rs.HasChanges = true; + } + else + { + rs.HasLeftChanges = true; + } + } + } + + if (!rs.HasLeftChanges) + { + for (int i = endLine; i < Lines.Count; i++) + { + var line = Lines[i]; + if (line.Type == TextDiffLineType.Added || line.Type == TextDiffLineType.Deleted) + { + rs.HasLeftChanges = true; + break; + } + } + } + + return rs; + } + public void GenerateNewPatchFromSelection(Change change, string fileBlobGuid, TextDiffSelection selection, bool revert, string output) { var isTracked = !string.IsNullOrEmpty(fileBlobGuid); @@ -389,9 +466,6 @@ namespace SourceGit.Models System.IO.File.WriteAllText(output, builder.ToString()); } - [GeneratedRegex(@"^@@ \-(\d+),?\d* \+(\d+),?\d* @@")] - private static partial Regex REG_INDICATOR(); - private bool ProcessIndicatorForPatch(StringBuilder builder, TextDiffLine indicator, int idx, int start, int end, int ignoreRemoves, int ignoreAdds, bool revert, bool tailed) { var match = REG_INDICATOR().Match(indicator.Content); @@ -551,6 +625,9 @@ namespace SourceGit.Models builder.Append($"\n@@ -{oldStart},{oldCount} +{newStart},{newCount} @@"); return true; } + + [GeneratedRegex(@"^@@ \-(\d+),?\d* \+(\d+),?\d* @@")] + private static partial Regex REG_INDICATOR(); } public class LFSDiff diff --git a/src/Models/ThemeOverrides.cs b/src/Models/ThemeOverrides.cs index e14b1f1a..ccd9f57e 100644 --- a/src/Models/ThemeOverrides.cs +++ b/src/Models/ThemeOverrides.cs @@ -8,6 +8,7 @@ namespace SourceGit.Models { public Dictionary BasicColors { get; set; } = new Dictionary(); public double GraphPenThickness { get; set; } = 2; + public double OpacityForNotMergedCommits { get; set; } = 0.5; public List GraphColors { get; set; } = new List(); } } diff --git a/src/Models/Watcher.cs b/src/Models/Watcher.cs index 2a1c4cc6..f8aacecb 100644 --- a/src/Models/Watcher.cs +++ b/src/Models/Watcher.cs @@ -164,7 +164,7 @@ namespace SourceGit.Models private void OnRepositoryChanged(object o, FileSystemEventArgs e) { - if (string.IsNullOrEmpty(e.Name)) + if (string.IsNullOrEmpty(e.Name) || e.Name.EndsWith(".lock", StringComparison.Ordinal)) return; var name = e.Name.Replace("\\", "/"); diff --git a/src/Resources/ExternalToolIcons/JetBrains/CL.png b/src/Resources/ExternalToolIcons/JetBrains/CL.png index 834a4120..9d9cf6bd 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/CL.png and b/src/Resources/ExternalToolIcons/JetBrains/CL.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/DB.png b/src/Resources/ExternalToolIcons/JetBrains/DB.png index 44d4f73d..c7326287 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/DB.png and b/src/Resources/ExternalToolIcons/JetBrains/DB.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/DL.png b/src/Resources/ExternalToolIcons/JetBrains/DL.png index 3610740f..2715c1dd 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/DL.png and b/src/Resources/ExternalToolIcons/JetBrains/DL.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/DS.png b/src/Resources/ExternalToolIcons/JetBrains/DS.png index f969b98b..417f8337 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/DS.png and b/src/Resources/ExternalToolIcons/JetBrains/DS.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/GO.png b/src/Resources/ExternalToolIcons/JetBrains/GO.png index 83cc84f7..744938fc 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/GO.png and b/src/Resources/ExternalToolIcons/JetBrains/GO.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/IC.png b/src/Resources/ExternalToolIcons/JetBrains/IC.png deleted file mode 100644 index 243c4a38..00000000 Binary files a/src/Resources/ExternalToolIcons/JetBrains/IC.png and /dev/null differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/IU.png b/src/Resources/ExternalToolIcons/JetBrains/IU.png deleted file mode 100644 index 243c4a38..00000000 Binary files a/src/Resources/ExternalToolIcons/JetBrains/IU.png and /dev/null differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/JB.png b/src/Resources/ExternalToolIcons/JetBrains/JB.png index 85ead673..e9a3d1c0 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/JB.png and b/src/Resources/ExternalToolIcons/JetBrains/JB.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/PC.png b/src/Resources/ExternalToolIcons/JetBrains/PC.png index 1755f7de..38ae8274 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/PC.png and b/src/Resources/ExternalToolIcons/JetBrains/PC.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/PS.png b/src/Resources/ExternalToolIcons/JetBrains/PS.png index b988ddde..e5e2ceaf 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/PS.png and b/src/Resources/ExternalToolIcons/JetBrains/PS.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/PY.png b/src/Resources/ExternalToolIcons/JetBrains/PY.png index 1755f7de..38ae8274 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/PY.png and b/src/Resources/ExternalToolIcons/JetBrains/PY.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/QA.png b/src/Resources/ExternalToolIcons/JetBrains/QA.png index 9b45d085..499b2eff 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/QA.png and b/src/Resources/ExternalToolIcons/JetBrains/QA.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/QD.png b/src/Resources/ExternalToolIcons/JetBrains/QD.png index 109ac1ef..225f3652 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/QD.png and b/src/Resources/ExternalToolIcons/JetBrains/QD.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/RD.png b/src/Resources/ExternalToolIcons/JetBrains/RD.png index 0732f09e..a2fa3d33 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/RD.png and b/src/Resources/ExternalToolIcons/JetBrains/RD.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/RM.png b/src/Resources/ExternalToolIcons/JetBrains/RM.png index b4815546..1adfa654 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/RM.png and b/src/Resources/ExternalToolIcons/JetBrains/RM.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/RR.png b/src/Resources/ExternalToolIcons/JetBrains/RR.png index 16c57d15..ee27634a 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/RR.png and b/src/Resources/ExternalToolIcons/JetBrains/RR.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/WRS.png b/src/Resources/ExternalToolIcons/JetBrains/WRS.png index 09a299f9..2d8f9c36 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/WRS.png and b/src/Resources/ExternalToolIcons/JetBrains/WRS.png differ diff --git a/src/Resources/ExternalToolIcons/JetBrains/WS.png b/src/Resources/ExternalToolIcons/JetBrains/WS.png index 80b1a23b..09dda1fc 100644 Binary files a/src/Resources/ExternalToolIcons/JetBrains/WS.png and b/src/Resources/ExternalToolIcons/JetBrains/WS.png differ diff --git a/src/Resources/ExternalToolIcons/git.png b/src/Resources/ExternalToolIcons/git.png index cbb908b9..a05a1322 100644 Binary files a/src/Resources/ExternalToolIcons/git.png and b/src/Resources/ExternalToolIcons/git.png differ diff --git a/src/Resources/Icons.axaml b/src/Resources/Icons.axaml index b070f132..724d0b85 100644 --- a/src/Resources/Icons.axaml +++ b/src/Resources/Icons.axaml @@ -1,10 +1,11 @@ - M715 254h-405l-58 57h520zm-492 86v201h578V340zm405 143h-29v-29H425v29h-29v-57h231v57zm-405 295h578V559H223zm174-133h231v57h-29v-29H425v29h-29v-57z + M296 392h64v64h-64zM296 582v160h128V582h-64v-62h-64v62zm80 48v64h-32v-64h32zM360 328h64v64h-64zM296 264h64v64h-64zM360 456h64v64h-64zM360 200h64v64h-64zM855 289 639 73c-6-6-14-9-23-9H192c-18 0-32 14-32 32v832c0 18 14 32 32 32h640c18 0 32-14 32-32V311c0-9-3-17-9-23zM790 326H602V138L790 326zm2 562H232V136h64v64h64v-64h174v216c0 23 19 42 42 42h216v494z M71 1024V0h661L953 219V1024H71zm808-731-220-219H145V951h735V293zM439 512h-220V219h220V512zm-74-219H292v146h74v-146zm0 512h74v73h-220v-73H292v-146H218V585h147v219zm294-366h74V512H512v-73h74v-146H512V219h147v219zm74 439H512V585h220v293zm-74-219h-74v146h74v-146z M128 256h192a64 64 0 110 128H128a64 64 0 110-128zm576 192h192a64 64 0 010 128h-192a64 64 0 010-128zm-576 192h192a64 64 0 010 128H128a64 64 0 010-128zm576 0h192a64 64 0 010 128h-192a64 64 0 010-128zm0-384h192a64 64 0 010 128h-192a64 64 0 010-128zM128 448h192a64 64 0 110 128H128a64 64 0 110-128zm384-320a64 64 0 0164 64v640a64 64 0 01-128 0V192a64 64 0 0164-64z - M800 928l-512 0 0-704 224 0 0 292 113-86 111 86 0-292 128 0 0 640c0 35-29 64-64 64zM625 388l-81 64 0-260 160 0 0 260-79-64zM192 160l0 32c0 18 14 32 32 32l32 0 0 704-32 0c-35 0-64-29-64-64l0-704c0-35 29-64 64-64l576 0c24 0 44 13 55 32l-631 0c-18 0-32 14-32 32z + M832 64H192c-18 0-32 14-32 32v832c0 18 14 32 32 32h640c18 0 32-14 32-32V96c0-18-14-32-32-32zM736 596 624 502 506 596V131h230v318z M757 226a143 143 0 00-55 276 96 96 0 01-88 59h-191a187 187 0 00-96 27V312a143 143 0 10-96 0v399a143 143 0 10103 2 96 96 0 0188-59h191a191 191 0 00187-151 143 143 0 00-43-279zM280 130a48 48 0 110 96 48 48 0 010-96zm0 764a48 48 0 110-96 48 48 0 010 96zM757 417a48 48 0 110-96 48 48 0 010 96z M896 128h-64V64c0-35-29-64-64-64s-64 29-64 64v64h-64c-35 0-64 29-64 64s29 64 64 64h64v64c0 35 29 64 64 64s64-29 64-64V256h64c35 0 64-29 64-64s-29-64-64-64zm-204 307C673 481 628 512 576 512H448c-47 0-90 13-128 35V372C394 346 448 275 448 192c0-106-86-192-192-192S64 86 64 192c0 83 54 154 128 180v280c-74 26-128 97-128 180c0 106 86 192 192 192s192-86 192-192c0-67-34-125-84-159c22-20 52-33 84-33h128c122 0 223-85 249-199c-19 4-37 7-57 7c-26 0-51-5-76-13zM256 128c35 0 64 29 64 64s-29 64-64 64s-64-29-64-64s29-64 64-64zm0 768c-35 0-64-29-64-64s29-64 64-64s64 29 64 64s-29 64-64 64z + M378 116l265 0 0 47-265 0 0-47ZM888 116 748 116l0 47 124 0c18 0 33 15 33 33l0 93L115 290l0-93c0-18 15-33 33-33l124 0 0-47L132 116c-35 0-64 29-64 64l0 714c0 35 29 64 64 64l757 0c35 0 64-29 64-64l-0-714C952 145 924 116 888 116zM905 337l0 540c0 18-15 33-33 33L148 910c-18 0-33-15-33-33L115 337 905 337zM301 65l47 0 0 170-47 0 0-170ZM673 65l47 0 0 170-47 0 0-170ZM358 548l0 231 53 0L411 459l-35 0-3 4c-18 26-41 49-70 68l-4 3 0 54 13-8C331 569 346 559 358 548zM618 727c-10 6-24 8-42 5-16-3-28-18-35-46l-2-9-48 13 2 8c6 30 18 52 36 65 17 13 36 20 55 21 3 0 7 0 10 0 15 0 28-2 40-7 14-6 27-13 37-23 10-10 18-22 23-37 5-14 8-28 8-42 1-14-1-27-4-39l-0-0c-3-12-8-24-15-36-7-13-19-23-35-30-15-7-31-11-47-11-11-0-23 1-36 5 4-15 8-32 11-52l114 0 0-49L536 464l-1 7c-25 116-32 145-33 150l-3 10 46 5 3-4c8-11 18-18 31-21 13-3 25-3 35-0 10 3 18 9 24 18 7 9 10 20 11 34 1 14-2 26-6 37C636 711 629 720 618 727z M512 597m-1 0a1 1 0 103 0a1 1 0 10-3 0ZM810 393 732 315 448 600 293 444 214 522l156 156 78 78 362-362z M529 511c115 0 212 79 239 185h224a62 62 0 017 123l-7 0-224 0a247 247 0 01-479 0H65a62 62 0 01-7-123l7-0h224a247 247 0 01239-185zm0 124a124 124 0 100 247 124 124 0 000-247zm0-618c32 0 58 24 61 55l0 7V206c89 11 165 45 225 103a74 74 0 0122 45l0 9v87a62 62 0 01-123 7l-0-7v-65l-6-4c-43-33-97-51-163-53l-17-0c-74 0-133 18-180 54l-6 4v65a62 62 0 01-55 61l-7 0a62 62 0 01-61-55l-0-7V362c0-20 8-39 23-53 60-58 135-92 224-103V79c0-34 28-62 62-62z M512 57c251 0 455 204 455 455S763 967 512 967 57 763 57 512 261 57 512 57zm181 274c-11-11-29-11-40 0L512 472 371 331c-11-11-29-11-40 0-11 11-11 29 0 40L471 512 331 653c-11 11-11 29 0 40 11 11 29 11 40 0l141-141 141 141c11 11 29 11 40 0 11-11 11-29 0-40L552 512l141-141c11-11 11-29 0-40z @@ -23,6 +24,7 @@ M652 157a113 113 0 11156 161L731 395 572 236l80-80 1 1zM334 792v0H175v-159l358-358 159 159-358 358zM62 850h900v113H62v-113z M469 235V107h85v128h-85zm-162-94 85 85-60 60-85-85 60-60zm469 60-85 85-60-60 85-85 60 60zm-549 183A85 85 0 01302 341H722a85 85 0 0174 42l131 225A85 85 0 01939 652V832a85 85 0 01-85 85H171a85 85 0 01-85-85v-180a85 85 0 0112-43l131-225zM722 427H302l-100 171h255l10 29a59 59 0 002 5c2 4 5 9 9 14 8 9 18 17 34 17 16 0 26-7 34-17a72 72 0 0011-18l0-0 10-29h255l-100-171zM853 683H624a155 155 0 01-12 17C593 722 560 747 512 747c-48 0-81-25-99-47a155 155 0 01-12-17H171v149h683v-149z M576 832C576 867 547 896 512 896 477 896 448 867 448 832 448 797 477 768 512 768 547 768 576 797 576 832ZM512 256C477 256 448 285 448 320L448 640C448 675 477 704 512 704 547 704 576 675 576 640L576 320C576 285 547 256 512 256ZM1024 896C1024 967 967 1024 896 1024L128 1024C57 1024 0 967 0 896 0 875 5 855 14 837L14 837 398 69 398 69C420 28 462 0 512 0 562 0 604 28 626 69L1008 835C1018 853 1024 874 1024 896ZM960 896C960 885 957 875 952 865L952 864 951 863 569 98C557 77 536 64 512 64 488 64 466 77 455 99L452 105 92 825 93 825 71 867C66 876 64 886 64 896 64 931 93 960 128 960L896 960C931 960 960 931 960 896Z + M928 128l-416 0-32-64-352 0-64 128 896 0zM904 704l75 0 45-448-1024 0 64 640 484 0c-105-38-180-138-180-256 0-150 122-272 272-272s272 122 272 272c0 22-3 43-8 64zM1003 914l-198-175c17-29 27-63 27-99 0-106-86-192-192-192s-192 86-192 192 86 192 192 192c36 0 70-10 99-27l175 198c23 27 62 28 87 3l6-6c25-25 23-64-3-87zM640 764c-68 0-124-56-124-124s56-124 124-124 124 56 124 124-56 124-124 124z M520 168C291 168 95 311 16 512c79 201 275 344 504 344 229 0 425-143 504-344-79-201-275-344-504-344zm0 573c-126 0-229-103-229-229s103-229 229-229c126 0 229 103 229 229s-103 229-229 229zm0-367c-76 0-137 62-137 137s62 137 137 137S657 588 657 512s-62-137-137-137z M734 128c-33-19-74-8-93 25l-41 70c-28-6-58-9-90-9-294 0-445 298-445 298s82 149 231 236l-31 54c-19 33-8 74 25 93 33 19 74 8 93-25L759 222C778 189 767 147 734 128zM305 512c0-115 93-208 207-208 14 0 27 1 40 4l-37 64c-1 0-2 0-2 0-77 0-140 63-140 140 0 26 7 51 20 71l-37 64C324 611 305 564 305 512zM771 301 700 423c13 27 20 57 20 89 0 110-84 200-192 208l-51 89c12 1 24 2 36 2 292 0 446-298 446-298S895 388 771 301z M826 498 538 250c-11-9-26-1-26 14v496c0 15 16 23 26 14L826 526c8-7 8-21 0-28zm-320 0L218 250c-11-9-26-1-26 14v496c0 15 16 23 26 14L506 526c4-4 6-9 6-14 0-5-2-10-6-14z @@ -32,11 +34,9 @@ M416 832H128V128h384v192C512 355 541 384 576 384L768 384v32c0 19 13 32 32 32S832 435 832 416v-64c0-6 0-19-6-25l-256-256c-6-6-19-6-25-6H128A64 64 0 0064 128v704C64 867 93 896 129 896h288c19 0 32-13 32-32S435 832 416 832zM576 172 722 320H576V172zM736 512C614 512 512 614 512 736S614 960 736 960s224-102 224-224S858 512 736 512zM576 736C576 646 646 576 736 576c32 0 58 6 83 26l-218 218c-19-26-26-51-26-83zm160 160c-32 0-64-13-96-32l224-224c19 26 32 58 32 96 0 90-70 160-160 160z M896 320c0-19-6-32-19-45l-192-192c-13-13-26-19-45-19H192c-38 0-64 26-64 64v768c0 38 26 64 64 64h640c38 0 64-26 64-64V320zm-256 384H384c-19 0-32-13-32-32s13-32 32-32h256c19 0 32 13 32 32s-13 32-32 32zm166-384H640V128l192 192h-26z M599 425 599 657 425 832 425 425 192 192 832 192Z - M64 864h896V288h-396a64 64 0 01-57-35L460 160H64v704zm-64 32V128a32 32 0 0132-32h448a32 32 0 0129 18L564 224H992a32 32 0 0132 32v640a32 32 0 01-32 32H32a32 32 0 01-32-32z + M853 267H514c-4 0-6-2-9-4l-38-66c-13-21-38-36-64-36H171c-41 0-75 34-75 75v555c0 41 34 75 75 75h683c41 0 75-34 75-75V341c0-41-34-75-75-75zm-683-43h233c4 0 6 2 9 4l38 66c13 21 38 36 64 36H853c6 0 11 4 11 11v75h-704V235c0-6 4-11 11-11zm683 576H171c-6 0-11-4-11-11V480h704V789c0 6-4 11-11 11z M1088 227H609L453 78a11 11 0 00-7-3H107a43 43 0 00-43 43v789a43 43 0 0043 43h981a43 43 0 0043-43V270a43 43 0 00-43-43zM757 599c0 5-5 9-10 9h-113v113c0 5-4 9-9 9h-56c-5 0-9-4-9-9V608h-113c-5 0-10-4-10-9V543c0-5 5-9 10-9h113V420c0-5 4-9 9-9h56c5 0 9 4 9 9V533h113c5 0 10 4 10 9v56z - M960 784h-48v-48a48 48 0 10-96 0v48h-48a48 48 0 100 96h48v48a48 48 0 1096 0v-48h48a48 48 0 100-96zM0 816a48 48 0 0048 48h630A96 96 0 01672 832a96 96 0 0196-96 96 96 0 11192 0c25 0 47 10 64 25V304H0v512zm976-656H384L288 64H48a48 48 0 00-48 48v144h1024v-48a48 48 0 00-48-48z - M448 64l128 128h448v768H0V64z - M832 960l192-512H192L0 960zM128 384L0 960V128h288l128 128h416v128z + M922 450c-6-9-15-13-26-13h-11V341c0-41-34-75-75-75H514c-4 0-6-2-9-4l-38-66c-13-21-38-36-64-36H171c-41 0-75 34-75 75v597c0 6 2 13 6 19 6 9 15 13 26 13h640c13 0 26-9 30-21l128-363c4-11 2-21-4-30zM171 224h233c4 0 6 2 9 4l38 66c13 21 38 36 64 36H811c6 0 11 4 11 11v96H256c-13 0-26 9-30 21l-66 186V235c0-6 4-11 11-11zm574 576H173l105-299h572l-105 299z M509 556l93 149h124l-80-79 49-50 165 164-165 163-49-50 79-79h-163l-96-153 41-65zm187-395 165 164-165 163-49-50L726 360H530l-136 224H140v-70h215l136-224h236l-80-79 49-50z M939 94v710L512 998 85 805V94h-64A21 21 0 010 73v-0C0 61 10 51 21 51h981c12 0 21 10 21 21v0c0 12-10 21-21 21h-64zm-536 588L512 624l109 58c6 3 13 4 20 3a32 32 0 0026-37l-21-122 88-87c5-5 8-11 9-18a32 32 0 00-27-37l-122-18-54-111a32 32 0 00-57 0l-54 111-122 18c-7 1-13 4-18 9a33 33 0 001 46l88 87-21 122c-1 7-0 14 3 20a32 32 0 0043 14z M236 542a32 32 0 109 63l86-12a180 180 0 0022 78l-71 47a32 32 0 1035 53l75-50a176 176 0 00166 40L326 529zM512 16C238 16 16 238 16 512s222 496 496 496 496-222 496-496S786 16 512 16zm0 896c-221 0-400-179-400-400a398 398 0 0186-247l561 561A398 398 0 01512 912zm314-154L690 622a179 179 0 004-29l85 12a32 32 0 109-63l-94-13v-49l94-13a32 32 0 10-9-63l-87 12a180 180 0 00-20-62l71-47A32 32 0 10708 252l-75 50a181 181 0 00-252 10l-115-115A398 398 0 01512 112c221 0 400 179 400 400a398 398 0 01-86 247z @@ -84,6 +84,7 @@ M512 939C465 939 427 900 427 853 427 806 465 768 512 768 559 768 597 806 597 853 597 900 559 939 512 939M555 85 555 555 747 363 807 423 512 719 217 423 277 363 469 555 469 85 555 85Z M961 320 512 577 63 320 512 62l449 258zM512 628 185 442 63 512 512 770 961 512l-123-70L512 628zM512 821 185 634 63 704 512 962l449-258L839 634 512 821z M447 561a26 26 0 0126 26v171H421v-171a26 26 0 0126-26zm-98 65a26 26 0 0126 26v104H323v-104a26 26 0 0126-26zm0 0M561 268a32 32 0 0132 30v457h-65V299a32 32 0 0132-32zm0 0M675 384a26 26 0 0126 26v348H649v-350a26 26 0 0126-24zm0 0M801 223v579H223V223h579M805 171H219A49 49 0 00171 219v585A49 49 0 00219 853h585A49 49 0 00853 805V219A49 49 0 00805 171z + M576 160H448c-18 0-32-14-32-32s14-32 32-32h128c18 0 32 14 32 32s-14 32-32 32zm243 186 36-36c13-13 13-33 0-45s-33-13-45 0l-33 33C708 233 614 192 512 192c-212 0-384 172-384 384s172 384 384 384 384-172 384-384c0-86-29-166-77-230zM544 894V864c0-18-14-32-32-32s-32 14-32 32v30C329 879 209 759 194 608H224c18 0 32-14 32-32s-14-32-32-32h-30C209 393 329 273 480 258V288c0 18 14 32 32 32s32-14 32-32v-30C695 273 815 393 830 544H800c-18 0-32 14-32 32s14 32 32 32h30C815 759 695 879 544 894zm108-471-160 128c-14 11-16 31-5 45 6 8 16 12 25 12 7 0 14-2 20-7l160-128c14-11 16-31 5-45-11-14-31-16-45-5z M557.7 545.3 789.9 402.7c24-15 31.3-46.5 16.4-70.5c-14.8-23.8-46-31.2-70-16.7L506.5 456.6 277.1 315.4c-24.1-14.8-55.6-7.3-70.5 16.8c-14.8 24.1-7.3 55.6 16.8 70.5l231.8 142.6V819.1c0 28.3 22.9 51.2 51.2 51.2c28.3 0 51.2-22.9 51.2-51.2V545.3h.1zM506.5 0l443.4 256v511.9L506.5 1023.9 63.1 767.9v-511.9L506.5 0z M770 320a41 41 0 00-56-14l-252 153L207 306a41 41 0 10-43 70l255 153 2 296a41 41 0 0082 0l-2-295 255-155a41 41 0 0014-56zM481 935a42 42 0 01-42 0L105 741a42 42 0 01-21-36v-386a42 42 0 0121-36L439 89a42 42 0 0142 0l335 193a42 42 0 0121 36v87h84v-87a126 126 0 00-63-109L523 17a126 126 0 00-126 0L63 210a126 126 0 00-63 109v386a126 126 0 0063 109l335 193a126 126 0 00126 0l94-54-42-72zM1029 700h-126v-125a42 42 0 00-84 0v126h-126a42 42 0 000 84h126v126a42 42 0 1084 0v-126h126a42 42 0 000-84z M875 128h-725A107 107 0 0043 235v555A107 107 0 00149 896h725a107 107 0 00107-107v-555A107 107 0 00875 128zm-115 640h-183v-58l25-3c15 0 19-8 14-24l-22-61H419l-28 82 39 2V768h-166v-58l18-3c18-2 22-11 26-24l125-363-40-4V256h168l160 448 39 3zM506 340l-72 218h145l-71-218h-2z diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index ef8ffd06..b5c6a4d3 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -307,6 +307,9 @@ Find next match Find previous match Open search panel + Stage + Unstage + Discard Initialize Repository Path: Invalid repository detected. Run `git init` under this path? @@ -341,6 +344,15 @@ Copy Repository Path Repositories Paste + Just now + {0} minutes ago + {0} hours ago + Yesterday + {0} days ago + Last month + {0} months ago + Last year + {0} years ago Preference APPEARANCE Default Font diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 20265dab..38592803 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -1,6 +1,6 @@ - + 关于软件 关于本软件 @@ -310,6 +310,9 @@ 定位到下一个匹配搜索的位置 定位到上一个匹配搜索的位置 打开搜索 + 暂存 + 移出暂存区 + 丢弃 初始化新仓库 路径 : 选择目录不是有效的Git仓库。是否需要在此目录执行`git init`操作? @@ -344,6 +347,15 @@ 复制仓库路径 新标签页 粘贴 + 刚刚 + {0}分钟前 + {0}小时前 + 昨天 + {0}天前 + 上个月 + {0}个月前 + 一年前 + {0}年前 偏好设置 外观配置 缺省字体 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 70b7bbf1..0c34de95 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -1,6 +1,6 @@ - + 關於軟體 關於本軟體 @@ -310,6 +310,9 @@ 定位到下一個匹配搜尋的位置 定位到上一個匹配搜尋的位置 開啟搜尋 + 暫存 + 移出暫存區 + 丟棄 初始化新倉庫 路徑 : 選擇目錄不是有效的Git倉庫。是否需要在此目錄執行`git init`操作? @@ -344,6 +347,15 @@ 複製倉庫路徑 新標籤頁 貼上 + 剛剛 + {0}分鐘前 + {0}小時前 + 昨天 + {0}天前 + 上個月 + {0}個月前 + 一年前 + {0}年前 偏好設定 外觀配置 預設字型 diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 346c8f1c..06b2a3bf 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -1075,8 +1075,8 @@ + + + + +