From 90a34dca37a855d46913febe4a5d339fd2a31a19 Mon Sep 17 00:00:00 2001 From: Gabriel Vanca Date: Fri, 6 Sep 2024 20:37:44 +0100 Subject: [PATCH 01/12] Update MaterialDesignThemes.MahApps This now requires Material 3 --- src/RepoM.App/RepoM.App.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RepoM.App/RepoM.App.csproj b/src/RepoM.App/RepoM.App.csproj index 524fa33b..2dbba74d 100644 --- a/src/RepoM.App/RepoM.App.csproj +++ b/src/RepoM.App/RepoM.App.csproj @@ -52,7 +52,7 @@ - + From 472869db4b78e5341b541b3935426f541fd2b1f1 Mon Sep 17 00:00:00 2001 From: Gabriel Vanca Date: Fri, 6 Sep 2024 20:45:04 +0100 Subject: [PATCH 02/12] Material 3 Theme + Update Time conversion to use CultureInfo.InvariantCulture Material 3 Theme + Update Time conversion to use CultureInfo.InvariantCulture --- .../ActionMenuCore/RepositoryTagsFactoryV2.cs | 11 +- src/RepoM.App/App.xaml | 87 +++------ src/RepoM.App/App.xaml.cs | 43 +++-- .../UtcToHumanizedLocalDateTimeConverter.cs | 15 +- .../Converters/UtcToLocalDateTimeConverter.cs | 33 +++- src/RepoM.App/MainWindow.xaml | 174 ++++++++++-------- 6 files changed, 185 insertions(+), 178 deletions(-) diff --git a/src/RepoM.App/ActionMenuCore/RepositoryTagsFactoryV2.cs b/src/RepoM.App/ActionMenuCore/RepositoryTagsFactoryV2.cs index 1bcb1a9d..31343e7e 100644 --- a/src/RepoM.App/ActionMenuCore/RepositoryTagsFactoryV2.cs +++ b/src/RepoM.App/ActionMenuCore/RepositoryTagsFactoryV2.cs @@ -21,14 +21,11 @@ public RepositoryTagsFactoryV2( IAppDataPathProvider appDataPathProvider) { _ = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem)); - _newStyleActionMenuFactory = newStyleActionMenuFactory ?? throw new ArgumentNullException(nameof(newStyleActionMenuFactory)); + this._newStyleActionMenuFactory = newStyleActionMenuFactory ?? throw new ArgumentNullException(nameof(newStyleActionMenuFactory)); _ = appDataPathProvider ?? throw new ArgumentNullException(nameof(appDataPathProvider)); - _filename = fileSystem.Path.Combine(appDataPathProvider.AppDataPath, "TagsV2.yaml"); + this._filename = fileSystem.Path.Combine(appDataPathProvider.AppDataPath, "TagsV2.yaml"); } - public Task> GetTagsAsync(Repository repository) - { - return _newStyleActionMenuFactory.GetTagsAsync(repository, _filename); - } -} \ No newline at end of file + public Task> GetTagsAsync(Repository repository) => this._newStyleActionMenuFactory.GetTagsAsync(repository, this._filename); +} diff --git a/src/RepoM.App/App.xaml b/src/RepoM.App/App.xaml index d47a215c..85623411 100644 --- a/src/RepoM.App/App.xaml +++ b/src/RepoM.App/App.xaml @@ -1,8 +1,13 @@ - + - - - - - - + + + - - - + + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + diff --git a/src/RepoM.App/App.xaml.cs b/src/RepoM.App/App.xaml.cs index 7201984f..e2ae946a 100644 --- a/src/RepoM.App/App.xaml.cs +++ b/src/RepoM.App/App.xaml.cs @@ -8,20 +8,20 @@ namespace RepoM.App; using System.Threading; using System.Windows; using Hardcodet.Wpf.TaskbarNotification; -using RepoM.Api.Git; -using RepoM.Api.IO; -using RepoM.App.i18n; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; +using RepoM.Api; +using RepoM.Api.Git; +using RepoM.Api.IO; using RepoM.Api.Plugins; +using RepoM.App.i18n; using RepoM.App.Plugins; +using RepoM.App.Services; +using RepoM.App.Services.HotKey; using Serilog; using Serilog.Core; -using ILogger = Microsoft.Extensions.Logging.ILogger; -using RepoM.App.Services; using Container = SimpleInjector.Container; -using RepoM.App.Services.HotKey; -using RepoM.Api; +using ILogger = Microsoft.Extensions.Logging.ILogger; /// /// Interaction logic for App.xaml @@ -92,7 +92,7 @@ protected override async void OnStartup(StartupEventArgs e) EnsureStartup ensureStartup = Bootstrapper.Container.GetInstance(); await ensureStartup.EnsureFilesAsync().ConfigureAwait(true); - + UseRepositoryMonitor(Bootstrapper.Container); this._moduleService = Bootstrapper.Container.GetInstance(); From 4745d23abdb02c06a4d1143568e010d82336d3be Mon Sep 17 00:00:00 2001 From: Gabriel Vanca Date: Fri, 6 Sep 2024 20:55:17 +0100 Subject: [PATCH 05/12] MainWindow.xaml.cs code cleanup --- src/RepoM.App/MainWindow.xaml | 454 +++++++++++++++++-------------- src/RepoM.App/MainWindow.xaml.cs | 76 +++--- 2 files changed, 289 insertions(+), 241 deletions(-) diff --git a/src/RepoM.App/MainWindow.xaml b/src/RepoM.App/MainWindow.xaml index 62bc683b..921d9c42 100644 --- a/src/RepoM.App/MainWindow.xaml +++ b/src/RepoM.App/MainWindow.xaml @@ -34,111 +34,114 @@ - + - - - + + - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - -