diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6e5e01e..ab6e91a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -77,6 +77,8 @@ jobs: - name: Validate Deployment Tool Attestation working-directory: ${{ steps.deploytool.outputs.home }} run: gh attestation verify DragonFruit.OnionFruit.Deploy.dll --repo dragonfruitnetwork/onionfruit-deploy --deny-self-hosted-runners + env: + GH_TOKEN: ${{ github.token }} - name: Restore .NET Tools run: dotnet tool restore diff --git a/DragonFruit.OnionFruit/App.axaml.cs b/DragonFruit.OnionFruit/App.axaml.cs index 2ce9b4b..026b4da 100644 --- a/DragonFruit.OnionFruit/App.axaml.cs +++ b/DragonFruit.OnionFruit/App.axaml.cs @@ -22,6 +22,7 @@ using LucideAvalonia.Enum; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; using Nito.AsyncEx; using ReactiveUI; @@ -254,7 +255,15 @@ public static bool Launch(string url) UseShellExecute = true }; - return Process.Start(psi) != null; + try + { + return Process.Start(psi) != null; + } + catch (Exception e) + { + Instance.Services.GetRequiredService>().LogWarning(e, "Failed to launch URL due to an error: {err}", e.Message); + return false; + } } public static IconSource GetIcon(LucideIconNames icon, IImmutableSolidColorBrush brush = null, double thickness = 1.5) diff --git a/DragonFruit.OnionFruit/Updater/VelopackUpdater.cs b/DragonFruit.OnionFruit/Updater/VelopackUpdater.cs index 32ac624..4303e1b 100644 --- a/DragonFruit.OnionFruit/Updater/VelopackUpdater.cs +++ b/DragonFruit.OnionFruit/Updater/VelopackUpdater.cs @@ -89,7 +89,7 @@ private async Task PerformUpdateCheckInternal() } catch (Exception e) { - _logger.LogError(e, "Failed to perform updater: {message}", e.Message); + _logger.LogError(e, "Failed to perform update: {message}", e.Message); Status = OnionFruitUpdaterStatus.Failed; } } diff --git a/DragonFruit.OnionFruit/ViewModels/AboutPageTabViewModel.cs b/DragonFruit.OnionFruit/ViewModels/AboutPageTabViewModel.cs index 70739fa..6f67a50 100644 --- a/DragonFruit.OnionFruit/ViewModels/AboutPageTabViewModel.cs +++ b/DragonFruit.OnionFruit/ViewModels/AboutPageTabViewModel.cs @@ -51,10 +51,10 @@ public AboutPageTabViewModel(IOnionFruitUpdater updater, ILogger "Checking for updates...", - OnionFruitUpdaterStatus.Downloading when x.Second.HasValue => $"Downloading update ({x.Second}%)", + OnionFruitUpdaterStatus.Downloading when x.Second.HasValue => $"Downloading ({x.Second}%)", OnionFruitUpdaterStatus.Failed when x.Second.HasValue => "Update failed", - OnionFruitUpdaterStatus.Downloading => "Downloading update...", + OnionFruitUpdaterStatus.Downloading => "Downloading...", OnionFruitUpdaterStatus.Failed => "Update check failed", OnionFruitUpdaterStatus.UpToDate => "No updates available", diff --git a/DragonFruit.OnionFruit/ViewModels/MainWindowViewModel.cs b/DragonFruit.OnionFruit/ViewModels/MainWindowViewModel.cs index 5e13895..31eb1bb 100644 --- a/DragonFruit.OnionFruit/ViewModels/MainWindowViewModel.cs +++ b/DragonFruit.OnionFruit/ViewModels/MainWindowViewModel.cs @@ -225,10 +225,10 @@ private static IEnumerable ProcessCountries(EventPattern current.Status switch { - OnionFruitUpdaterStatus.Downloading when current.Progress.HasValue => $"{App.Title} - Downloading update ({current.Progress}%)", - OnionFruitUpdaterStatus.Downloading => $"{App.Title} - Downloading update", - OnionFruitUpdaterStatus.PendingRestart => $"{App.Title} - Update downloaded (pending restart)", - OnionFruitUpdaterStatus.Failed => $"{App.Title} - Update failed", + OnionFruitUpdaterStatus.Downloading when current.Progress.HasValue => $"{App.Title} - Downloading Update ({current.Progress}%)", + OnionFruitUpdaterStatus.Downloading => $"{App.Title} - Downloading Update", + OnionFruitUpdaterStatus.PendingRestart => $"{App.Title} - Update Downloaded", + OnionFruitUpdaterStatus.Failed => $"{App.Title} - Update Failed", _ => App.Title };