From dd85760b7abf6b963ebab44c638ae312f25c0d09 Mon Sep 17 00:00:00 2001 From: Nils van Rijsinge Date: Mon, 16 Dec 2024 02:50:59 +0100 Subject: [PATCH 01/32] localization: add missing de_DE keys (#817) * localization: add missing de_DE keys BranchCM.MergeMultiBranches, CommitCM.MergeMultiple, MergeMultiple #793 CommitCM.Merge 2053ce033d1e24e9e6b74cecfcc0761fad899f6f CommitDetail.Files.Search 894f3e9b033f15df5f87f251299afa6ce9428227 Diff.UseBlockNavigation #703 FileCM.ResolveUsing 3b5d87391d11b27aff061cb57a32862046ee791f Hotkeys.Global.Clone bea2a39feb18cf4ef427f319f0436bd3f80546f5 InProgress.CherryPick.Head e1df5c52f10042523ba1d40483703bcbeeedf053 InProgress.Merge.Operating ef40e4b7387fb82d16984c5e4cc6a77559bd01e6 InProgress.Rebase.StoppedAt, Repository.Skip #790 InProgress.Revert.Head 93d9a044608c84fc8335f25269b1d5572c41b0e1 Merge.Source 2504a523987f0279afacef0b80b2ea00547d2145 WorkingCopy.CommitToEdit c1368212dfe08f3c0586cbefcace26c329c31d90 * localization: consistently use clone with 'k' for most other keys a more "germanized" version with a k is used rather than a c --- src/Resources/Locales/de_DE.axaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index 2045a229..ff8a1d97 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -61,6 +61,7 @@ Fetche ${0}$ in ${1}$ hinein... Git Flow - Abschließen ${0}$ Merge ${0}$ in ${1}$ hinein... + Merge ausgewählte {0} Branches in aktuellen hinein Pull ${0}$ Pull ${0}$ in ${1}$ hinein... Push ${0}$ @@ -113,6 +114,8 @@ SHA kopieren Benutzerdefinierte Aktion Interactives Rebase von ${0}$ auf diesen Commit + Merge in ${0}$ hinein + Merge ... Rebase von ${0}$ auf diesen Commit Reset ${0}$ auf diesen Commit Commit rückgängig machen @@ -124,6 +127,7 @@ Änderungen durchsuchen... DATEIEN LFS DATEI + Dateien durchsuchen... Submodule INFORMATION AUTOR @@ -249,6 +253,7 @@ Seiten wechseln Syntax Hervorhebung Zeilenumbruch + Aktiviere Block-Navigation Öffne in Merge Tool Alle Zeilen anzeigen Weniger Zeilen anzeigen @@ -280,6 +285,7 @@ Verwerfe {0} Dateien... Verwerfe Änderungen in ausgewählten Zeilen Öffne externes Merge Tool + Löse mit ${0}$ Als Patch speichern... Stagen {0} Dateien stagen @@ -358,6 +364,7 @@ Tastaturkürzel Referenz GLOBAL Aktuelles Popup schließen + Klone neues Repository Aktuellen Tab schließen Zum vorherigen Tab wechseln Zum nächsten Tab wechseln @@ -390,9 +397,13 @@ Initialisiere Repository Pfad: Cherry-Pick wird durchgeführt. + Verarbeite commit Merge request wird durchgeführt. + Verarbeite Rebase wird durchgeführt. + Angehalten bei Revert wird durchgeführt. + Reverte commit Interaktiver Rebase Ziel Branch: Auf: @@ -403,6 +414,11 @@ Branch mergen Ziel-Branch: Merge Option: + Quelle: + Merge (mehrere) + Alle Änderungen committen + Strategie: + Ziele: Bewege Repository Knoten Wähle Vorgänger-Knoten für: Name: @@ -459,7 +475,7 @@ Längenvorgabe für Commit-Nachrichten GIT Aktiviere Auto-CRLF - Clone Standardordner + Klon Standardordner Benutzer Email Globale Git Benutzer Email Installationspfad @@ -568,6 +584,7 @@ Autor & Committer Aktueller Branch Zeige Tags als Baum + ÜBERSPRINGEN Statistiken SUBMODULE SUBMODUL HINZUFÜGEN @@ -666,7 +683,7 @@ Öffne alle Repositories Öffne Repository Öffne Terminal - Clone Standardordner erneut nach Repositories durchsuchen + Klon Standardordner erneut nach Repositories durchsuchen Suche Repositories... Sortieren Änderungen @@ -681,6 +698,7 @@ COMMIT & PUSH Template/Historie Klick-Ereignis auslösen + Commit (Bearbeitung) Alle Änderungen stagen und committen Leerer Commit erkannt! Fortfahren (--allow-empty)? KONFLIKTE ERKANNT From e4cfca0ffdb85980b3221d30febea5997a48c384 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Dec 2024 01:51:11 +0000 Subject: [PATCH 02/32] doc: Update translation status and missing keys --- README.md | 2 +- TRANSLATION.md | 21 ++------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 6916edbc..9f1d302a 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ ## 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-97.50%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.78%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-95.00%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-95.56%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-96.81%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-97.92%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-100.00%25-brightgreen)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.78%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-95.00%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-95.56%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-96.81%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-97.92%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) ## How to Use diff --git a/TRANSLATION.md b/TRANSLATION.md index 6e743f14..59ed0ff7 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -1,27 +1,10 @@ -### de_DE.axaml: 97.50% +### de_DE.axaml: 100.00%
Missing Keys -- Text.BranchCM.MergeMultiBranches -- Text.CommitCM.Merge -- Text.CommitCM.MergeMultiple -- Text.CommitDetail.Files.Search -- Text.Diff.UseBlockNavigation -- Text.FileCM.ResolveUsing -- Text.Hotkeys.Global.Clone -- Text.InProgress.CherryPick.Head -- Text.InProgress.Merge.Operating -- Text.InProgress.Rebase.StoppedAt -- Text.InProgress.Revert.Head -- Text.Merge.Source -- Text.MergeMultiple -- Text.MergeMultiple.CommitChanges -- Text.MergeMultiple.Strategy -- Text.MergeMultiple.Targets -- Text.Repository.Skip -- Text.WorkingCopy.CommitToEdit +
From 5425fa64fe46c5c025c09bcc9f7aa6662ce29661 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 16 Dec 2024 13:29:46 +0800 Subject: [PATCH 03/32] refactor: use another way to open tooltip of SHA after getting commit info (#810) --- src/Views/CommitBaseInfo.axaml.cs | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Views/CommitBaseInfo.axaml.cs b/src/Views/CommitBaseInfo.axaml.cs index 0b4c1f2d..79f65a4d 100644 --- a/src/Views/CommitBaseInfo.axaml.cs +++ b/src/Views/CommitBaseInfo.axaml.cs @@ -5,6 +5,7 @@ using Avalonia.Collections; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; +using Avalonia.Threading; namespace SourceGit.Views { @@ -124,7 +125,7 @@ namespace SourceGit.Views e.Handled = true; } - private async void OnSHAPointerEntered(object sender, PointerEventArgs e) + private void OnSHAPointerEntered(object sender, PointerEventArgs e) { if (DataContext is ViewModels.CommitDetail detail && sender is Control { DataContext: string sha } ctl) { @@ -132,14 +133,22 @@ namespace SourceGit.Views if (tooltip is Models.Commit commit && commit.SHA == sha) return; - var c = await Task.Run(() => detail.GetParent(sha)); - if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha) + Task.Run(() => { - ToolTip.SetTip(ctl, c); + var c = detail.GetParent(sha); + if (c == null) return; - if (ctl.IsPointerOver) - ToolTip.SetIsOpen(ctl, true); - } + Dispatcher.UIThread.Invoke(() => + { + if (ctl.IsEffectivelyVisible && ctl.DataContext is string newSHA && newSHA == sha) + { + ToolTip.SetTip(ctl, c); + + if (ctl.IsPointerOver) + ToolTip.SetIsOpen(ctl, true); + } + }); + }); } e.Handled = true; From f418b72c64391b178ccb6a1ce46df1eaaae51f41 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 16 Dec 2024 15:47:33 +0800 Subject: [PATCH 04/32] feature: use `[$workspace] $repo_name ($repo_path)` as main window's title (#818) --- src/ViewModels/Launcher.cs | 48 +++++++++++++++++++++++++++++++++++--- src/Views/Launcher.axaml | 2 +- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/ViewModels/Launcher.cs b/src/ViewModels/Launcher.cs index 8e4f7775..02844312 100644 --- a/src/ViewModels/Launcher.cs +++ b/src/ViewModels/Launcher.cs @@ -11,6 +11,12 @@ namespace SourceGit.ViewModels { public class Launcher : ObservableObject { + public string Title + { + get => _title; + private set => SetProperty(ref _title, value); + } + public AvaloniaList Pages { get; @@ -31,9 +37,10 @@ namespace SourceGit.ViewModels if (SetProperty(ref _activePage, value)) { PopupHost.Active = value; + UpdateTitle(); if (!_ignoreIndexChange && value is { Data: Repository repo }) - ActiveWorkspace.ActiveIdx = ActiveWorkspace.Repositories.IndexOf(repo.FullPath); + _activeWorkspace.ActiveIdx = _activeWorkspace.Repositories.IndexOf(repo.FullPath); } } } @@ -105,6 +112,9 @@ namespace SourceGit.ViewModels } _ignoreIndexChange = false; + + if (string.IsNullOrEmpty(_title)) + UpdateTitle(); } public void Quit(double width, double height) @@ -185,6 +195,7 @@ namespace SourceGit.ViewModels last.Node = new RepositoryNode() { Id = Guid.NewGuid().ToString() }; last.Data = Welcome.Instance; last.Popup = null; + UpdateTitle(); GC.Collect(); } @@ -193,7 +204,6 @@ namespace SourceGit.ViewModels App.Quit(0); } - _ignoreIndexChange = false; return; } @@ -308,7 +318,10 @@ namespace SourceGit.ViewModels page.Data = repo; } - ActivePage = page; + if (page != _activePage) + ActivePage = page; + else + UpdateTitle(); ActiveWorkspace.Repositories.Clear(); foreach (var p in Pages) @@ -530,8 +543,37 @@ namespace SourceGit.ViewModels page.Data = null; } + private void UpdateTitle() + { + if (_activeWorkspace == null) + return; + + var workspace = _activeWorkspace.Name; + if (_activePage is { Data: Repository repo }) + { + var node = _activePage.Node; + var name = node.Name; + var path = node.Id; + + if (!OperatingSystem.IsWindows()) + { + var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); + var prefixLen = home.EndsWith('/') ? home.Length - 1 : home.Length; + if (path.StartsWith(home, StringComparison.Ordinal)) + path = "~" + path.Substring(prefixLen); + } + + Title = $"[{workspace}] {name} ({path})"; + } + else + { + Title = $"[{workspace}] Repositories"; + } + } + private Workspace _activeWorkspace = null; private LauncherPage _activePage = null; private bool _ignoreIndexChange = false; + private string _title = string.Empty; } } diff --git a/src/Views/Launcher.axaml b/src/Views/Launcher.axaml index ad5a7f34..d37cf928 100644 --- a/src/Views/Launcher.axaml +++ b/src/Views/Launcher.axaml @@ -10,7 +10,7 @@ x:DataType="vm:Launcher" x:Name="ThisControl" Icon="/App.ico" - Title="SourceGit" + Title="{Binding Title}" MinWidth="1024" MinHeight="600" WindowStartupLocation="CenterScreen"> From 707a227aca594b46475ad149a080a38a208352cf Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 17 Dec 2024 09:36:06 +0800 Subject: [PATCH 05/32] ux: make Welcome page responsive (#821) --- src/Views/Welcome.axaml | 265 ++++++++++++++++++++-------------------- 1 file changed, 132 insertions(+), 133 deletions(-) diff --git a/src/Views/Welcome.axaml b/src/Views/Welcome.axaml index 6f12c119..cdc892f4 100644 --- a/src/Views/Welcome.axaml +++ b/src/Views/Welcome.axaml @@ -9,149 +9,148 @@ x:Class="SourceGit.Views.Welcome" x:DataType="vm:Welcome"> - - - - - - - - - - - - + + + + + + + + - - - - + + + - - - - - - - + + + + - - - - - + + + + - - - - - - - - - + + - - - - - - + + + + + - + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + From c768b1750e715091504fe9d866013f6a6d44ac22 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 17 Dec 2024 10:26:35 +0800 Subject: [PATCH 06/32] feature: use `-p:DisableUpdateDetection=true` to disable built-in update detection feature (#819) --- src/App.Commands.cs | 12 ++++++++++++ src/App.axaml | 2 +- src/App.axaml.cs | 2 ++ src/SourceGit.csproj | 4 ++++ src/Views/Launcher.axaml | 4 ++-- src/Views/Preference.axaml | 4 +++- 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/App.Commands.cs b/src/App.Commands.cs index 8a485029..18016a1c 100644 --- a/src/App.Commands.cs +++ b/src/App.Commands.cs @@ -25,6 +25,18 @@ namespace SourceGit private Action _action = null; } + public static bool IsCheckForUpdateCommandVisible + { + get + { + #if DISABLE_UPDATE_DETECTION + return false; + #else + return true; + #endif + } + } + public static readonly Command OpenPreferenceCommand = new Command(_ => OpenDialog(new Views.Preference())); public static readonly Command OpenHotkeysCommand = new Command(_ => OpenDialog(new Views.Hotkeys())); public static readonly Command OpenAppDataDirCommand = new Command(_ => Native.OS.OpenInFileManager(Native.OS.DataDir)); diff --git a/src/App.axaml b/src/App.axaml index 0f40031d..55aacb89 100644 --- a/src/App.axaml +++ b/src/App.axaml @@ -33,7 +33,7 @@ - + diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 0615724a..3d1547c9 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -548,9 +548,11 @@ namespace SourceGit _launcher = new ViewModels.Launcher(startupRepo); desktop.MainWindow = new Views.Launcher() { DataContext = _launcher }; + #if !DISABLE_UPDATE_DETECTION var pref = ViewModels.Preference.Instance; if (pref.ShouldCheck4UpdateOnStartup()) Check4Update(); + #endif } private ViewModels.Launcher _launcher = null; diff --git a/src/SourceGit.csproj b/src/SourceGit.csproj index 32f68d03..89893a39 100644 --- a/src/SourceGit.csproj +++ b/src/SourceGit.csproj @@ -26,6 +26,10 @@ link + + $(DefineConstants);DISABLE_UPDATE_DETECTION + + diff --git a/src/Views/Launcher.axaml b/src/Views/Launcher.axaml index d37cf928..a0691c4c 100644 --- a/src/Views/Launcher.axaml +++ b/src/Views/Launcher.axaml @@ -51,12 +51,12 @@ - + - + diff --git a/src/Views/Preference.axaml b/src/Views/Preference.axaml index 0ed598c2..6adbaca4 100644 --- a/src/Views/Preference.axaml +++ b/src/Views/Preference.axaml @@ -2,6 +2,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:s="using:SourceGit" xmlns:m="using:SourceGit.Models" xmlns:c="using:SourceGit.Converters" xmlns:vm="using:SourceGit.ViewModels" @@ -45,7 +46,7 @@ - + From 1c345df37db53e416d98887d860c919ef8c8311e Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 17 Dec 2024 11:24:59 +0800 Subject: [PATCH 07/32] ux: add some tooltips to checkboxes --- src/Resources/Locales/en_US.axaml | 2 +- src/Resources/Locales/zh_CN.axaml | 2 +- src/Resources/Locales/zh_TW.axaml | 2 +- src/Views/Apply.axaml | 3 ++- src/Views/Fetch.axaml | 9 ++++++--- src/Views/Pull.axaml | 6 ++++-- src/Views/Push.axaml | 12 ++++++++---- src/Views/StashChanges.axaml | 9 ++++++--- 8 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 65b4dd96..73e82074 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -273,7 +273,7 @@ Fast-Forward (without checkout) Fetch Fetch all remotes - Enable '--force' option + Override refs check Fetch without tags Remote: Fetch Remote Changes diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index f711cdee..e53af9a8 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -276,7 +276,7 @@ 快进(fast-forward,无需checkout) 拉取(fetch) 拉取所有的远程仓库 - 启用 --force 选项 + 覆盖REF检查 不拉取远程标签 远程仓库 : 拉取远程仓库内容 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 90444967..e96f68ad 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -276,7 +276,7 @@ 快進 (fast-forward,無需 checkout) 提取 (fetch) 提取所有的遠端存放庫 - 啟用 [--force] 選項 + 覆寫 REFs 檢查 不提取遠端標籤 遠端存放庫: 提取遠端存放庫內容 diff --git a/src/Views/Apply.axaml b/src/Views/Apply.axaml index c3cb420c..a5100cd6 100644 --- a/src/Views/Apply.axaml +++ b/src/Views/Apply.axaml @@ -54,7 +54,8 @@ + IsChecked="{Binding IgnoreWhiteSpace, Mode=TwoWay}" + ToolTip.Tip="--ignore-whitespace"/> diff --git a/src/Views/Fetch.axaml b/src/Views/Fetch.axaml index f9380ab0..67669380 100644 --- a/src/Views/Fetch.axaml +++ b/src/Views/Fetch.axaml @@ -34,15 +34,18 @@ + IsChecked="{Binding Force, Mode=TwoWay}" + ToolTip.Tip="--force"/> + IsChecked="{Binding FetchAllRemotes, Mode=TwoWay}" + ToolTip.Tip="--all"/> + IsChecked="{Binding NoTags, Mode=TwoWay}" + ToolTip.Tip="--no-tags"/> diff --git a/src/Views/Pull.axaml b/src/Views/Pull.axaml index f6aa245f..50615bc6 100644 --- a/src/Views/Pull.axaml +++ b/src/Views/Pull.axaml @@ -99,11 +99,13 @@ + IsChecked="{Binding NoTags, Mode=TwoWay}" + ToolTip.Tip="--no-tags"/> + IsChecked="{Binding UseRebase, Mode=TwoWay}" + ToolTip.Tip="--rebase"/> diff --git a/src/Views/Push.axaml b/src/Views/Push.axaml index 87921c88..6bc02cff 100644 --- a/src/Views/Push.axaml +++ b/src/Views/Push.axaml @@ -83,21 +83,25 @@ Height="32" Content="{DynamicResource Text.Push.Tracking}" IsChecked="{Binding Tracking, Mode=TwoWay}" - IsVisible="{Binding IsSetTrackOptionVisible}"/> + IsVisible="{Binding IsSetTrackOptionVisible}" + ToolTip.Tip="-u"/> + IsVisible="{Binding IsCheckSubmodulesVisible}" + ToolTip.Tip="--recurse-submodules=check"/> + IsChecked="{Binding PushAllTags, Mode=TwoWay}" + ToolTip.Tip="--tags"/> + IsChecked="{Binding ForcePush, Mode=TwoWay}" + ToolTip.Tip="--force-with-lease"/> diff --git a/src/Views/StashChanges.axaml b/src/Views/StashChanges.axaml index b3e6254a..772b09e6 100644 --- a/src/Views/StashChanges.axaml +++ b/src/Views/StashChanges.axaml @@ -27,18 +27,21 @@ Height="32" Content="{DynamicResource Text.Stash.IncludeUntracked}" IsChecked="{Binding IncludeUntracked, Mode=TwoWay}" - IsVisible="{Binding !HasSelectedFiles}"/> + IsVisible="{Binding !HasSelectedFiles}" + ToolTip.Tip="--include-untracked"/> + IsVisible="{Binding !HasSelectedFiles}" + ToolTip.Tip="--staged"/> + IsChecked="{Binding KeepIndex, Mode=TwoWay}" + ToolTip.Tip="--keep-index"/> Date: Tue, 17 Dec 2024 12:08:25 +0800 Subject: [PATCH 08/32] ux: new notification theme --- src/Views/LauncherPage.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/LauncherPage.axaml b/src/Views/LauncherPage.axaml index d09c2c0d..d40fd243 100644 --- a/src/Views/LauncherPage.axaml +++ b/src/Views/LauncherPage.axaml @@ -125,7 +125,7 @@ - + From 23326d179a875047db004cb76bd575db44a4c1bc Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 17 Dec 2024 14:39:18 +0800 Subject: [PATCH 09/32] refactor: commit hash detection in message --- src/Views/CommitMessagePresenter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/CommitMessagePresenter.cs b/src/Views/CommitMessagePresenter.cs index a767b395..0ae3d6cf 100644 --- a/src/Views/CommitMessagePresenter.cs +++ b/src/Views/CommitMessagePresenter.cs @@ -15,7 +15,7 @@ namespace SourceGit.Views { public partial class CommitMessagePresenter : SelectableTextBlock { - [GeneratedRegex(@"\b([0-9a-fA-F]{8,40})\b")] + [GeneratedRegex(@"\b([0-9a-fA-F]{10,40})\b")] private static partial Regex REG_SHA_FORMAT(); public static readonly StyledProperty MessageProperty = From 39dff8a93f8fc8df0adabf562a1cf9a7874d2d85 Mon Sep 17 00:00:00 2001 From: Martin Garstenauer Date: Wed, 18 Dec 2024 02:25:56 +0100 Subject: [PATCH 10/32] ux: change text selection brush to improve readability (#825) --- src/Resources/Styles.axaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 2cc09e39..28eabbab 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -4,6 +4,7 @@ xmlns:vm="using:SourceGit.ViewModels" xmlns:c="using:SourceGit.Converters" xmlns:ae="using:AvaloniaEdit" + xmlns:aee="using:AvaloniaEdit.Editing" xmlns:aes="using:AvaloniaEdit.Search"> @@ -580,6 +581,19 @@ + +