mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-25 06:14:31 +00:00
Merge pull request #2 from achiez/pre-release
Pre release -> Release master
This commit is contained in:
@@ -23,6 +23,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "changelog", "changelog", "{
|
||||
changelog\1.4.9.html = changelog\1.4.9.html
|
||||
changelog\1.5.0.html = changelog\1.5.0.html
|
||||
changelog\1.5.1.html = changelog\1.5.1.html
|
||||
changelog\1.5.2.html = changelog\1.5.2.html
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
|
||||
@@ -5,7 +5,6 @@ using NebulaAuth.Model.Entities;
|
||||
using NebulaAuth.View;
|
||||
using NebulaAuth.View.Dialogs;
|
||||
using NebulaAuth.ViewModel.Other;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
|
||||
namespace NebulaAuth.Core;
|
||||
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
using AutoUpdaterDotNET;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using NebulaAuth.Model;
|
||||
using NebulaAuth.View;
|
||||
using NebulaAuth.ViewModel.Other;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Threading;
|
||||
using Application = System.Windows.Application;
|
||||
|
||||
|
||||
namespace NebulaAuth.Core;
|
||||
@@ -29,55 +22,55 @@ public static class UpdateManager
|
||||
}
|
||||
|
||||
|
||||
static UpdateManager()
|
||||
{
|
||||
//AutoUpdater.CheckForUpdateEvent += AutoUpdaterOnCheckForUpdateEvent;
|
||||
//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)
|
||||
};
|
||||
//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();
|
||||
// await DialogHost.Show(dialog);
|
||||
// Application.Current.Shutdown();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (args.Error is WebException)
|
||||
{
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (args.Error is WebException)
|
||||
// {
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
private static void RunUpdate(UpdateInfoEventArgs args)
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (AutoUpdater.DownloadUpdate(args))
|
||||
{
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
}, DispatcherPriority.ContextIdle);
|
||||
}
|
||||
//private static void RunUpdate(UpdateInfoEventArgs args)
|
||||
//{
|
||||
// Application.Current.Dispatcher.Invoke(() =>
|
||||
// {
|
||||
// if (AutoUpdater.DownloadUpdate(args))
|
||||
// {
|
||||
// Application.Current.Shutdown();
|
||||
// }
|
||||
// }, DispatcherPriority.ContextIdle);
|
||||
//}
|
||||
}
|
||||
@@ -137,6 +137,7 @@
|
||||
<ListBox Grid.Row="0" w:FontScaleWindow.Scale="0.8" w:FontScaleWindow.ResizeFont="True" Margin="10,15,10,15" DisplayMemberPath="AccountName" ItemsSource="{Binding MaFiles}" SelectedValue="{Binding SelectedMafile}">
|
||||
<FrameworkElement.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{Tr MainWindow.ContextMenus.Mafile.CopyLogin}" Command="{Binding CopyLoginCommand}" CommandParameter="{Binding PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType=ContextMenu}}"></MenuItem>
|
||||
<MenuItem Header="{Tr MainWindow.ContextMenus.Mafile.AddToGroup}" ItemsSource="{Binding Groups}">
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style BasedOn="{StaticResource MaterialDesignMenuItem}" TargetType="{x:Type MenuItem}">
|
||||
@@ -156,11 +157,15 @@
|
||||
</ContextMenu>
|
||||
</FrameworkElement.ContextMenu>
|
||||
</ListBox>
|
||||
<TextBlock Visibility="{Binding MaFiles.Count, Converter={StaticResource AnyMafilesToVisibilityConverter}, Mode=OneWay}" Margin="5" FontSize="16" Grid.Row="0" TextWrapping="WrapWithOverflow" Text="{Tr MainWindow.Global.StartTip}">
|
||||
<TextBlock.Background>
|
||||
<Border Grid.Row="0" Margin="10" Padding="5" Visibility="{Binding MaFiles.Count, Converter={StaticResource AnyMafilesToVisibilityConverter}, Mode=OneWay}">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="DarkGray" Opacity="0.5"/>
|
||||
</TextBlock.Background>
|
||||
</Border.Background>
|
||||
<TextBlock TextWrapping="WrapWithOverflow" FontSize="16" Text="{Tr MainWindow.Global.StartTip}">
|
||||
|
||||
|
||||
</TextBlock>
|
||||
</Border>
|
||||
<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}" md:TextFieldAssist.HasClearButton="True" w:FontScaleWindow.Scale="0.7" w:FontScaleWindow.ResizeFont="True" Grid.Row="1" Margin="10" md:HintAssist.Hint="{Tr MainWindow.LeftPart.SearchBoxHint}" Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</Grid>
|
||||
<md:Card Grid.Column="1" Margin="10,10,15,10" UniformCornerRadius="15">
|
||||
|
||||
@@ -9,7 +9,6 @@ using SteamLib.Utility.MaFiles;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.DirectoryServices.ActiveDirectory;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
@@ -10,26 +10,28 @@
|
||||
<SatelliteResourceLanguages>en;ru;ua</SatelliteResourceLanguages>
|
||||
<ApplicationIcon>Theme\lock.ico</ApplicationIcon>
|
||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||
<AssemblyVersion>1.5.1</AssemblyVersion>
|
||||
<AssemblyVersion>1.5.2</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Theme\1140x641.jpg" />
|
||||
<None Remove="Theme\Background.jpg" />
|
||||
<None Remove="Theme\lock.ico" />
|
||||
<None Remove="Theme\SplashScreen.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autoupdater.NET.Official" Version="1.8.5" />
|
||||
<PackageReference Include="CodingSeb.Localization.JsonFileLoader" Version="1.3.0" />
|
||||
<PackageReference Include="CodingSeb.Localization.WPF" Version="1.3.0" />
|
||||
<PackageReference Include="CodingSebLocalization.Fody" Version="1.3.0" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
|
||||
<PackageReference Include="CodingSeb.Localization.JsonFileLoader" Version="1.3.1" />
|
||||
<PackageReference Include="CodingSeb.Localization.WPF" Version="1.3.3" />
|
||||
<PackageReference Include="CodingSebLocalization.Fody" Version="1.3.1" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.0" />
|
||||
<PackageReference Include="MaterialDesignColors" Version="2.1.4" />
|
||||
<PackageReference Include="MaterialDesignExtensions" Version="4.0.0-a02" />
|
||||
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
|
||||
<PackageReference Include="NLog" Version="5.2.8" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.122" />
|
||||
<PackageReference Include="NLog" Version="5.3.3" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.12" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -48,6 +50,10 @@
|
||||
<ProjectReference Include="..\SteamLibForked\SteamLibForked.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SplashScreen Include="Theme\SplashScreen.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="View\Dialogs\LoginAgainOnImportDialog.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 413 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 213 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 126 KiB |
@@ -1,6 +1,4 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace NebulaAuth.View.Dialogs
|
||||
namespace NebulaAuth.View.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для LoginAgainDialog.xaml
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:theme="clr-namespace:NebulaAuth.Theme"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
theme:FontScaleWindow.ResizeFont="True" theme:FontScaleWindow.Scale="1"
|
||||
Foreground="WhiteSmoke"
|
||||
Background="{DynamicResource WindowBackground}">
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<ComboBox Style="{StaticResource MaterialDesignFloatingHintComboBox}" Margin="0,20,0,0" FontSize="16" ItemsSource="{Binding Languages}" DisplayMemberPath="Value" SelectedValuePath="Key" SelectedValue="{Binding Language}" materialDesign:HintAssist.Hint="{Tr LanguageWord}" ></ComboBox>
|
||||
<CheckBox Margin="0,20,0,0" FontSize="16" IsChecked="{Binding DisableTimersOnChange}" Content="{Tr SettingsDialog.DisableTimersOnSwitch}"/>
|
||||
<CheckBox Margin="0,10,0,0" FontSize="16" IsChecked="{Binding HideToTray}" Content="{Tr SettingsDialog.MinimizeToTray}"/>
|
||||
<CheckBox Margin="0,10,0,0" FontSize="16" IsChecked="{Binding UseIcon}" Content="{Tr SettingsDialog.UseIndicator}"/>
|
||||
<CheckBox Margin="0,10,0,0" FontSize="16" IsChecked="{Binding UseIcon}" Content="{Tr SettingsDialog.UseIndicator}" ToolTip="{Tr SettingsDialog.UseIndicatorHint}"/>
|
||||
<materialDesign:ColorPicker IsEnabled="{Binding UseIcon}" Color="{Binding IconColor, Delay=50}" />
|
||||
<CheckBox Margin="0,10,0,5" FontSize="16" IsChecked="{Binding UseBackground}" Content="{Tr SettingsDialog.UseCustomColor}"/>
|
||||
|
||||
|
||||
@@ -1,17 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace NebulaAuth.View
|
||||
{
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using SteamLib.SteamMobile;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace NebulaAuth.ViewModel;
|
||||
|
||||
@@ -14,30 +16,32 @@ public partial class MainVM
|
||||
|
||||
|
||||
[MemberNotNull(nameof(_codeTimer))]
|
||||
[MemberNotNull(nameof(_code))]
|
||||
private void CreateCodeTimer()
|
||||
{
|
||||
var currentTime = TimeAligner.GetSteamTime();
|
||||
_codeTimer = new Timer(UpdateCode, null, 0, 1000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void UpdateCode(object? state = null)
|
||||
{
|
||||
var currentTime = TimeAligner.GetSteamTime();
|
||||
var untilChange = currentTime - currentTime / 30L * 30L;
|
||||
var codeProgress = untilChange / 30D * 100;
|
||||
|
||||
|
||||
string? code = null;
|
||||
if (untilChange == 0 && SelectedMafile != null)
|
||||
{
|
||||
code = SteamGuardCodeGenerator.GenerateCode(SelectedMafile!.SharedSecret);
|
||||
}
|
||||
|
||||
if(Application.Current == null) return;
|
||||
Application.Current.Dispatcher.BeginInvoke(() =>
|
||||
|
||||
if (Application.Current == null) return;
|
||||
Application.Current.Dispatcher.Invoke((string? c) =>
|
||||
{
|
||||
if (Application.Current.MainWindow?.WindowState == WindowState.Minimized) return;
|
||||
CodeProgress = codeProgress;
|
||||
if (code != null) Code = code;
|
||||
});
|
||||
if (c != null) Code = c;
|
||||
}, DispatcherPriority.Background, code);
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ using NebulaAuth.Model.Entities;
|
||||
using SteamLib.Exceptions;
|
||||
using NebulaAuth.Utility;
|
||||
using NebulaAuth.View.Dialogs;
|
||||
using AutoUpdaterDotNET;
|
||||
|
||||
namespace NebulaAuth.ViewModel;
|
||||
|
||||
@@ -238,4 +239,30 @@ public partial class MainVM //File //TODO: Refactor
|
||||
|
||||
await AddMafile(arr);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void CopyLogin(object? mafile)
|
||||
{
|
||||
if(mafile is not Mafile maf) return;
|
||||
var i = 0;
|
||||
while (i < 20)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(maf.AccountName);
|
||||
SnackbarController.SendSnackbar(GetLocalizationOrDefault("LoginCopied"));
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (i == 19)
|
||||
{
|
||||
Shell.Logger.Error(ex);
|
||||
SnackbarController.SendSnackbar(LocManager.GetCommonOrDefault("Error", "Error"));
|
||||
}
|
||||
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ using NebulaAuth.Model.Entities;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NebulaAuth.ViewModel;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ using MaterialDesignThemes.Wpf;
|
||||
using NebulaAuth.Model;
|
||||
using NebulaAuth.Model.Entities;
|
||||
using NebulaAuth.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using SteamLib;
|
||||
using SteamLib.Account;
|
||||
@@ -26,7 +25,6 @@ using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using NebulaAuth.Core;
|
||||
using SteamLib.Utility.MaFiles;
|
||||
|
||||
namespace NebulaAuth.ViewModel.Other;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using NebulaAuth.Model.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Forms;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
namespace NebulaAuth.ViewModel.Other;
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using NebulaAuth.Model;
|
||||
using NebulaAuth.Model.Entities;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace NebulaAuth.ViewModel.Other;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public partial class ProxyManagerVM : ObservableObject
|
||||
[ObservableProperty] private KeyValuePair<int, ProxyData>? _defaultProxy;
|
||||
public ObservableDictionary<int, ProxyData> Proxies => ProxyStorage.Proxies;
|
||||
|
||||
private static readonly Regex IdRegex = new(@"\{(\d+)\}$");
|
||||
private static readonly Regex IdRegex = new(@"\{(\d+)\}$", RegexOptions.Compiled);
|
||||
|
||||
|
||||
public ProxyManagerVM()
|
||||
@@ -77,7 +77,7 @@ public partial class ProxyManagerVM : ObservableObject
|
||||
SnackbarController.SendSnackbar(string.Format(GetLocalizationOrDefault("DuplicateId"), id));
|
||||
return;
|
||||
}
|
||||
proxies.Add(new KeyValuePair<int?, ProxyData>(id, proxy));
|
||||
proxies.Add(KeyValuePair.Create(id, proxy));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using AutoUpdaterDotNET;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Microsoft.VisualBasic.FileIO;
|
||||
|
||||
namespace NebulaAuth.ViewModel.Other;
|
||||
|
||||
|
||||
@@ -242,6 +242,11 @@
|
||||
},
|
||||
"ContextMenus": {
|
||||
"Mafile": {
|
||||
"CopyLogin": {
|
||||
"en": "Copy login",
|
||||
"ru": "Скопировать логин",
|
||||
"ua": "Скопіювати логін"
|
||||
},
|
||||
"AddToGroup": {
|
||||
"en": "Add to group",
|
||||
"ru": "Добавить в группу",
|
||||
@@ -256,13 +261,13 @@
|
||||
"Proxy": {
|
||||
"Copy": {
|
||||
"en": "Copy",
|
||||
"ru": "Копировать",
|
||||
"ua": "Копіювати"
|
||||
"ru": "Скопировать",
|
||||
"ua": "Скопіювати"
|
||||
},
|
||||
"CopyAddress": {
|
||||
"en": "Copy address",
|
||||
"ru": "Копировать адрес",
|
||||
"ua": "Копіювати адресу"
|
||||
"ru": "Скопировать адрес",
|
||||
"ua": "Скопіювати адресу"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,6 +315,11 @@
|
||||
"ru": "Использовать индикатор",
|
||||
"ua": "Використовувати індикатор"
|
||||
},
|
||||
"UseIndicatorHint": {
|
||||
"en": "Small color indicator in windows toolbar to identify program instance",
|
||||
"ru": "Маленький цветной индикатор в панели задач для идентификации экземпляра программы",
|
||||
"ua": "Малий кольоровий індикатор в панелі завдань для ідентифікації екземпляра програми"
|
||||
},
|
||||
"UseCustomColor": {
|
||||
"en": "Custom window color",
|
||||
"ru": "Свой цвет окна",
|
||||
@@ -576,9 +586,9 @@
|
||||
"ua": "помилки:"
|
||||
},
|
||||
"RemoveMafileConfirmation": {
|
||||
"ru": "Удалить мафайл? Это действие переместит мафайл в mafiles_removed",
|
||||
"en": "Remove mafile? This action will move mafile to mafiles_removed",
|
||||
"ua": "Видалити мафайл? Ця дія перемістить мафайл в mafiles_removed"
|
||||
"ru": "Удалить мафайл? Это действие переместит мафайл в папку 'mafiles_removed' (Это действие не удаляет Steam Guard с аккаунта)",
|
||||
"en": "Remove mafile? This action will move mafile to 'mafiles_removed' (This action does not remove the Steam Guard from the account)",
|
||||
"ua": "Видалити мафайл? Ця дія перемістить мафайл у каталог 'mafiles_removed' (Ця дія не видаляє автентифікатор з облікового запису)"
|
||||
},
|
||||
"CantRemoveAlreadyExist": {
|
||||
"ru": "Не удалось переместить мафайл, возможно в папке уже существует мафайл с таким именем.",
|
||||
@@ -629,6 +639,11 @@
|
||||
"ru": "Не удалось получить SteamID из мафайла и сохранить изменения. Необходимо сделать релогин. Отменено",
|
||||
"en": "Can't retrieve SteamID from mafile to save changes. Need to relogin. Canceled",
|
||||
"ua": "Не вдалося отримати SteamID з мафайла та зберегти зміни. Потрібно зробити релогін. Скасовано"
|
||||
},
|
||||
"LoginCopied": {
|
||||
"en": "Login copied",
|
||||
"ru": "Логин скопирован",
|
||||
"ua": "Логін скопійовано"
|
||||
}
|
||||
},
|
||||
"ErrorTranslator": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.5.1.0</version>
|
||||
<url>https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.5.1/NebulaAuth.1.5.1.zip</url>
|
||||
<changelog>https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.5.1.html</changelog>
|
||||
<version>1.5.2.0</version>
|
||||
<url>https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.5.2/NebulaAuth.1.5.2.zip</url>
|
||||
<changelog>https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.5.2.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
</item>
|
||||
@@ -1,9 +1,12 @@
|
||||
using Newtonsoft.Json;
|
||||
using AchiesUtilities.Models;
|
||||
using AchiesUtilities.Newtonsoft.JSON.Converters.Special;
|
||||
using Newtonsoft.Json;
|
||||
using SteamLib.Authentication;
|
||||
using SteamLib.Core;
|
||||
using SteamLib.Core.Enums;
|
||||
using SteamLib.Core.StatusCodes;
|
||||
using SteamLib.Exceptions;
|
||||
using SteamLib.Exceptions.General;
|
||||
|
||||
namespace SteamLib.Api;
|
||||
|
||||
@@ -27,7 +30,17 @@ public static class SteamGlobalApi
|
||||
var cont = new FormUrlEncodedContent(data);
|
||||
var resp = await client.PostAsync("https://login.steampowered.com/jwt/ajaxrefresh", cont, cancellationToken);
|
||||
var respStr = await resp.EnsureSuccessStatusCode().Content.ReadAsStringAsync(cancellationToken);
|
||||
var jwtRefresh = JsonConvert.DeserializeObject<JwtRefreshJson>(respStr);
|
||||
|
||||
JwtRefreshJson? jwtRefresh;
|
||||
try
|
||||
{
|
||||
jwtRefresh = JsonConvert.DeserializeObject<JwtRefreshJson>(respStr);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new UnsupportedResponseException(respStr, ex);
|
||||
}
|
||||
|
||||
if (jwtRefresh?.Success != true)
|
||||
{
|
||||
Exception? inner = null;
|
||||
@@ -52,14 +65,26 @@ public static class SteamGlobalApi
|
||||
cont = new FormUrlEncodedContent(data);
|
||||
var update = await client.PostAsync(jwtRefresh.LoginUrl, cont, cancellationToken);
|
||||
var updateResp = await update.Content.ReadAsStringAsync(cancellationToken);
|
||||
if (updateResp != "{\"result\":1}")
|
||||
JwtUpdateJson result;
|
||||
try
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<JwtUpdateJson>(updateResp) ?? throw new NullReferenceException();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new UnsupportedResponseException(updateResp, ex);
|
||||
}
|
||||
|
||||
var resultStatus = SteamStatusCode.Translate<SteamStatusCode>(result.Result, out _);
|
||||
if (resultStatus.Equals(SteamStatusCode.Ok) == false)
|
||||
{
|
||||
throw new SessionInvalidException(
|
||||
"AjaxRefresh (set-token) response was not successful. Response string stored in Exception.Data")
|
||||
{
|
||||
Data = {{"Response", updateResp}}
|
||||
Data = { { "Response", updateResp } }
|
||||
};
|
||||
}
|
||||
|
||||
return SteamTokenHelper.ExtractJwtFromSetCookiesHeader(update.Headers);
|
||||
}
|
||||
|
||||
@@ -74,5 +99,15 @@ public static class SteamGlobalApi
|
||||
[JsonProperty("auth")] public string Auth { get; set; } = string.Empty;
|
||||
[JsonProperty("error")] public int? Error { get; set; }
|
||||
}
|
||||
|
||||
private class JwtUpdateJson
|
||||
{
|
||||
[JsonProperty("result")]
|
||||
public int Result { get; set; }
|
||||
|
||||
[JsonProperty("rtExpiry")]
|
||||
[JsonConverter(typeof(UnixTimeStampConverter))]
|
||||
public UnixTimeStamp RtExpiry { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,10 +44,8 @@ public class SteamGuardCodeGenerator : ISteamGuardProvider
|
||||
time >>= 8;
|
||||
}
|
||||
|
||||
HMACSHA1 hmacGenerator = new()
|
||||
{
|
||||
Key = sharedSecret
|
||||
};
|
||||
using HMACSHA1 hmacGenerator = new();
|
||||
hmacGenerator.Key = sharedSecret;
|
||||
var hashedData = hmacGenerator.ComputeHash(timeArray);
|
||||
var codeArray = new byte[5];
|
||||
|
||||
|
||||
@@ -46,9 +46,8 @@ public static class TimeAligner
|
||||
var req = new HttpRequestMessage(HttpMethod.Post, SteamConstants.STEAM_API + TIME_ALIGN_ENDPOINT);
|
||||
var response = client.Send(req).EnsureSuccessStatusCode();
|
||||
sw.Stop();
|
||||
var stream = new StreamReader(response.Content.ReadAsStream());
|
||||
using var stream = new StreamReader(response.Content.ReadAsStream());
|
||||
var respStr = stream.ReadToEnd();
|
||||
stream.Dispose();
|
||||
var j = JObject.Parse(respStr);
|
||||
var time = j["response"]!["server_time"]!.Value<long>();
|
||||
var now = UtcNow - sw.Elapsed;
|
||||
@@ -80,7 +79,6 @@ public static class TimeAligner
|
||||
}
|
||||
finally
|
||||
{
|
||||
sw.Stop();
|
||||
client.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Changelog</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background-color: #eeeeee;
|
||||
color: #333;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.changelog-container {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 25px;
|
||||
margin: 25px auto;
|
||||
max-width: 800px;
|
||||
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.change {
|
||||
margin-bottom: 20px;
|
||||
padding: 0;
|
||||
border-left: 4px solid #a50ec7;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.version {
|
||||
font-weight: 600;
|
||||
font-size: 1.5em;
|
||||
color: #a50ec7;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-style: italic;
|
||||
color: #888;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 1em;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.description ul {
|
||||
list-style: inside square;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.changelog-container {
|
||||
width: 90%;
|
||||
margin: 25px auto;
|
||||
padding: 25px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="changelog-container">
|
||||
<!-- Changelog entry -->
|
||||
<div class="change">
|
||||
<div class="version">Version 1.5.2</div>
|
||||
<div class="date">18.09.2024</div>
|
||||
<div class="description">
|
||||
- HOTFIX: Resolved an issue introduced by the September 18, 2024, Steam update, where an error occurred during session refresh due to changes in Steam's response model.<br />
|
||||
- FIX: Potentially resolved a memory leak issue on some devices (Windows 10, 11 Home/Professional).<br />
|
||||
- FIX: Minor performance improvements.<br />
|
||||
- UI: Added a splash screen on application startup.<br />
|
||||
- UI: Added "Copy Login" option in the account context menu on right-click.<br />
|
||||
- UI: Minor localization updates.<br />
|
||||
- UI: Added a tooltip to the "Use Indicator" setting.<br />
|
||||
- UI: Minor design improvements.<br />
|
||||
- UPDATE: Most libraries have been updated to their latest versions.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user