From c1368212dfe08f3c0586cbefcace26c329c31d90 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 30 Nov 2024 19:25:20 +0800 Subject: [PATCH 01/21] feature: change the `CONTINUE` button to `SplitButton` to support editing/splitting original commit (#767) Signed-off-by: leo --- src/Resources/Locales/en_US.axaml | 1 + src/Resources/Locales/zh_CN.axaml | 1 + src/Resources/Locales/zh_TW.axaml | 1 + src/Resources/Styles.axaml | 60 +++++++++++++++++++++++++++++++ src/Views/WorkingCopy.axaml | 25 +++++++------ 5 files changed, 78 insertions(+), 10 deletions(-) diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index fd42b0f5..d06635eb 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -680,6 +680,7 @@ COMMIT & PUSH Template/Histories Trigger click event + Commit (Edit) Stage all changes and commit Empty commit detected! Do you want to continue (--allow-empty)? CONFLICTS DETECTED diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index a5af3400..9cf0eedf 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -684,6 +684,7 @@ 提交并推送 历史输入/模板 触发点击事件 + 提交(修改原始提交) 自动暂存所有变更并提交 提交未包含变更文件!是否继续(--allow-empty)? 检测到冲突 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index bf8b32e1..920d9114 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -683,6 +683,7 @@ 提交並推送 歷史輸入/範本 觸發點擊事件 + 提交(修改現有提交) 自動暫存全部變更並提交 未包含任何檔案變更! 您是否仍要提交 (--allow-empty)? 檢測到衝突 diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 6ea2af10..a42b2cb8 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -519,6 +519,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/src/Views/RevisionFiles.axaml.cs b/src/Views/RevisionFiles.axaml.cs index 53c36b1c..007c58ef 100644 --- a/src/Views/RevisionFiles.axaml.cs +++ b/src/Views/RevisionFiles.axaml.cs @@ -3,6 +3,7 @@ using System; using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Primitives; +using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Media; @@ -118,5 +119,85 @@ namespace SourceGit.Views { InitializeComponent(); } + + private void OnSearchBoxKeyDown(object _, KeyEventArgs e) + { + var vm = DataContext as ViewModels.CommitDetail; + if (vm == null) + return; + + if (e.Key == Key.Enter) + { + FileTree.SetSearchResult(vm.RevisionFileSearchFilter); + e.Handled = true; + } + else if (e.Key == Key.Down || e.Key == Key.Up) + { + if (vm.IsRevisionFileSearchSuggestionOpen) + { + SearchSuggestionBox.Focus(NavigationMethod.Tab); + SearchSuggestionBox.SelectedIndex = 0; + } + + e.Handled = true; + } + else if (e.Key == Key.Escape) + { + if (vm.IsRevisionFileSearchSuggestionOpen) + { + vm.RevisionFileSearchSuggestion.Clear(); + vm.IsRevisionFileSearchSuggestionOpen = false; + } + + e.Handled = true; + } + } + + private void OnSearchBoxTextChanged(object _, TextChangedEventArgs e) + { + var vm = DataContext as ViewModels.CommitDetail; + if (vm == null) + return; + + if (string.IsNullOrEmpty(vm.RevisionFileSearchFilter)) + FileTree.SetSearchResult(null); + } + + private void OnSearchSuggestionBoxKeyDown(object _, KeyEventArgs e) + { + var vm = DataContext as ViewModels.CommitDetail; + if (vm == null) + return; + + if (e.Key == Key.Escape) + { + vm.RevisionFileSearchSuggestion.Clear(); + e.Handled = true; + } + else if (e.Key == Key.Enter && SearchSuggestionBox.SelectedItem is string content) + { + vm.RevisionFileSearchFilter = content; + TxtSearchRevisionFiles.CaretIndex = content.Length; + FileTree.SetSearchResult(vm.RevisionFileSearchFilter); + e.Handled = true; + } + } + + private void OnSearchSuggestionDoubleTapped(object sender, TappedEventArgs e) + { + var vm = DataContext as ViewModels.CommitDetail; + if (vm == null) + return; + + var content = (sender as StackPanel)?.DataContext as string; + if (!string.IsNullOrEmpty(content)) + { + vm.RevisionFileSearchFilter = content; + TxtSearchRevisionFiles.CaretIndex = content.Length; + FileTree.SetSearchResult(vm.RevisionFileSearchFilter); + } + + e.Handled = true; + } } } From a52977baf3581432de46b96974c42bd11d18e5bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Dec 2024 13:44:50 +0000 Subject: [PATCH 09/21] doc: Update translation status and missing keys --- README.md | 2 +- TRANSLATION.md | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a1d19e1f..51f11672 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-99.86%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.87%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-97.30%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.73%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-99.15%25-yellow)](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) +[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-99.72%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.73%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-97.17%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.59%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-99.01%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) ## How to Use diff --git a/TRANSLATION.md b/TRANSLATION.md index 82be4441..93544ec6 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -1,19 +1,21 @@ -### de_DE.axaml: 99.86% +### de_DE.axaml: 99.72%
Missing Keys +- Text.CommitDetail.Files.Search - Text.WorkingCopy.CommitToEdit
-### es_ES.axaml: 97.87% +### es_ES.axaml: 97.73%
Missing Keys +- Text.CommitDetail.Files.Search - Text.CommitDetail.Info.Children - Text.Fetch.Force - Text.Preference.Appearance.FontSize @@ -32,7 +34,7 @@
-### fr_FR.axaml: 97.30% +### fr_FR.axaml: 97.17%
@@ -41,6 +43,7 @@ - Text.CherryPick.AppendSourceToMessage - Text.CherryPick.Mainline.Tips - Text.CommitCM.CherryPickMultiple +- Text.CommitDetail.Files.Search - Text.Fetch.Force - Text.Preference.Appearance.FontSize - Text.Preference.Appearance.FontSize.Default @@ -60,12 +63,13 @@
-### it_IT.axaml: 97.73% +### it_IT.axaml: 97.59%
Missing Keys +- Text.CommitDetail.Files.Search - Text.CommitDetail.Info.Children - Text.Configure.IssueTracker.AddSampleGitLabMergeRequest - Text.Configure.OpenAI.Preferred @@ -85,12 +89,13 @@
-### pt_BR.axaml: 99.15% +### pt_BR.axaml: 99.01%
Missing Keys +- Text.CommitDetail.Files.Search - Text.CommitDetail.Info.Children - Text.Fetch.Force - Text.Preference.General.ShowChildren @@ -100,13 +105,13 @@
-### ru_RU.axaml: 100.00% +### ru_RU.axaml: 99.86%
Missing Keys - +- Text.CommitDetail.Files.Search
From d1a1b4b2b9757406af7670276f1126caaa8e92e3 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 2 Dec 2024 21:50:50 +0800 Subject: [PATCH 10/21] enhance: do NOT show search suggestion if input string is empty (#775) --- src/ViewModels/CommitDetail.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ViewModels/CommitDetail.cs b/src/ViewModels/CommitDetail.cs index ec2822cd..2872528a 100644 --- a/src/ViewModels/CommitDetail.cs +++ b/src/ViewModels/CommitDetail.cs @@ -137,7 +137,9 @@ namespace SourceGit.ViewModels { _revisionFiles.Clear(); _revisionFiles.AddRange(files); - UpdateRevisionFileSearchSuggestion(); + + if (!string.IsNullOrEmpty(_revisionFileSearchFilter)) + UpdateRevisionFileSearchSuggestion(); } }); }); From 0160600c754b5e40e722bf8098d86c7713ba51ae Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 3 Dec 2024 09:25:53 +0800 Subject: [PATCH 11/21] revert: changes about `SystemAccentColor` (#776) This reverts commit db8ee3410bf19f6d81f6f0871bd6635efd8d1c7d. --- src/App.axaml.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App.axaml.cs b/src/App.axaml.cs index a4e5bd5b..0615724a 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -164,7 +164,12 @@ namespace SourceGit var resDic = new ResourceDictionary(); var overrides = JsonSerializer.Deserialize(File.ReadAllText(themeOverridesFile), JsonCodeGen.Default.ThemeOverrides); foreach (var kv in overrides.BasicColors) - resDic[$"Color.{kv.Key}"] = kv.Value; + { + if (kv.Key.Equals("SystemAccentColor", StringComparison.Ordinal)) + resDic["SystemAccentColor"] = kv.Value; + else + resDic[$"Color.{kv.Key}"] = kv.Value; + } if (overrides.GraphColors.Count > 0) Models.CommitGraph.SetPens(overrides.GraphColors, overrides.GraphPenThickness); From ea0bec16dac1cc767d53089227b4f860c3b4b17d Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 3 Dec 2024 09:33:06 +0800 Subject: [PATCH 12/21] refactor: use control instead of DataContext to get input string --- src/Views/RevisionFiles.axaml.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Views/RevisionFiles.axaml.cs b/src/Views/RevisionFiles.axaml.cs index 007c58ef..f748fb0d 100644 --- a/src/Views/RevisionFiles.axaml.cs +++ b/src/Views/RevisionFiles.axaml.cs @@ -155,11 +155,7 @@ namespace SourceGit.Views private void OnSearchBoxTextChanged(object _, TextChangedEventArgs e) { - var vm = DataContext as ViewModels.CommitDetail; - if (vm == null) - return; - - if (string.IsNullOrEmpty(vm.RevisionFileSearchFilter)) + if (string.IsNullOrEmpty(TxtSearchRevisionFiles.Text)) FileTree.SetSearchResult(null); } From ca29a232e4d4eca75e78813ca8ede1c1b38b3544 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 3 Dec 2024 10:44:27 +0800 Subject: [PATCH 13/21] enhance: call gc after viewing commit changed --- src/ViewModels/CommitDetail.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ViewModels/CommitDetail.cs b/src/ViewModels/CommitDetail.cs index 2872528a..29de3946 100644 --- a/src/ViewModels/CommitDetail.cs +++ b/src/ViewModels/CommitDetail.cs @@ -623,6 +623,8 @@ namespace SourceGit.ViewModels RevisionFileSearchFilter = string.Empty; IsRevisionFileSearchSuggestionOpen = false; + GC.Collect(); + if (_commit == null) return; From abacccab000a00dcef10394df1c5596708d26561 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:31:29 +0500 Subject: [PATCH 14/21] feat: Add libicu dependency to RPM spec file (#781) (cherry picked from commit f312895ef8c77098612645a54420539fef70a849) (cherry picked from commit 662149045f9b37e8b8842125c82d835625055150) --- build/resources/rpm/SPECS/build.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/build/resources/rpm/SPECS/build.spec b/build/resources/rpm/SPECS/build.spec index d31b6587..bc10ca48 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -7,6 +7,7 @@ URL: https://sourcegit-scm.github.io/ Source: https://github.com/sourcegit-scm/sourcegit/archive/refs/tags/v%_version.tar.gz Requires: libX11.so.6()(%{__isa_bits}bit) Requires: libSM.so.6()(%{__isa_bits}bit) +Requires: libicu %define _build_id_links none From 43928936bcb0ff71e2f3cdb59b3d3a776b78b0b2 Mon Sep 17 00:00:00 2001 From: stone-w4tch3r <100294019+stone-w4tch3r@users.noreply.github.com> Date: Wed, 4 Dec 2024 06:57:30 +0500 Subject: [PATCH 15/21] Added repositories for deb/rpm packages on buildkite (#780) * added and used new github action for publishing packages to packagecloud * publish-packages.yml WIP * publish-packages.yml now uses curl push * fix naming from packagecloud to buildkite * Add debug logs to publish-packages.yml * fix package path * change repo name to sourcegit * fixed unused code * added --fail to curl pushes * Remove leftowers from release.yml --- .github/workflows/publish-packages.yml | 39 ++++++++++++++++++++++++++ .github/workflows/release.yml | 5 ++++ SourceGit.sln | 1 + 3 files changed, 45 insertions(+) create mode 100644 .github/workflows/publish-packages.yml diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 00000000..9e465fe7 --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,39 @@ +name: Publish to Buildkite +on: + workflow_call: + secrets: + BUILDKITE_TOKEN: + required: true +jobs: + publish: + name: Publish to Buildkite + runs-on: ubuntu-latest + strategy: + matrix: + runtime: [linux-x64, linux-arm64] + steps: + - name: Download package artifacts + uses: actions/download-artifact@v4 + with: + name: package.${{ matrix.runtime }} + path: packages + + - name: Publish DEB package + env: + BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} + run: | + FILE=$(echo packages/*.deb) + curl -X POST https://api.buildkite.com/v2/packages/organizations/sourcegit/registries/sourcegit-deb/packages \ + -H "Authorization: Bearer $BUILDKITE_TOKEN" \ + -F "file=@$FILE" \ + --fail + + - name: Publish RPM package + env: + BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} + run: | + FILE=$(echo packages/*.rpm) + curl -X POST https://api.buildkite.com/v2/packages/organizations/sourcegit/registries/sourcegit-rpm/packages \ + -H "Authorization: Bearer $BUILDKITE_TOKEN" \ + -F "file=@$FILE" \ + --fail diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c19103e3..6a38c174 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,11 @@ jobs: uses: ./.github/workflows/package.yml with: version: ${{ needs.version.outputs.version }} + publish-packages: + name: Publish Packages + uses: ./.github/workflows/publish-packages.yml + secrets: + BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} release: needs: [package, version] name: Release diff --git a/SourceGit.sln b/SourceGit.sln index 9c5fcdb1..3eeb8a54 100644 --- a/SourceGit.sln +++ b/SourceGit.sln @@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ .github\workflows\package.yml = .github\workflows\package.yml .github\workflows\release.yml = .github\workflows\release.yml .github\workflows\localization-check.yml = .github\workflows\localization-check.yml + .github\workflows\publish-packages.yml = .github\workflows\publish-packages.yml EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{49A7C2D6-558C-4FAA-8F5D-EEE81497AED7}" From d616d0897b3b68c49b90fa209bf1899c610671e3 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 4 Dec 2024 11:25:25 +0800 Subject: [PATCH 16/21] refactor: relative time display mode (#777) --- src/Views/Histories.axaml.cs | 46 +++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/src/Views/Histories.axaml.cs b/src/Views/Histories.axaml.cs index 7edcb295..fbb907d9 100644 --- a/src/Views/Histories.axaml.cs +++ b/src/Views/Histories.axaml.cs @@ -430,31 +430,43 @@ namespace SourceGit.Views if (ShowAsDateTime) return DateTime.UnixEpoch.AddSeconds(timestamp).ToLocalTime().ToString("yyyy/MM/dd HH:mm:ss"); - var today = DateTime.Today; + var now = DateTime.Now; var localTime = DateTime.UnixEpoch.AddSeconds(timestamp).ToLocalTime(); + var span = now - localTime; + if (span.TotalMinutes < 1) + return App.Text("Period.JustNow"); - if (localTime >= today) + if (span.TotalHours < 1) + return App.Text("Period.MinutesAgo", (int)span.TotalMinutes); + + if (span.TotalDays < 1) + return App.Text("Period.HoursAgo", (int)span.TotalHours); + + var lastDay = now.AddDays(-1).Date; + if (localTime >= lastDay) + return App.Text("Period.Yesterday"); + + if ((localTime.Year == now.Year && localTime.Month == now.Month) || span.TotalDays < 28) { - var now = DateTime.Now; - var timespan = now - localTime; - if (timespan.TotalHours > 1) - return App.Text("Period.HoursAgo", (int)timespan.TotalHours); - - return timespan.TotalMinutes < 1 ? App.Text("Period.JustNow") : App.Text("Period.MinutesAgo", (int)timespan.TotalMinutes); + var diffDay = now.Date - localTime.Date; + return App.Text("Period.DaysAgo", (int)diffDay.TotalDays); } - var diffYear = today.Year - localTime.Year; - if (diffYear == 0) - { - var diffMonth = today.Month - localTime.Month; - if (diffMonth > 0) - return diffMonth == 1 ? App.Text("Period.LastMonth") : App.Text("Period.MonthsAgo", diffMonth); + var lastMonth = now.AddMonths(-1).Date; + if (localTime.Year == lastMonth.Year && localTime.Month == lastMonth.Month) + return App.Text("Period.LastMonth"); - var diffDay = today.Day - localTime.Day; - return diffDay == 1 ? App.Text("Period.Yesterday") : App.Text("Period.DaysAgo", diffDay); + if (localTime.Year == now.Year || localTime > now.AddMonths(-11)) + { + var diffMonth = (12 + now.Month - localTime.Month) % 12; + return App.Text("Period.MonthsAgo", diffMonth); } - return diffYear == 1 ? App.Text("Period.LastYear") : App.Text("Period.YearsAgo", diffYear); + var diffYear = now.Year - localTime.Year; + if (diffYear == 1) + return App.Text("Period.LastYear"); + + return App.Text("Period.YearsAgo", diffYear); } private IDisposable _refreshTimer = null; From 1ddd348a4098f9f511ebd49c3c81f7c9733dce40 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 4 Dec 2024 18:04:57 +0800 Subject: [PATCH 17/21] feature: show tracking status in `Delete Branch` panel if possible (#785) --- src/ViewModels/DeleteBranch.cs | 7 +++++++ src/Views/DeleteBranch.axaml | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/ViewModels/DeleteBranch.cs b/src/ViewModels/DeleteBranch.cs index e7136a0d..e23f4201 100644 --- a/src/ViewModels/DeleteBranch.cs +++ b/src/ViewModels/DeleteBranch.cs @@ -10,6 +10,12 @@ namespace SourceGit.ViewModels private set; } + public string TrackStatus + { + get; + private set; + } + public Models.Branch TrackingRemoteBranch { get; @@ -32,6 +38,7 @@ namespace SourceGit.ViewModels { _repo = repo; Target = branch; + TrackStatus = branch.TrackStatus.ToString(); if (branch.IsLocal && !string.IsNullOrEmpty(branch.Upstream)) { diff --git a/src/Views/DeleteBranch.axaml b/src/Views/DeleteBranch.axaml index b2693bf0..bdaa9d8a 100644 --- a/src/Views/DeleteBranch.axaml +++ b/src/Views/DeleteBranch.axaml @@ -16,6 +16,18 @@ + + + From 75e9f1e9a4b711cce7ebb47f26d48bfcfb430471 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 4 Dec 2024 19:14:48 +0800 Subject: [PATCH 18/21] feature: show track status in `Delete Multiple Branches` panel (#785) --- src/Models/Branch.cs | 2 ++ src/ViewModels/DeleteBranch.cs | 7 ------- src/Views/DeleteBranch.axaml | 4 ++-- src/Views/DeleteMultipleBranches.axaml | 15 ++++++++++++++- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/Models/Branch.cs b/src/Models/Branch.cs index ac6b8c67..0ba320c1 100644 --- a/src/Models/Branch.cs +++ b/src/Models/Branch.cs @@ -7,6 +7,8 @@ namespace SourceGit.Models public List Ahead { get; set; } = new List(); public List Behind { get; set; } = new List(); + public bool IsVisible => Ahead.Count > 0 || Behind.Count > 0; + public override string ToString() { if (Ahead.Count == 0 && Behind.Count == 0) diff --git a/src/ViewModels/DeleteBranch.cs b/src/ViewModels/DeleteBranch.cs index e23f4201..e7136a0d 100644 --- a/src/ViewModels/DeleteBranch.cs +++ b/src/ViewModels/DeleteBranch.cs @@ -10,12 +10,6 @@ namespace SourceGit.ViewModels private set; } - public string TrackStatus - { - get; - private set; - } - public Models.Branch TrackingRemoteBranch { get; @@ -38,7 +32,6 @@ namespace SourceGit.ViewModels { _repo = repo; Target = branch; - TrackStatus = branch.TrackStatus.ToString(); if (branch.IsLocal && !string.IsNullOrEmpty(branch.Upstream)) { diff --git a/src/Views/DeleteBranch.axaml b/src/Views/DeleteBranch.axaml index bdaa9d8a..05ec6e26 100644 --- a/src/Views/DeleteBranch.axaml +++ b/src/Views/DeleteBranch.axaml @@ -22,11 +22,11 @@ VerticalAlignment="Center" CornerRadius="9" Background="{DynamicResource Brush.Badge}" - IsVisible="{Binding TrackStatus, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"> + IsVisible="{Binding Target.TrackStatus.IsVisible}"> + Text="{Binding Target.TrackStatus}"/> diff --git a/src/Views/DeleteMultipleBranches.axaml b/src/Views/DeleteMultipleBranches.axaml index 2a888118..cf084e14 100644 --- a/src/Views/DeleteMultipleBranches.axaml +++ b/src/Views/DeleteMultipleBranches.axaml @@ -42,9 +42,22 @@ - + + + + From e18d6d65e8623981efdf0c610720b437ab9bde10 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 5 Dec 2024 20:43:31 +0800 Subject: [PATCH 19/21] ux: style of MenuItem --- src/Resources/Styles.axaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index a42b2cb8..2cc09e39 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -856,12 +856,7 @@
- + Date: Fri, 6 Dec 2024 02:13:45 +0100 Subject: [PATCH 20/21] Update Spanish translation (#791) * Update spanish translation * doc: Update translation status and missing keys * Add missing key (cherry picked from commit 2bf0641323325bf97d1fac9ed225228e5015a3ba) * doc: Update translation status and missing keys --------- Co-authored-by: github-actions[bot] --- README.md | 2 +- TRANSLATION.md | 19 ++----------------- src/Resources/Locales/es_ES.axaml | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 51f11672..47785e73 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-99.72%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.73%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-97.17%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.59%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-99.01%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-99.72%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-97.17%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.59%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-99.01%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) ## How to Use diff --git a/TRANSLATION.md b/TRANSLATION.md index 93544ec6..569a0222 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -9,28 +9,13 @@ -### es_ES.axaml: 97.73% +### es_ES.axaml: 100.00%
Missing Keys -- Text.CommitDetail.Files.Search -- Text.CommitDetail.Info.Children -- Text.Fetch.Force -- Text.Preference.Appearance.FontSize -- Text.Preference.Appearance.FontSize.Default -- Text.Preference.Appearance.FontSize.Editor -- Text.Preference.General.ShowChildren -- Text.Repository.FilterCommits -- Text.Repository.FilterCommits.Default -- Text.Repository.FilterCommits.Exclude -- Text.Repository.FilterCommits.Include -- Text.Repository.HistoriesOrder -- Text.Repository.HistoriesOrder.ByDate -- Text.Repository.HistoriesOrder.Topo -- Text.SHALinkCM.NavigateTo -- Text.WorkingCopy.CommitToEdit +
diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 563419be..7c7f8d7c 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -126,10 +126,12 @@ Buscar Cambios... ARCHIVOS Archivo LFS + Buscar Archivos... Submódulo INFORMACIÓN AUTOR CAMBIADO + HIJOS COMMITTER Ver refs que contienen este commit COMMIT ESTÁ CONTENIDO EN @@ -272,6 +274,7 @@ Fast-Forward (sin checkout) Fetch Fetch todos los remotos + Utilizar opción '--force' Fetch sin etiquetas Remoto: Fetch Cambios Remotos @@ -437,6 +440,9 @@ Servidor APARIENCIA Fuente por defecto + Tamaño de fuente + Por defecto + Editor Fuente Monospace Usar solo fuente monospace en el editor de texto Tema @@ -452,6 +458,7 @@ Idioma Commits en el historial Mostrar hora del autor en lugar de la hora del commit en el gráfico + Mostrar hijos en los detalles de commit Longitud de la guía del asunto GIT Habilitar Auto CRLF @@ -541,6 +548,13 @@ Habilitar Opción '--reflog' Abrir en el Explorador Buscar Ramas/Etiquetas/Submódulos + Visibilidad en el Gráfico + Desestablecer + Ocultar en el Gráfico de Commits + Filtrar en el Gráfico de Commits + Cambiar Modo de Ordenación + Fecha de Commit (--date-order) + Topológicamente (--topo-order) RAMAS LOCALES Navegar a HEAD Habilitar Opción '--first-parent' @@ -593,6 +607,7 @@ Actualización de Software Actualmente no hay actualizaciones disponibles. Copiar SHA + Ir a Squash Commits En: Clave Privada SSH: @@ -670,6 +685,7 @@ COMMIT & PUSH Plantilla/Historias Activar evento de clic + Commit (Editar) Stagear todos los cambios y commit ¡Commit vacío detectado! ¿Quieres continuar (--allow-empty)? CONFLICTOS DETECTADOS From c062f270816581210896b21f1120e2a2b19a65fe Mon Sep 17 00:00:00 2001 From: GadflyFang Date: Fri, 6 Dec 2024 15:09:14 +0800 Subject: [PATCH 21/21] fix: Dispose _autoFetchTimer before _setting set to null (#792) Signed-off-by: Gadfly --- src/ViewModels/Repository.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 514bdb6d..38855fef 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -427,12 +427,12 @@ namespace SourceGit.ViewModels { // Ignore } - _settings = null; - _historiesFilterMode = Models.FilterMode.None; - _autoFetchTimer.Dispose(); _autoFetchTimer = null; + _settings = null; + _historiesFilterMode = Models.FilterMode.None; + _watcher?.Dispose(); _histories.Cleanup(); _workingCopy.Cleanup();