mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-25 14:24:32 +00:00
8ff960189e
- Update: Added "Copy Password" to Mafile context menu (if available) - Update: "Save Password" now pre-fills the current password in the "Login Again" dialog when encryption is enabled - Fix: Prevented overlapping confirmation cycles in AutoConfirmer - Fix: Added a Snackbar notification when a confirmation cycle is skipped due to a too frequent timer interval - Fix: Fixed a rare bug where the previous proxy was used instead of the current one during session refresh - Fix: Corrected "Session Permanently Expired" message showing on unrelated errors (e.g. network issues) - UI-Fix: Fixed visual glitch where proxy input appeared non-empty when switching to a mafile-specific proxy - Cleanup: Refactored and cleaned up codebase, improved styling and formatting via ReSharper
75 lines
1.9 KiB
C#
75 lines
1.9 KiB
C#
using System;
|
|
using System.IO;
|
|
using AutoUpdaterDotNET;
|
|
using NebulaAuth.Model;
|
|
|
|
namespace NebulaAuth.Core;
|
|
|
|
public static class UpdateManager
|
|
{
|
|
private const string UPDATE_URL =
|
|
"https://raw.githubusercontent.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/master/NebulaAuth/update.xml";
|
|
|
|
public static void CheckForUpdates()
|
|
{
|
|
var jsonPath = Path.Combine(Environment.CurrentDirectory, "update-settings.json");
|
|
AutoUpdater.PersistenceProvider = new JsonFilePersistenceProvider(jsonPath);
|
|
AutoUpdater.ShowSkipButton = false;
|
|
if (Settings.Instance.AllowAutoUpdate)
|
|
AutoUpdater.UpdateMode = Mode.ForcedDownload;
|
|
AutoUpdater.Start(UPDATE_URL);
|
|
}
|
|
|
|
|
|
//static UpdateManager()
|
|
//{
|
|
// //AutoUpdater.CheckForUpdateEvent += AutoUpdaterOnCheckForUpdateEvent;
|
|
|
|
//}
|
|
|
|
//private static async void AutoUpdaterOnCheckForUpdateEvent(UpdateInfoEventArgs args)
|
|
//{
|
|
// if (args.Error == null)
|
|
// {
|
|
// if (args.IsUpdateAvailable)
|
|
// {
|
|
// DialogResult dialogResult;
|
|
// var dialog = new UpdaterView()
|
|
// {
|
|
// DataContext = new UpdaterVM(args)
|
|
// };
|
|
|
|
// await DialogHost.Show(dialog);
|
|
// Application.Current.Shutdown();
|
|
|
|
// }
|
|
// else
|
|
// {
|
|
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// if (args.Error is WebException)
|
|
// {
|
|
|
|
// }
|
|
// else
|
|
// {
|
|
|
|
// }
|
|
// }
|
|
|
|
//}
|
|
|
|
//private static void RunUpdate(UpdateInfoEventArgs args)
|
|
//{
|
|
// Application.Current.Dispatcher.Invoke(() =>
|
|
// {
|
|
// if (AutoUpdater.DownloadUpdate(args))
|
|
// {
|
|
// Application.Current.Shutdown();
|
|
// }
|
|
// }, DispatcherPriority.ContextIdle);
|
|
//}
|
|
} |