From af0615bb2031e87f926f8e4e0ecfa8f0dde6e603 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 3 Jun 2024 22:36:49 +0900
Subject: [PATCH 1/6] Init
---
src/Files.App/Files.App.csproj | 4 -
src/Files.App/Strings/en-US/Resources.resw | 4 +-
src/Files.App/Views/Settings/AboutPage.xaml | 105 ++++++++++++++++++--
3 files changed, 97 insertions(+), 16 deletions(-)
diff --git a/src/Files.App/Files.App.csproj b/src/Files.App/Files.App.csproj
index e181346644b6..93019cb21b0a 100644
--- a/src/Files.App/Files.App.csproj
+++ b/src/Files.App/Files.App.csproj
@@ -48,10 +48,6 @@
PreserveNewest
-
- NOTICE.md
- PreserveNewest
-
PreserveNewest
diff --git a/src/Files.App/Strings/en-US/Resources.resw b/src/Files.App/Strings/en-US/Resources.resw
index 4c9ebf1059ba..78ab9d2632b5 100644
--- a/src/Files.App/Strings/en-US/Resources.resw
+++ b/src/Files.App/Strings/en-US/Resources.resw
@@ -1820,8 +1820,8 @@
No reduced color
-
- Third party licenses
+
+ Third party libraries
This option modifies the system registry and can have unexpected side effects on your device. Continue at your own risk.
diff --git a/src/Files.App/Views/Settings/AboutPage.xaml b/src/Files.App/Views/Settings/AboutPage.xaml
index ce843a43d7f3..c7a94e6d44ac 100644
--- a/src/Files.App/Views/Settings/AboutPage.xaml
+++ b/src/Files.App/Views/Settings/AboutPage.xaml
@@ -181,20 +181,105 @@
-
+
-
-
+
+
+
+
+
+
+
+ ByteSize
+
+
+ CommunityToolkit.Mvvm
+
+
+ DiscUtils.Udf
+
+
+ FluentFTP
+
+
+ INI File Parser
+
+
+ libgit2sharp
+
+
+ LiteDB
+
+
+ LiveChartsCore.SkiaSharpView.WinUI
+
+
+ MessageFormat
+
+
+ Microsoft.Data.Sqlite.Core
+
+
+ Microsoft.Extensions.DependencyInjection
+
+
+ Microsoft.Extensions.Hosting
+
+
+ Microsoft.Extensions.Logging
+
+
+ SevenZipSharp
+
+
+ 7 zip
+
+
+ SQLitePCLRaw
+
+
+ Microsoft.WindowsAppSDK
+
+
+ Microsoft.Graphics.Win2D
+
+
+ CommunityToolkit.WinUI.UI.Behaviors
+
+
+ CommunityToolkit.WinUI.UI.Controls
+
+
+ TagLibSharp
+
+
+ Tulpep.ActiveDirectoryObjectPicker
+
+
+ WinUIEx
+
+
+ Vanara
+
+
+ Microsoft.Management.Infrastructure
+
+
+ Microsoft.Windows.CsWin32
+
+
+ Microsoft.Windows.CsWinRT
+
+
+
From 7eb1ccce1344e5c7153c579a72a969d9199e5712 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 3 Jun 2024 22:39:10 +0900
Subject: [PATCH 2/6] Removed obsolete code
---
.../ViewModels/Settings/AboutViewModel.cs | 44 ++++++++-----------
.../Views/Settings/AboutPage.xaml.cs | 12 -----
2 files changed, 19 insertions(+), 37 deletions(-)
diff --git a/src/Files.App/ViewModels/Settings/AboutViewModel.cs b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
index 746cd2bb0e51..b307afa8f330 100644
--- a/src/Files.App/ViewModels/Settings/AboutViewModel.cs
+++ b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
@@ -13,7 +13,22 @@ namespace Files.App.ViewModels.Settings
{
public sealed class AboutViewModel : ObservableObject
{
- protected readonly IFileTagsSettingsService FileTagsSettingsService = Ioc.Default.GetRequiredService();
+ // Dependency injections
+
+ private readonly IFileTagsSettingsService FileTagsSettingsService = Ioc.Default.GetRequiredService();
+
+ // Properties
+
+ public string Version
+ => string.Format($"{"SettingsAboutVersionTitle".GetLocalizedResource()} {AppVersion.Major}.{AppVersion.Minor}.{AppVersion.Build}.{AppVersion.Revision}");
+
+ public string AppName
+ => Package.Current.DisplayName;
+
+ public PackageVersion AppVersion
+ => Package.Current.Id.Version;
+
+ // Commands
public ICommand CopyAppVersionCommand { get; }
public ICommand CopyWindowsVersionCommand { get; }
@@ -27,12 +42,7 @@ public sealed class AboutViewModel : ObservableObject
public ICommand OpenPrivacyPolicyCommand { get; }
public ICommand OpenCrowdinCommand { get; }
- private string _ThirdPartyNotices = string.Empty;
- public string ThirdPartyNotices
- {
- get => _ThirdPartyNotices;
- set => SetProperty(ref _ThirdPartyNotices, value);
- }
+ // Constructor
public AboutViewModel()
{
@@ -49,6 +59,8 @@ public AboutViewModel()
OpenCrowdinCommand = new AsyncRelayCommand(DoOpenCrowdin);
}
+ // Methods
+
private async Task OpenLogLocation()
{
await Launcher.LaunchFolderAsync(ApplicationData.Current.LocalFolder).AsTask();
@@ -95,7 +107,6 @@ public Task DoOpenPrivacyPolicy()
return Launcher.LaunchUriAsync(new Uri(Constants.ExternalUrl.PrivacyPolicyUrl)).AsTask();
}
-
public Task DoOpenCrowdin()
{
return Launcher.LaunchUriAsync(new Uri(Constants.ExternalUrl.CrowdinUrl)).AsTask();
@@ -128,12 +139,6 @@ public Task SupportUs()
return Launcher.LaunchUriAsync(new Uri(Constants.ExternalUrl.SupportUsUrl)).AsTask();
}
- public async Task LoadThirdPartyNoticesAsync()
- {
- StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri(Constants.DocsPath.ThirdPartyNoticePath));
- ThirdPartyNotices = await FileIO.ReadTextAsync(file);
- }
-
public string GetAppVersion()
{
return string.Format($"{AppVersion.Major}.{AppVersion.Minor}.{AppVersion.Build}.{AppVersion.Revision}");
@@ -151,16 +156,5 @@ public string GetVersionsQueryString()
query["windows_version"] = GetWindowsVersion();
return query.ToString() ?? string.Empty;
}
-
- public string Version
- {
- get
- {
- return string.Format($"{"SettingsAboutVersionTitle".GetLocalizedResource()} {AppVersion.Major}.{AppVersion.Minor}.{AppVersion.Build}.{AppVersion.Revision}");
- }
- }
-
- public string AppName => Package.Current.DisplayName;
- public PackageVersion AppVersion => Package.Current.Id.Version;
}
}
diff --git a/src/Files.App/Views/Settings/AboutPage.xaml.cs b/src/Files.App/Views/Settings/AboutPage.xaml.cs
index 07d55d0926a2..3706762e65bb 100644
--- a/src/Files.App/Views/Settings/AboutPage.xaml.cs
+++ b/src/Files.App/Views/Settings/AboutPage.xaml.cs
@@ -13,17 +13,5 @@ public AboutPage()
{
InitializeComponent();
}
-
- private async void ThirdPartyLicenses_Click(object sender, bool e)
- {
- if (e && string.IsNullOrEmpty(ViewModel.ThirdPartyNotices))
- await ViewModel.LoadThirdPartyNoticesAsync();
- }
-
- private async void MarkdownTextBlock_LinkClicked(object sender, LinkClickedEventArgs e)
- {
- if (Uri.TryCreate(e.Link, UriKind.Absolute, out Uri? link))
- await Launcher.LaunchUriAsync(link);
- }
}
}
From e51861f4ad2647ffb69dbb56d9d6b2b7851a4476 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 3 Jun 2024 22:40:54 +0900
Subject: [PATCH 3/6] Added comments and removed unused using directives
---
src/Files.App/ViewModels/Settings/AboutViewModel.cs | 6 ++++++
src/Files.App/Views/Settings/AboutPage.xaml.cs | 2 --
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/Files.App/ViewModels/Settings/AboutViewModel.cs b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
index b307afa8f330..ce7300f0f69b 100644
--- a/src/Files.App/ViewModels/Settings/AboutViewModel.cs
+++ b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
@@ -11,6 +11,9 @@
namespace Files.App.ViewModels.Settings
{
+ ///
+ /// Represents view model of .
+ ///
public sealed class AboutViewModel : ObservableObject
{
// Dependency injections
@@ -44,6 +47,9 @@ public PackageVersion AppVersion
// Constructor
+ ///
+ /// Initializes an instance of class.
+ ///
public AboutViewModel()
{
CopyAppVersionCommand = new RelayCommand(CopyAppVersion);
diff --git a/src/Files.App/Views/Settings/AboutPage.xaml.cs b/src/Files.App/Views/Settings/AboutPage.xaml.cs
index 3706762e65bb..456b3b7ebc5b 100644
--- a/src/Files.App/Views/Settings/AboutPage.xaml.cs
+++ b/src/Files.App/Views/Settings/AboutPage.xaml.cs
@@ -1,9 +1,7 @@
// Copyright (c) 2024 Files Community
// Licensed under the MIT License. See the LICENSE.
-using CommunityToolkit.WinUI.UI.Controls;
using Microsoft.UI.Xaml.Controls;
-using Windows.System;
namespace Files.App.Views.Settings
{
From 7c42faa6cba8e807757ce75ba3bcd943af3eb75f Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Mon, 3 Jun 2024 22:41:22 +0900
Subject: [PATCH 4/6] Removed unused DI in AboutViewModel
---
src/Files.App/ViewModels/Settings/AboutViewModel.cs | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/Files.App/ViewModels/Settings/AboutViewModel.cs b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
index ce7300f0f69b..2afc627367ad 100644
--- a/src/Files.App/ViewModels/Settings/AboutViewModel.cs
+++ b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
@@ -16,10 +16,6 @@ namespace Files.App.ViewModels.Settings
///
public sealed class AboutViewModel : ObservableObject
{
- // Dependency injections
-
- private readonly IFileTagsSettingsService FileTagsSettingsService = Ioc.Default.GetRequiredService();
-
// Properties
public string Version
From 524b60cb30db95a3151a1b42d9be28eb93d01e67 Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Fri, 7 Jun 2024 23:54:39 +0900
Subject: [PATCH 5/6] Remove scrollview and use collection instead
---
.../Data/Items/OpenSourceLibraryItem.cs | 32 +++++
.../ViewModels/Settings/AboutViewModel.cs | 31 +++++
src/Files.App/Views/Settings/AboutPage.xaml | 117 ++++--------------
3 files changed, 85 insertions(+), 95 deletions(-)
create mode 100644 src/Files.App/Data/Items/OpenSourceLibraryItem.cs
diff --git a/src/Files.App/Data/Items/OpenSourceLibraryItem.cs b/src/Files.App/Data/Items/OpenSourceLibraryItem.cs
new file mode 100644
index 000000000000..1e6d2428a07a
--- /dev/null
+++ b/src/Files.App/Data/Items/OpenSourceLibraryItem.cs
@@ -0,0 +1,32 @@
+// Copyright (c) 2024 Files Community
+// Licensed under the MIT License. See the LICENSE.
+
+namespace Files.App.Data.Items
+{
+ ///
+ /// Represents an item for open source library shown on .
+ ///
+ public class OpenSourceLibraryItem
+ {
+ ///
+ /// Gets the URL that navigates to the open source library.
+ ///
+ public string Url { get; } = "";
+
+ ///
+ /// Gets the name of the open source library.
+ ///
+ public string Name { get; } = "";
+
+ ///
+ /// Initializes an instance of class.
+ ///
+ /// The URL
+ /// The name
+ public OpenSourceLibraryItem(string url, string name)
+ {
+ Url = url;
+ Name = name;
+ }
+ }
+}
diff --git a/src/Files.App/ViewModels/Settings/AboutViewModel.cs b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
index 2afc627367ad..2e804bdc6eb7 100644
--- a/src/Files.App/ViewModels/Settings/AboutViewModel.cs
+++ b/src/Files.App/ViewModels/Settings/AboutViewModel.cs
@@ -27,6 +27,8 @@ public string AppName
public PackageVersion AppVersion
=> Package.Current.Id.Version;
+ public ObservableCollection OpenSourceLibraries { get; }
+
// Commands
public ICommand CopyAppVersionCommand { get; }
@@ -48,6 +50,35 @@ public PackageVersion AppVersion
///
public AboutViewModel()
{
+ OpenSourceLibraries =
+ [
+ new ("https://github.com/omar/ByteSize", "ByteSize"),
+ new ("https://github.com/CommunityToolkit/dotnet", "CommunityToolkit.Mvvm"),
+ new ("https://github.com/DiscUtils/DiscUtils", "DiscUtils.Udf"),
+ new ("https://github.com/robinrodricks/FluentFTP", "FluentFTP"),
+ new ("https://github.com/rickyah/ini-parser", "INI File Parser"),
+ new ("https://github.com/libgit2/libgit2sharp", "libgit2sharp"),
+ new ("https://github.com/mbdavid/LiteDB", "LiteDB"),
+ new ("https://github.com/beto-rodriguez/LiveCharts2", "LiveCharts2"),
+ new ("https://github.com/jeffijoe/messageformat.net", "MessageFormat"),
+ new ("https://github.com/dotnet/efcore", "EF Core for SQLite"),
+ new ("https://github.com/dotnet/runtime", "Microsoft.Extensions"),
+ new ("https://github.com/files-community/SevenZipSharp", "SevenZipSharp"),
+ new ("https://sourceforge.net/projects/sevenzip", "7zip"),
+ new ("https://github.com/ericsink/SQLitePCL.raw", "PCL for SQLite"),
+ new ("https://github.com/microsoft/WindowsAppSDK", "WindowsAppSDK"),
+ new ("https://github.com/microsoft/microsoft-ui-xaml", "WinUI 3"),
+ new ("https://github.com/microsoft/Win2D", "Win2D"),
+ new ("https://github.com/CommunityToolkit/WindowsCommunityToolkit", "Windows Community Toolkit 7.x"),
+ new ("https://github.com/mono/taglib-sharp", "TagLibSharp"),
+ new ("https://github.com/Tulpep/Active-Directory-Object-Picker", "ActiveDirectoryObjectPicker"),
+ new ("https://github.com/dotMorten/WinUIEx", "WinUIEx"),
+ new ("https://github.com/dahall/Vanara", "Vanara"),
+ new ("https://github.com/PowerShell/MMI", "MMI"),
+ new ("https://github.com/microsoft/CsWin32", "CsWin32"),
+ new ("https://github.com/microsoft/CsWinRT", "CsWinRT"),
+ ];
+
CopyAppVersionCommand = new RelayCommand(CopyAppVersion);
CopyWindowsVersionCommand = new RelayCommand(CopyWindowsVersion);
SupportUsCommand = new AsyncRelayCommand(SupportUs);
diff --git a/src/Files.App/Views/Settings/AboutPage.xaml b/src/Files.App/Views/Settings/AboutPage.xaml
index c7a94e6d44ac..49056276d04f 100644
--- a/src/Files.App/Views/Settings/AboutPage.xaml
+++ b/src/Files.App/Views/Settings/AboutPage.xaml
@@ -5,6 +5,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:dataitems="using:Files.App.Data.Items"
xmlns:helpers="using:Files.App.Helpers"
xmlns:local="using:Files.App.UserControls.Settings"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -186,101 +187,27 @@
-
-
-
-
-
-
-
- ByteSize
-
-
- CommunityToolkit.Mvvm
-
-
- DiscUtils.Udf
-
-
- FluentFTP
-
-
- INI File Parser
-
-
- libgit2sharp
-
-
- LiteDB
-
-
- LiveChartsCore.SkiaSharpView.WinUI
-
-
- MessageFormat
-
-
- Microsoft.Data.Sqlite.Core
-
-
- Microsoft.Extensions.DependencyInjection
-
-
- Microsoft.Extensions.Hosting
-
-
- Microsoft.Extensions.Logging
-
-
- SevenZipSharp
-
-
- 7 zip
-
-
- SQLitePCLRaw
-
-
- Microsoft.WindowsAppSDK
-
-
- Microsoft.Graphics.Win2D
-
-
- CommunityToolkit.WinUI.UI.Behaviors
-
-
- CommunityToolkit.WinUI.UI.Controls
-
-
- TagLibSharp
-
-
- Tulpep.ActiveDirectoryObjectPicker
-
-
- WinUIEx
-
-
- Vanara
-
-
- Microsoft.Management.Infrastructure
-
-
- Microsoft.Windows.CsWin32
-
-
- Microsoft.Windows.CsWinRT
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 9355858e02f728a90306a6718fadec05adbd0eee Mon Sep 17 00:00:00 2001
From: 0x5bfa <62196528+0x5bfa@users.noreply.github.com>
Date: Tue, 11 Jun 2024 03:13:10 +0900
Subject: [PATCH 6/6] Improved UI
---
src/Files.App/Views/Settings/AboutPage.xaml | 27 ++++++++++-----------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/Files.App/Views/Settings/AboutPage.xaml b/src/Files.App/Views/Settings/AboutPage.xaml
index 49056276d04f..ecc09c8e4644 100644
--- a/src/Files.App/Views/Settings/AboutPage.xaml
+++ b/src/Files.App/Views/Settings/AboutPage.xaml
@@ -187,17 +187,8 @@
-
-
-
-
-
+
+
@@ -205,9 +196,17 @@
-
-
-
+
+
+
+
+