Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

feat: add view latest release button to settings

itsfatduckcfa1b892a5a1
diff --git a/optimizerDuck/Resources/Languages/Translations.Designer.cs b/optimizerDuck/Resources/Languages/Translations.Designer.cs
index 275bfcb..c472dd7 100644
--- a/optimizerDuck/Resources/Languages/Translations.Designer.cs
+++ b/optimizerDuck/Resources/Languages/Translations.Designer.cs
@@ -122,6 +122,15 @@ namespace optimizerDuck.Resources.Languages {
}
}
+ /// <summary>
+ /// Looks up a localized string similar to View latest release.
+ /// </summary>
+ public static string Button_ViewLatestRelease {
+ get {
+ return ResourceManager.GetString("Button.ViewLatestRelease", resourceCulture);
+ }
+ }
+
/// <summary>
/// Looks up a localized string similar to Applied on {0} days ago.
/// </summary>
@@ -2024,7 +2033,8 @@ namespace optimizerDuck.Resources.Languages {
}
/// <summary>
- /// Looks up a localized string similar to Thank you for your trust and support &lt;3! Current version: {0}.
+ /// Looks up a localized string similar to Thank you for your trust and support &lt;3!
+ ///Current version: {0}.
/// </summary>
public static string Settings_About_Duck_Description {
get {
diff --git a/optimizerDuck/Resources/Languages/Translations.resx b/optimizerDuck/Resources/Languages/Translations.resx
index dfedf94..b0bacdc 100644
--- a/optimizerDuck/Resources/Languages/Translations.resx
+++ b/optimizerDuck/Resources/Languages/Translations.resx
@@ -316,7 +316,8 @@
<value>Retry</value>
</data>
<data name="Settings.About.Duck.Description" xml:space="preserve">
- <value>Thank you for your trust and support &lt;3! Current version: {0}</value>
+ <value><![CDATA[Thank you for your trust and support <3!
+Current version: {0}]]></value>
</data>
<data name="Settings.Advanced.Header" xml:space="preserve">
<value>Advanced</value>
@@ -793,4 +794,7 @@
<data name="Snackbar.OpenFailed.Title" xml:space="preserve">
<value>Unable to open the folder or file</value>
</data>
+ <data name="Button.ViewLatestRelease" xml:space="preserve">
+ <value>View latest release</value>
+ </data>
</root>
\ No newline at end of file
diff --git a/optimizerDuck/Resources/Languages/Translations.vi-vn.resx b/optimizerDuck/Resources/Languages/Translations.vi-vn.resx
index 9286a65..2eb3688 100644
--- a/optimizerDuck/Resources/Languages/Translations.vi-vn.resx
+++ b/optimizerDuck/Resources/Languages/Translations.vi-vn.resx
@@ -787,4 +787,7 @@
<data name="Optimizer.Performance.SvcHostSplit.ShortDescription" xml:space="preserve">
<value>Điều chỉnh ngưỡng tách Service Host dựa trên dung lượng RAM đã cài đặt nhằm cải thiện khả năng cô lập tiến trình và độ ổn định.</value>
</data>
+ <data name="Button.ViewLatestRelease" xml:space="preserve">
+ <value>Xem bản phát hành mới nhất</value>
+ </data>
</root>
\ No newline at end of file
diff --git a/optimizerDuck/Services/UpdaterService.cs b/optimizerDuck/Services/UpdaterService.cs
index e165ee2..944c286 100644
--- a/optimizerDuck/Services/UpdaterService.cs
+++ b/optimizerDuck/Services/UpdaterService.cs
@@ -6,6 +6,7 @@ using System.Reflection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using optimizerDuck.Common.Extensions;
+using optimizerDuck.Common.Helpers;
namespace optimizerDuck.Services;
@@ -28,7 +29,8 @@ public class UpdaterService
public async Task<bool> CheckForUpdatesAsync()
{
- _logger.LogInformation("Checking for updates...");
+ _logger.LogInformation("Checking for updates (Current version: {CurrentVersion})",
+ Shared.FileVersion);
try
{
@@ -59,8 +61,7 @@ public class UpdaterService
return false;
}
- var currentVersion = Assembly.GetExecutingAssembly().GetName().Version
- ?? new Version(0, 0, 0);
+ var currentVersion = Version.Parse(Shared.FileVersion);
if (latestVersion > currentVersion)
{
diff --git a/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs b/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
index cc3dc17..535e21c 100644
--- a/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
+++ b/optimizerDuck/UI/ViewModels/Pages/SettingsViewModel.cs
@@ -163,6 +163,31 @@ public partial class SettingsViewModel(
logger.LogError(ex, "Failed to open acknowledgements page");
}
}
+
+ [RelayCommand]
+ private void OpenLatestRelease()
+ {
+ try
+ {
+ logger.LogInformation("Opening latest release page: {Url}", UpdaterService.LatestReleaseUrl);
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = UpdaterService.LatestReleaseUrl,
+ UseShellExecute = true
+ });
+ }
+ catch (Exception ex)
+ {
+ snackbarService.Show(
+ Translations.Snackbar_OpenLinkFailed_Title,
+ Translations.Snackbar_OpenLinkFailed_Message,
+ ControlAppearance.Danger,
+ new SymbolIcon { Symbol = SymbolRegular.ErrorCircle24, Filled = true },
+ TimeSpan.FromSeconds(5)
+ );
+ logger.LogError(ex, "Failed to open latest release page");
+ }
+ }
#endregion Commands
diff --git a/optimizerDuck/UI/Views/Pages/SettingsPage.xaml b/optimizerDuck/UI/Views/Pages/SettingsPage.xaml
index 56d087f..29c246c 100644
--- a/optimizerDuck/UI/Views/Pages/SettingsPage.xaml
+++ b/optimizerDuck/UI/Views/Pages/SettingsPage.xaml
@@ -197,7 +197,7 @@
<ui:CardControl>
<ui:CardControl.Icon>
- <ui:ImageIcon Height="26" Source="pack://application:,,,/optimizerDuck;component/Resources/Images/Duck.png" />
+ <ui:ImageIcon Height="25" Source="pack://application:,,,/optimizerDuck;component/Resources/Images/Duck.png" />
</ui:CardControl.Icon>
<ui:CardControl.Header>
@@ -214,6 +214,12 @@
TextWrapping="Wrap" />
</StackPanel>
</ui:CardControl.Header>
+
+ <ui:Button
+ Command="{Binding ViewModel.OpenLatestReleaseCommand}"
+ Content="{ext:Loc Button.ViewLatestRelease}"
+ Cursor="Hand"
+ Icon="{ui:SymbolIcon Open24}" />
</ui:CardControl>
<ui:CardAction Command="{Binding ViewModel.OpenAcknowledgementsCommand}" VerticalAlignment="Stretch">
diff --git a/optimizerDuck/optimizerDuck.csproj b/optimizerDuck/optimizerDuck.csproj
index 574737b..f162526 100644
--- a/optimizerDuck/optimizerDuck.csproj
+++ b/optimizerDuck/optimizerDuck.csproj
@@ -10,7 +10,7 @@
<Authors>fatDuck</Authors>
<ApplicationIcon>Logo.ico</ApplicationIcon>
<Company>fatDuck</Company>
- <FileVersion>2.0.0</FileVersion>
+ <FileVersion>2.1.0</FileVersion>
<Version>1.0.0</Version>
<Product>optimizerDuck</Product>
<Copyright>Copyright fatDuck 2026</Copyright>