diff --git a/src/NebulaAuth.LegacyConverter/Program.cs b/src/NebulaAuth.LegacyConverter/Program.cs
index 5bd88be..64f48a5 100644
--- a/src/NebulaAuth.LegacyConverter/Program.cs
+++ b/src/NebulaAuth.LegacyConverter/Program.cs
@@ -1,8 +1,8 @@
-using AchiesUtilities.Extensions;
+using System.Reflection;
+using AchiesUtilities.Extensions;
using NebulaAuth.LegacyConverter;
using Newtonsoft.Json;
using SteamLib.Utility.MafileSerialization;
-using System.Reflection;
try
{
diff --git a/src/NebulaAuth/App.xaml.cs b/src/NebulaAuth/App.xaml.cs
index 537f14a..c952ba8 100644
--- a/src/NebulaAuth/App.xaml.cs
+++ b/src/NebulaAuth/App.xaml.cs
@@ -1,9 +1,9 @@
-using NebulaAuth.Core;
+using System;
+using System.Windows;
+using NebulaAuth.Core;
using NebulaAuth.Model;
using NebulaAuth.Model.Exceptions;
using NebulaAuth.Model.MAAC;
-using System;
-using System.Windows;
namespace NebulaAuth;
diff --git a/src/NebulaAuth/Converters/BoolToValueConverter.cs b/src/NebulaAuth/Converters/BoolToValueConverter.cs
index 3a31d79..b0ea82c 100644
--- a/src/NebulaAuth/Converters/BoolToValueConverter.cs
+++ b/src/NebulaAuth/Converters/BoolToValueConverter.cs
@@ -11,7 +11,7 @@ public class BoolToValueConverter : IValueConverter
if (value is not bool b) return Binding.DoNothing;
if (parameter is Array)
{
- var arr = (Array)parameter;
+ var arr = (Array) parameter;
if (arr.Length == 0) return Binding.DoNothing;
var first = arr.GetValue(0);
var second = arr.Length > 1 ? arr.GetValue(1) : null;
diff --git a/src/NebulaAuth/Converters/Converters.xaml b/src/NebulaAuth/Converters/Converters.xaml
index 60d8388..9a7a20c 100644
--- a/src/NebulaAuth/Converters/Converters.xaml
+++ b/src/NebulaAuth/Converters/Converters.xaml
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/src/NebulaAuth/Core/DialogsController.cs b/src/NebulaAuth/Core/DialogsController.cs
index 8888b73..7be3a6c 100644
--- a/src/NebulaAuth/Core/DialogsController.cs
+++ b/src/NebulaAuth/Core/DialogsController.cs
@@ -13,25 +13,6 @@ namespace NebulaAuth.Core;
public static class DialogsController
{
- #region CommonDialogs
-
- public static async Task ShowConfirmCancelDialog(string? msg = null)
- {
- var content = msg == null ? new ConfirmCancelDialog() : new ConfirmCancelDialog(msg);
-
- var result = await DialogHost.Show(content);
- return result != null && (bool) result;
- }
-
- public static async Task ShowTextFieldDialog(string? title = null, string? msg = null)
- {
- var content = new TextFieldDialog(title, msg);
- var result = await DialogHost.Show(content);
- return result as string;
- }
-
- #endregion
-
public static async Task ShowLoginAgainDialog(string username, string? currentPassword = null)
{
var vm = new LoginAgainVM
@@ -131,4 +112,23 @@ public static class DialogsController
};
await DialogHost.Show(dialog);
}
+
+ #region CommonDialogs
+
+ public static async Task ShowConfirmCancelDialog(string? msg = null)
+ {
+ var content = msg == null ? new ConfirmCancelDialog() : new ConfirmCancelDialog(msg);
+
+ var result = await DialogHost.Show(content);
+ return result != null && (bool) result;
+ }
+
+ public static async Task ShowTextFieldDialog(string? title = null, string? msg = null)
+ {
+ var content = new TextFieldDialog(title, msg);
+ var result = await DialogHost.Show(content);
+ return result as string;
+ }
+
+ #endregion
}
\ No newline at end of file
diff --git a/src/NebulaAuth/Core/UpdateManager.cs b/src/NebulaAuth/Core/UpdateManager.cs
index 193f29c..600f978 100644
--- a/src/NebulaAuth/Core/UpdateManager.cs
+++ b/src/NebulaAuth/Core/UpdateManager.cs
@@ -1,7 +1,6 @@
using System;
using System.IO;
using AutoUpdaterDotNET;
-using NebulaAuth.Model;
namespace NebulaAuth.Core;
@@ -24,9 +23,12 @@ public static class UpdateManager
try
{
var testFile = Path.Combine(Environment.CurrentDirectory, "test.tmp");
- using (File.Create(testFile)) { }
+ using (File.Create(testFile))
+ {
+ }
+
File.Delete(testFile);
- return false;
+ return false;
}
catch (UnauthorizedAccessException)
{
diff --git a/src/NebulaAuth/MainWindow.xaml b/src/NebulaAuth/MainWindow.xaml
index 99e3acb..a151e3a 100644
--- a/src/NebulaAuth/MainWindow.xaml
+++ b/src/NebulaAuth/MainWindow.xaml
@@ -34,7 +34,7 @@
+ Executed="FocusSearchBox" />
@@ -86,15 +86,13 @@
Command="{Binding OpenMafileFolderCommand}" />
+ Command="{Binding OpenProxyManagerCommand}" />
@@ -276,8 +274,9 @@
SelectedValue="{Binding SelectedMafile}"
PreviewMouseDown="MafileListBox_OnPreviewMouseDown">
-
-
+
+
-
+
-
+
+ CommandParameter="{Binding Path=PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}}"
+ InputGestureText="CTRL+⇧+C" />
-
-
-
-
-
+ Command="{Binding CopySteamIdCommand}"
+ CommandParameter="{Binding PlacementTarget.SelectedValue, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -411,15 +412,15 @@
+ Background="Transparent">
@@ -448,8 +449,7 @@
Visibility="{Binding SelectedMafile, Converter={StaticResource NullableToVisibilityConverter}}"
Grid.Row="1" Height="4"
Style="{StaticResource MaterialDesignLinearProgressBar}"
- MaxTime="30" TimeRemaining="{Binding CodeProgress, Mode=OneWay}"
- />
+ MaxTime="30" TimeRemaining="{Binding CodeProgress, Mode=OneWay}" />
diff --git a/src/NebulaAuth/View/Dialogs/SetCryptPasswordDialog.xaml.cs b/src/NebulaAuth/View/Dialogs/SetCryptPasswordDialog.xaml.cs
index 4c48e3c..cd99225 100644
--- a/src/NebulaAuth/View/Dialogs/SetCryptPasswordDialog.xaml.cs
+++ b/src/NebulaAuth/View/Dialogs/SetCryptPasswordDialog.xaml.cs
@@ -1,6 +1,5 @@
namespace NebulaAuth.View.Dialogs;
-
public partial class SetCryptPasswordDialog
{
public SetCryptPasswordDialog()
diff --git a/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml b/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml
index de50a3e..2c2d015 100644
--- a/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml
+++ b/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml
@@ -40,7 +40,7 @@
-
+
@@ -54,8 +54,7 @@
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
CommandParameter="{Binding Text, ElementName=TextField}"
Content="{Tr Common.OK}"
- IsDefault="True"
- />
+ IsDefault="True" />
+ Content="{Tr Common.Cancel}" />
diff --git a/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml.cs b/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml.cs
index 821a191..bcc7f95 100644
--- a/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml.cs
+++ b/src/NebulaAuth/View/Dialogs/TextFieldDialog.xaml.cs
@@ -2,7 +2,6 @@
namespace NebulaAuth.View.Dialogs;
-
public partial class TextFieldDialog
{
public TextFieldDialog()
@@ -14,7 +13,7 @@ public partial class TextFieldDialog
{
InitializeComponent();
- if(!string.IsNullOrWhiteSpace(title))
+ if (!string.IsNullOrWhiteSpace(title))
TitleTextBlock.Text = title;
if (!string.IsNullOrEmpty(msg))
diff --git a/src/NebulaAuth/View/Dialogs/WaitLoginDialog.xaml.cs b/src/NebulaAuth/View/Dialogs/WaitLoginDialog.xaml.cs
index 0e2b8e1..101d587 100644
--- a/src/NebulaAuth/View/Dialogs/WaitLoginDialog.xaml.cs
+++ b/src/NebulaAuth/View/Dialogs/WaitLoginDialog.xaml.cs
@@ -3,7 +3,6 @@ using System.Windows;
namespace NebulaAuth.View.Dialogs;
-
public partial class WaitLoginDialog
{
private TaskCompletionSource _tcs = new();
diff --git a/src/NebulaAuth/View/LinksView.xaml.cs b/src/NebulaAuth/View/LinksView.xaml.cs
index fd7be3d..1660a89 100644
--- a/src/NebulaAuth/View/LinksView.xaml.cs
+++ b/src/NebulaAuth/View/LinksView.xaml.cs
@@ -4,7 +4,6 @@ using System.Windows.Controls;
namespace NebulaAuth.View;
-
public partial class LinksView : UserControl
{
public LinksView()
diff --git a/src/NebulaAuth/View/MafileMoverView.xaml.cs b/src/NebulaAuth/View/MafileMoverView.xaml.cs
index 3f5b8cb..cc6eba4 100644
--- a/src/NebulaAuth/View/MafileMoverView.xaml.cs
+++ b/src/NebulaAuth/View/MafileMoverView.xaml.cs
@@ -2,7 +2,6 @@
namespace NebulaAuth.View;
-
public partial class MafileMoverView : UserControl
{
public MafileMoverView()
diff --git a/src/NebulaAuth/View/ProxyManagerView.xaml b/src/NebulaAuth/View/ProxyManagerView.xaml
index 16d2f04..6eea83f 100644
--- a/src/NebulaAuth/View/ProxyManagerView.xaml
+++ b/src/NebulaAuth/View/ProxyManagerView.xaml
@@ -59,16 +59,16 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/NebulaAuth/View/ProxyManagerView.xaml.cs b/src/NebulaAuth/View/ProxyManagerView.xaml.cs
index c964d08..6773c84 100644
--- a/src/NebulaAuth/View/ProxyManagerView.xaml.cs
+++ b/src/NebulaAuth/View/ProxyManagerView.xaml.cs
@@ -3,7 +3,6 @@ using System.Windows.Input;
namespace NebulaAuth.View;
-
public partial class ProxyManagerView
{
public ProxyManagerView()
diff --git a/src/NebulaAuth/View/SetAccountPasswordsView.xaml b/src/NebulaAuth/View/SetAccountPasswordsView.xaml
index 2f8b211..2feda85 100644
--- a/src/NebulaAuth/View/SetAccountPasswordsView.xaml
+++ b/src/NebulaAuth/View/SetAccountPasswordsView.xaml
@@ -40,7 +40,7 @@
-
@@ -61,74 +61,68 @@
-
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
- CheckBox
- CloseBox
-
-
-
-
-
+
+
+
+
+ CheckBox
+ CloseBox
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
+ VerticalScrollBarVisibility="Auto"
+ Style="{StaticResource MaterialDesignOutlinedTextBox}"
+ md:TextFieldAssist.HasClearButton="True"
+ md:HintAssist.IsFloating="False"
+ md:HintAssist.Hint="{Tr SetAccountPasswordsView.InputFormat}"
+ md:TextFieldAssist.TextBoxIsMultiLine="True"
+ md:TextFieldAssist.TextBoxViewVerticalAlignment="Top"
+ VerticalContentAlignment="Top" />
-
True
False
@@ -110,21 +110,20 @@
-
+
-
-
+
+ Visibility="{Binding RenameResultText, Converter={StaticResource NullableToVisibilityConverter}, Mode=OneWay}" />
diff --git a/src/NebulaAuth/View/SettingsView.xaml.cs b/src/NebulaAuth/View/SettingsView.xaml.cs
index f79b910..2e69f6b 100644
--- a/src/NebulaAuth/View/SettingsView.xaml.cs
+++ b/src/NebulaAuth/View/SettingsView.xaml.cs
@@ -5,7 +5,6 @@ using MaterialDesignThemes.Wpf;
namespace NebulaAuth.View;
-
public partial class SettingsView
{
private readonly DialogHost? _dialogHost;
diff --git a/src/NebulaAuth/ViewModel/Linker/LinkAccountVM.cs b/src/NebulaAuth/ViewModel/Linker/LinkAccountVM.cs
index 6af8983..82f5b31 100644
--- a/src/NebulaAuth/ViewModel/Linker/LinkAccountVM.cs
+++ b/src/NebulaAuth/ViewModel/Linker/LinkAccountVM.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
-using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading;
diff --git a/src/NebulaAuth/ViewModel/MafileMover/MafileMoverVM.cs b/src/NebulaAuth/ViewModel/MafileMover/MafileMoverVM.cs
index 8380f0b..c6b30aa 100644
--- a/src/NebulaAuth/ViewModel/MafileMover/MafileMoverVM.cs
+++ b/src/NebulaAuth/ViewModel/MafileMover/MafileMoverVM.cs
@@ -1,4 +1,12 @@
-using AchiesUtilities.Web.Proxy;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows.Threading;
+using AchiesUtilities.Web.Proxy;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using NebulaAuth.Core;
@@ -24,14 +32,6 @@ using SteamLibForked.Abstractions;
using SteamLibForked.Exceptions.Authorization;
using SteamLibForked.Models.Core;
using SteamLibForked.Models.Session;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Net.Http;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows.Threading;
using ILogger = Microsoft.Extensions.Logging.ILogger;
namespace NebulaAuth.ViewModel.MafileMover;
diff --git a/src/NebulaAuth/ViewModel/MainVM.cs b/src/NebulaAuth/ViewModel/MainVM.cs
index 7365fe1..cb05dab 100644
--- a/src/NebulaAuth/ViewModel/MainVM.cs
+++ b/src/NebulaAuth/ViewModel/MainVM.cs
@@ -49,7 +49,7 @@ public partial class MainVM : ObservableObject
[RelayCommand]
public async Task Debug()
{
- await DialogsController.ShowSetAccountsPasswordDialog();
+ await DialogsController.ShowSetAccountsPasswordDialog();
}
diff --git a/src/NebulaAuth/ViewModel/MainVM_Confirmations.cs b/src/NebulaAuth/ViewModel/MainVM_Confirmations.cs
index b020001..872da27 100644
--- a/src/NebulaAuth/ViewModel/MainVM_Confirmations.cs
+++ b/src/NebulaAuth/ViewModel/MainVM_Confirmations.cs
@@ -1,14 +1,14 @@
-using CommunityToolkit.Mvvm.Input;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.Input;
using NebulaAuth.Core;
using NebulaAuth.Model;
using NebulaAuth.Model.Entities;
using NebulaAuth.Utility;
using SteamLib.SteamMobile.Confirmations;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Threading.Tasks;
namespace NebulaAuth.ViewModel;
diff --git a/src/NebulaAuth/ViewModel/MainVM_Groups.cs b/src/NebulaAuth/ViewModel/MainVM_Groups.cs
index b7114d3..22d3bdf 100644
--- a/src/NebulaAuth/ViewModel/MainVM_Groups.cs
+++ b/src/NebulaAuth/ViewModel/MainVM_Groups.cs
@@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
-using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using AchiesUtilities.Extensions;
@@ -41,9 +40,10 @@ public partial class MainVM //Groups
[RelayCommand]
private async Task CreateGroup(Mafile? mafile)
{
- if(mafile == null) return;
- var res = await DialogsController.ShowTextFieldDialog(GetLocalization("CreateGroupTitle"), GetLocalization("CreateGroupInput"));
- if(string.IsNullOrWhiteSpace(res)) return;
+ if (mafile == null) return;
+ var res = await DialogsController.ShowTextFieldDialog(GetLocalization("CreateGroupTitle"),
+ GetLocalization("CreateGroupInput"));
+ if (string.IsNullOrWhiteSpace(res)) return;
AddToGroup([res, mafile]);
SnackbarController.SendSnackbar(GetLocalization("CreateGroupSuccess"));
}
diff --git a/src/NebulaAuth/ViewModel/Other/SetAccountPasswordsVM.cs b/src/NebulaAuth/ViewModel/Other/SetAccountPasswordsVM.cs
index 48d1337..a4cddfa 100644
--- a/src/NebulaAuth/ViewModel/Other/SetAccountPasswordsVM.cs
+++ b/src/NebulaAuth/ViewModel/Other/SetAccountPasswordsVM.cs
@@ -1,26 +1,24 @@
-using CommunityToolkit.Mvvm.ComponentModel;
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using NebulaAuth.Model;
using SteamLibForked.Models.SteamIds;
-using System;
-using System.Linq;
-using System.Threading.Tasks;
namespace NebulaAuth.ViewModel.Other;
public partial class SetAccountPasswordsVM : ObservableObject
{
- [ObservableProperty]
- [NotifyCanExecuteChangedFor(nameof(SetPasswordsCommand))]
- private bool _isEncryptionPasswordSet;
+ [ObservableProperty] [NotifyCanExecuteChangedFor(nameof(SetPasswordsCommand))]
+ private string? _accountsPasswords;
- [ObservableProperty]
- [NotifyCanExecuteChangedFor(nameof(SetEncryptionPasswordCommand))]
+ [ObservableProperty] [NotifyCanExecuteChangedFor(nameof(SetEncryptionPasswordCommand))]
private string? _encryptionPassword;
- [ObservableProperty]
- [NotifyCanExecuteChangedFor(nameof(SetPasswordsCommand))]
- private string? _accountsPasswords;
+ [ObservableProperty] [NotifyCanExecuteChangedFor(nameof(SetPasswordsCommand))]
+ private bool _isEncryptionPasswordSet;
+
[ObservableProperty] private string? _tip;
public SetAccountPasswordsVM()
@@ -36,12 +34,16 @@ public partial class SetAccountPasswordsVM : ObservableObject
{
return;
}
+
Settings.Instance.IsPasswordSet = PHandler.SetPassword(EncryptionPassword);
IsEncryptionPasswordSet = PHandler.IsPasswordSet;
EncryptionPassword = null;
}
- private bool SetEncryptionPasswordCanExecute() => !string.IsNullOrWhiteSpace(EncryptionPassword);
+ private bool SetEncryptionPasswordCanExecute()
+ {
+ return !string.IsNullOrWhiteSpace(EncryptionPassword);
+ }
[RelayCommand(CanExecute = nameof(SetPasswordsCanExecute))]
@@ -69,8 +71,8 @@ public partial class SetAccountPasswordsVM : ObservableObject
continue;
}
- string login = split[0];
- string password = split[1];
+ var login = split[0];
+ var password = split[1];
SteamId64? steamId = null;
if (SteamId64.TryParse(login, out var id64))
@@ -106,7 +108,6 @@ public partial class SetAccountPasswordsVM : ObservableObject
{
Tip = $"Успешно: {success}, Не найдено: {notFound}, Ошибки: {errors}";
}
-
}
private bool SetPasswordsCanExecute()
diff --git a/src/NebulaAuth/ViewModel/Other/SettingsVM.cs b/src/NebulaAuth/ViewModel/Other/SettingsVM.cs
index 924630d..c375892 100644
--- a/src/NebulaAuth/ViewModel/Other/SettingsVM.cs
+++ b/src/NebulaAuth/ViewModel/Other/SettingsVM.cs
@@ -1,11 +1,11 @@
-using CommunityToolkit.Mvvm.ComponentModel;
-using CommunityToolkit.Mvvm.Input;
-using NebulaAuth.Core;
-using NebulaAuth.Model;
-using System;
+using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Media;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using NebulaAuth.Core;
+using NebulaAuth.Model;
namespace NebulaAuth.ViewModel.Other;
@@ -13,6 +13,92 @@ public partial class SettingsVM : ObservableObject
{
public Settings Settings => Settings.Instance;
+ [ObservableProperty] private string? _password;
+
+ [ObservableProperty] private double _renameMafilesProgress;
+
+ [ObservableProperty] private string? _renameResultText;
+
+ [ObservableProperty] [NotifyCanExecuteChangedFor(nameof(ApplyRenameSettingCommand))]
+ private bool _useAccountNameAsMafileNamePreview;
+
+ public SettingsVM()
+ {
+ _useAccountNameAsMafileNamePreview = Settings.UseAccountNameAsMafileName;
+ }
+
+ [RelayCommand]
+ private void SetPassword()
+ {
+ Settings.IsPasswordSet = PHandler.SetPassword(Password);
+ }
+
+ [RelayCommand]
+ private void ResetThemeDefaults()
+ {
+ Settings.ResetThemeDefaults();
+ OnPropertyChanged(nameof(BackgroundBlur));
+ OnPropertyChanged(nameof(BackgroundOpacity));
+ OnPropertyChanged(nameof(BackgroundGamma));
+ OnPropertyChanged(nameof(LeftOpacity));
+ OnPropertyChanged(nameof(RightOpacity));
+ OnPropertyChanged(nameof(ApplyBlurBackground));
+ OnPropertyChanged(nameof(RippleDisabled));
+ }
+
+ [RelayCommand(CanExecute = nameof(ApplyRenameSettingCanExecute))]
+ private async Task ApplyRenameSetting()
+ {
+ RenameResultText = null;
+ var targetValue = UseAccountNameAsMafileNamePreview;
+ if (UseAccountNameAsMafileName == targetValue) return;
+ RenameMafilesProgress = 0;
+ Storage.MafileRenameResult? result = null;
+ try
+ {
+ result = await Storage.RenameMafiles(targetValue, new Progress(p => RenameMafilesProgress = p));
+ UseAccountNameAsMafileName = targetValue;
+ }
+ catch (Exception ex)
+ {
+ Shell.Logger.Error(ex, "Error while renaming mafiles");
+ }
+ finally
+ {
+ RenameMafilesProgress = 0;
+ }
+
+ if (result == null)
+ {
+ RenameResultText = GetLoc("Error");
+ return;
+ }
+
+ if (result.Total == 0) return;
+
+ if (result.NotRenamed == 0)
+ {
+ var l = GetLoc("AllRenamed");
+ RenameResultText = string.Format(l, result.Total, result.BackupFileName);
+ }
+ else
+ {
+ var l = GetLoc("PartialSuccess");
+ RenameResultText =
+ string.Format(l, result.Total, result.Renamed, result.Errors, result.Conflict, result.BackupFileName);
+ }
+
+ string GetLoc(string key)
+ {
+ return LocManager.GetCodeBehindOrDefault(key, "SettingsVM", "MafileRenaming", key);
+ }
+ }
+
+ private bool ApplyRenameSettingCanExecute()
+ {
+ return UseAccountNameAsMafileNamePreview != UseAccountNameAsMafileName;
+ }
+
#region SettingsProps
public bool HideToTray
@@ -104,8 +190,6 @@ public partial class SettingsVM : ObservableObject
set => Settings.IgnorePatchTuesdayErrors = value;
}
-
-
#endregion
#region Theme
@@ -165,90 +249,4 @@ public partial class SettingsVM : ObservableObject
}
#endregion
-
- [ObservableProperty] private string? _password;
- [ObservableProperty] private string? _renameResultText;
- [ObservableProperty]
- [NotifyCanExecuteChangedFor(nameof(ApplyRenameSettingCommand))]
- private bool _useAccountNameAsMafileNamePreview;
-
- [ObservableProperty]
- private double _renameMafilesProgress;
-
- public SettingsVM()
- {
- _useAccountNameAsMafileNamePreview = Settings.UseAccountNameAsMafileName;
- }
-
- [RelayCommand]
- private void SetPassword()
- {
- Settings.IsPasswordSet = PHandler.SetPassword(Password);
-
- }
-
- [RelayCommand]
- private void ResetThemeDefaults()
- {
- Settings.ResetThemeDefaults();
- OnPropertyChanged(nameof(BackgroundBlur));
- OnPropertyChanged(nameof(BackgroundOpacity));
- OnPropertyChanged(nameof(BackgroundGamma));
- OnPropertyChanged(nameof(LeftOpacity));
- OnPropertyChanged(nameof(RightOpacity));
- OnPropertyChanged(nameof(ApplyBlurBackground));
- OnPropertyChanged(nameof(RippleDisabled));
- }
-
- [RelayCommand(CanExecute = nameof(ApplyRenameSettingCanExecute))]
- private async Task ApplyRenameSetting()
- {
- RenameResultText = null;
- var targetValue = UseAccountNameAsMafileNamePreview;
- if (UseAccountNameAsMafileName == targetValue) return;
- RenameMafilesProgress = 0;
- Storage.MafileRenameResult? result = null;
- try
- {
- result = await Storage.RenameMafiles(targetValue, new Progress(p => RenameMafilesProgress = p));
- UseAccountNameAsMafileName = targetValue;
- }
- catch (Exception ex)
- {
- Shell.Logger.Error(ex, "Error while renaming mafiles");
- }
- finally
- {
- RenameMafilesProgress = 0;
- }
-
- if (result == null)
- {
- RenameResultText = GetLoc("Error");
- return;
- }
-
- if (result.Total == 0) return;
-
- if (result.NotRenamed == 0)
- {
- var l = GetLoc("AllRenamed");
- RenameResultText = string.Format(l, result.Total, result.BackupFileName);
- return;
- }
- else
- {
- var l = GetLoc("PartialSuccess");
- RenameResultText =
- string.Format(l, result.Total, result.Renamed, result.Errors, result.Conflict, result.BackupFileName);
-
- }
-
- string GetLoc(string key)
- {
- return LocManager.GetCodeBehindOrDefault(key, "SettingsVM", "MafileRenaming", key);
- }
- }
-
- private bool ApplyRenameSettingCanExecute() => UseAccountNameAsMafileNamePreview != UseAccountNameAsMafileName;
}
\ No newline at end of file
diff --git a/src/NebulaAuth/localization.loc.json b/src/NebulaAuth/localization.loc.json
index 6c92369..027789e 100644
--- a/src/NebulaAuth/localization.loc.json
+++ b/src/NebulaAuth/localization.loc.json
@@ -481,7 +481,8 @@
},
"LegacyMafileModeHint": {
"en": "Save mafiles in compatibility format with Steam Desktop Authenticator and other applications",
- "ru": "Сохранять мафайлы в старом формате для совместимости со Steam Desktop Authenticator и другими приложениями",
+ "ru":
+ "Сохранять мафайлы в старом формате для совместимости со Steam Desktop Authenticator и другими приложениями",
"ua": "Зберігати мафайли у старому форматі для сумісності зі Steam Desktop Authenticator та іншими додатками"
},
"AllowAutoUpdate": {
@@ -505,9 +506,12 @@
"ua": "Ігнорувати помилки Patch Tuesday у таймері (експ.)"
},
"IgnorePatchTuesdayErrorsHint": {
- "en": "Ignore errors that occur every Tuesday (Wednesday night in GMT) when Steam doing technical works and auto-confirm timers turns off unnecessarily",
- "ru": "Игнорировать ошибки, которые возникают каждый вторник (ночь среды по GMT) когда Steam проводит технические работы и автоподтверждения отключаются без надобности",
- "ua": "Ігнорувати помилки, які виникають щосереди (ніч середи за GMT) коли Steam проводить технічні роботи і автопідтвердження вимикаються без потреби"
+ "en":
+ "Ignore errors that occur every Tuesday (Wednesday night in GMT) when Steam doing technical works and auto-confirm timers turns off unnecessarily",
+ "ru":
+ "Игнорировать ошибки, которые возникают каждый вторник (ночь среды по GMT) когда Steam проводит технические работы и автоподтверждения отключаются без надобности",
+ "ua":
+ "Ігнорувати помилки, які виникають щосереди (ніч середи за GMT) коли Steam проводить технічні роботи і автопідтвердження вимикаються без потреби"
}
@@ -692,9 +696,12 @@
"ua": "Пароль шифрування"
},
"DialogText": {
- "en": "You have previously set an encryption password for passwords in mafiles, specify it so that the application can automatically log in in case of problems with the session.\r\n(Optional)",
- "ru": "Ранее вы устанавливали пароль шифрования для паролей в мафайлах, укажите его, чтобы приложение могло автоматически авторизоваться в случае проблем с сессией.\r\n(Не обязательно)",
- "ua": "Раніше ви встановлювали пароль шифрування для паролів в мафайлах, вкажіть його, щоб додаток міг автоматично авторизуватися у випадку проблем з сесією.\r\n(Не обов'язково)"
+ "en":
+ "You have previously set an encryption password for passwords in mafiles, specify it so that the application can automatically log in in case of problems with the session.\r\n(Optional)",
+ "ru":
+ "Ранее вы устанавливали пароль шифрования для паролей в мафайлах, укажите его, чтобы приложение могло автоматически авторизоваться в случае проблем с сессией.\r\n(Не обязательно)",
+ "ua":
+ "Раніше ви встановлювали пароль шифрування для паролів в мафайлах, вкажіть його, щоб додаток міг автоматично авторизуватися у випадку проблем з сесією.\r\n(Не обов'язково)"
},
"Ok": {
"en": "Ok",
@@ -775,7 +782,7 @@
"en": "All passwords in mafiles will be encrypted using the encryption password.",
"ru": "Все пароли в мафайлах будут зашифрованы с помощью пароля шифрования.",
"ua": "Всі паролі в мафайлах будуть зашифровані за допомогою пароля шифрування."
- },
+ },
"InputFormat": {
"en": "Supported formats:\r\n\r\nlogin:password\r\nsteamid:password",
"ru": "Поддерживаемые форматы:\r\n\r\nlogin:password\r\nsteamid:password",
@@ -801,9 +808,12 @@
"ua": "Відсутній RCode"
},
"ConfirmRemovingAuthenticator": {
- "ru": "Вы точно уверены, что хотите удалить аутентификатор?\r\nПосле этого вы не сможете обмениваться, использовать торговую площадку 15 дней. Мафайл будет удалён навсегда",
- "en": "Are you sure you want to remove the authenticator?\r\nAfter that, you will not be able to trade or use the marketplace for 15 days. Mafile will be deleted permanently",
- "ua": "Ви точно впевнені, що хочете видалити автентифікатор?\r\nПісля цього ви не зможете обмінюватися, використовувати торгову площадку 15 днів. Мафайл буде видалено назавжди"
+ "ru":
+ "Вы точно уверены, что хотите удалить аутентификатор?\r\nПосле этого вы не сможете обмениваться, использовать торговую площадку 15 дней. Мафайл будет удалён навсегда",
+ "en":
+ "Are you sure you want to remove the authenticator?\r\nAfter that, you will not be able to trade or use the marketplace for 15 days. Mafile will be deleted permanently",
+ "ua":
+ "Ви точно впевнені, що хочете видалити автентифікатор?\r\nПісля цього ви не зможете обмінюватися, використовувати торгову площадку 15 днів. Мафайл буде видалено назавжди"
},
"AuthenticatorRemoved": {
@@ -872,9 +882,12 @@
"ua": "помилки:"
},
"RemoveMafileConfirmation": {
- "ru": "Удалить mafile?\r\nМафайл будет перемещен в папку 'mafiles_removed'\r\nЭто действие НЕ удаляет Steam Guard с аккаунта",
- "en": "Remove mafile?\r\nMafile will be moved to 'mafiles_removed' directory\r\nThis action will NOT remove the Steam Guard from the account",
- "ua": "Видалити mafile?\r\nМафайл буде переміщено у каталог 'mafiles_removed'\r\nЦя дія НЕ видаляє автентифікатор з облікового запису"
+ "ru":
+ "Удалить mafile?\r\nМафайл будет перемещен в папку 'mafiles_removed'\r\nЭто действие НЕ удаляет Steam Guard с аккаунта",
+ "en":
+ "Remove mafile?\r\nMafile will be moved to 'mafiles_removed' directory\r\nThis action will NOT remove the Steam Guard from the account",
+ "ua":
+ "Видалити mafile?\r\nМафайл буде переміщено у каталог 'mafiles_removed'\r\nЦя дія НЕ видаляє автентифікатор з облікового запису"
},
"CantRemoveAlreadyExist": {
"ru": "Не удалось переместить mafile, возможно в папке уже существует мафайл с таким именем.",
@@ -928,7 +941,8 @@
},
"CantDecryptPassword": {
"en": "Can't decrypt password. Maybe password from this mafile was encrypted with another encryption password",
- "ru": "Не удалось расшифровать пароль. Возможно пароль из этого мафайла был зашифрован другим паролем шифрования",
+ "ru":
+ "Не удалось расшифровать пароль. Возможно пароль из этого мафайла был зашифрован другим паролем шифрования",
"ua": "Не вдалося розшифрувати пароль. Можливо пароль з цього мафайла був зашифрований іншим паролем шифрування"
},
"CreateGroupTitle": {
@@ -1199,8 +1213,10 @@
},
"InvalidStateWithStatus2": {
"ru": "Неверное состояние (InvalidState) со статусом 2. Откройте ссылку на руководство сверху этого окна.",
- "en": "Invalid state (InvalidState) with status 2. Open link to the troubleshooting guide at the top of this window.",
- "ua": "Невірний стан (InvalidState) зі статусом 2. Відкрийте посилання на посібник з усунення несправностей у верхній частині цього вікна."
+ "en":
+ "Invalid state (InvalidState) with status 2. Open link to the troubleshooting guide at the top of this window.",
+ "ua":
+ "Невірний стан (InvalidState) зі статусом 2. Відкрийте посилання на посібник з усунення несправностей у верхній частині цього вікна."
},
"GeneralFailure": {
"ru": "General Failure",
@@ -1249,7 +1265,8 @@
"Guard": {
"ru": "Ошибка: Был запрошен вход с помощью Steam Guard. На аккаунте уже активирован мобильный аутентификатор",
"en": "Error: Login with Steam Guard was requested. Mobile authenticator is already activated on the account",
- "ua": "Помилка: Був запрошений вхід за допомогою Steam Guard. На акаунті вже активовано мобільний автентифікатор"
+ "ua":
+ "Помилка: Був запрошений вхід за допомогою Steam Guard. На акаунті вже активовано мобільний автентифікатор"
},
"Unknown": {
"ru": "Ошибка: Неизвестный тип аутентификации",
@@ -1352,9 +1369,12 @@
"ua": "На пошту надіслано лист. Відкрийте посилання з листа, а потім натисніть — 'Продовжити'"
},
"ClickOnEmailLinkRetry": {
- "ru": "Не удалось подтвердить переход по ссылке. Убедитесь, что вы открыли ссылку из письма, затем нажмите — 'Продолжить'",
- "en": "We couldn’t verify that you clicked the link. Make sure you opened the link from the email, then click 'Proceed'",
- "ua": "Не вдалося підтвердити перехід за посиланням. Переконайтесь, що ви відкрили посилання з листа, а потім натисніть — 'Продовжити'"
+ "ru":
+ "Не удалось подтвердить переход по ссылке. Убедитесь, что вы открыли ссылку из письма, затем нажмите — 'Продолжить'",
+ "en":
+ "We couldn’t verify that you clicked the link. Make sure you opened the link from the email, then click 'Proceed'",
+ "ua":
+ "Не вдалося підтвердити перехід за посиланням. Переконайтесь, що ви відкрили посилання з листа, а потім натисніть — 'Продовжити'"
},
"PhoneHint": {
"ru": "На телефон {0} была отправлена СМС",
@@ -1362,9 +1382,12 @@
"ua": "На телефон {0} було відправлено СМС"
},
"EnterPhoneNumber": {
- "ru": "Введите номер в международном формате, только цифры (без '+', пробелов и скобок), или оставьте поле пустым, чтобы привязать без номера",
- "en": "Enter number in international format, digits only (no '+', spaces or brackets), or leave the field empty to link without a number",
- "ua": "Введіть номер у міжнародному форматі, лише цифри (без '+', пробілів і дужок), або залиште поле порожнім, щоб прив’язати без номера"
+ "ru":
+ "Введите номер в международном формате, только цифры (без '+', пробелов и скобок), или оставьте поле пустым, чтобы привязать без номера",
+ "en":
+ "Enter number in international format, digits only (no '+', spaces or brackets), or leave the field empty to link without a number",
+ "ua":
+ "Введіть номер у міжнародному форматі, лише цифри (без '+', пробілів і дужок), або залиште поле порожнім, щоб прив’язати без номера"
}
},
"MafileMoverVM": {
@@ -1389,9 +1412,11 @@
"ua": "RCode: {0}\r\nІм'я файлу: {1}.mafile"
},
"GuardIsNotActive": {
- "ru": "Steam Guard установлен на данном аккаунте. Чтобы привязать mafile к аккаунту, воспользуйтесь окном \"Привязать\"",
+ "ru":
+ "Steam Guard установлен на данном аккаунте. Чтобы привязать mafile к аккаунту, воспользуйтесь окном \"Привязать\"",
"en": "Steam Guard is set on this account. To link mafile to the account, use the 'Link' window",
- "ua": "Steam Guard встановлено на цьому акаунті. Щоб прив'язати mafile до акаунту, скористайтеся вікном 'Прив'язати'"
+ "ua":
+ "Steam Guard встановлено на цьому акаунті. Щоб прив'язати mafile до акаунту, скористайтеся вікном 'Прив'язати'"
},
"SeemsNoPhoneNumber": {
"en": "The account has no phone number linked, returned Fail code (2)",
@@ -1426,15 +1451,18 @@
"ua": "Авто "
},
"TimerPreventedOverlap": {
- "ru": "Авто: таймер подтверждений пытался начать новый цикл, когда предыдущий еще не завершился. Советуем увеличить задержку",
- "en": "Auto: confirmation timer tried to start new cycle when previous one was not finished yet. We recommend to increase delay",
- "ua": "Авто: таймер підтверджень намагався запустити новий цикл, коли попередній ще не закінчився. Рекомендуємо збільшити затримку"
+ "ru":
+ "Авто: таймер подтверждений пытался начать новый цикл, когда предыдущий еще не завершился. Советуем увеличить задержку",
+ "en":
+ "Auto: confirmation timer tried to start new cycle when previous one was not finished yet. We recommend to increase delay",
+ "ua":
+ "Авто: таймер підтверджень намагався запустити новий цикл, коли попередній ще не закінчився. Рекомендуємо збільшити затримку"
},
"FailedToLoadStorage": {
"en": "Failed to load auto-confirm timers. File seems to be corrupted",
"ru": "Не удалось загрузить таймеры авто-подтверждений. Файл, похоже, поврежден",
"ua": "Не вдалося завантажити таймери авто-підтверджень. Файл, схоже, пошкоджено"
- }
+ }
},
"SettingsVM": {
"MafileRenaming": {
@@ -1449,9 +1477,12 @@
"ua": "Всі мафайли успішно перейменовані ({0}).\r\nБуло створено резервну копію: {1}"
},
"PartialSuccess": {
- "en": "Total mafiles: {0}\r\nRenamed: {1}\r\nConflicts: {2}\r\nErrors: {3}\r\n\r\nBackup of mafiles saved in file: {4}",
- "ru": "Всего мафайлов: {0}\r\nПереименовано: {1}\r\nКонфликты: {2}\r\nОшибок: {3}\r\n\r\nРезервная копия мафайлов сохранена в файле: {4}",
- "ua": "Всього мафайлів: {0}\r\nПерейменовано: {1}\r\nКонфлікти: {2}\r\nПомилок: {3}\r\n\r\nРезервна копія мафайлів збережена у файлі: {4}"
+ "en":
+ "Total mafiles: {0}\r\nRenamed: {1}\r\nConflicts: {2}\r\nErrors: {3}\r\n\r\nBackup of mafiles saved in file: {4}",
+ "ru":
+ "Всего мафайлов: {0}\r\nПереименовано: {1}\r\nКонфликты: {2}\r\nОшибок: {3}\r\n\r\nРезервная копия мафайлов сохранена в файле: {4}",
+ "ua":
+ "Всього мафайлів: {0}\r\nПерейменовано: {1}\r\nКонфлікти: {2}\r\nПомилок: {3}\r\n\r\nРезервна копія мафайлів збережена у файлі: {4}"
}
}
},
@@ -1471,8 +1502,11 @@
}
},
"CantAlignTimeError": {
- "ru": "Не удается синхронизировать время со Steam. Возможно отсутствует подключение к интернету или Steam недоступен. Подробная ошибка сохранена в log.log",
- "en": "Can't align time with Steam. Maybe no internet connection or Steam is unavailable. Detailed error saved in log.log",
- "ua": "Не вдається синхронізувати час з Steam. Можливо відсутнє підключення до інтернету або Steam недоступний. Детальна помилка збережена в log.log"
+ "ru":
+ "Не удается синхронизировать время со Steam. Возможно отсутствует подключение к интернету или Steam недоступен. Подробная ошибка сохранена в log.log",
+ "en":
+ "Can't align time with Steam. Maybe no internet connection or Steam is unavailable. Detailed error saved in log.log",
+ "ua":
+ "Не вдається синхронізувати час з Steam. Можливо відсутнє підключення до інтернету або Steam недоступний. Детальна помилка збережена в log.log"
}
}
\ No newline at end of file
diff --git a/src/SteamLibForked/Api/Mobile/SteamAuthenticatorLinkerApi.cs b/src/SteamLibForked/Api/Mobile/SteamAuthenticatorLinkerApi.cs
index 8741613..8d61aed 100644
--- a/src/SteamLibForked/Api/Mobile/SteamAuthenticatorLinkerApi.cs
+++ b/src/SteamLibForked/Api/Mobile/SteamAuthenticatorLinkerApi.cs
@@ -67,14 +67,14 @@ public static class SteamAuthenticatorLinkerApi
var reqUri = AddAccessToken(Routes.LINK_REQUEST, data.GetAccessToken());
var req = new AddAuthenticator_Request
{
- SteamId = (ulong)data.SteamId.Steam64.Id,
+ SteamId = (ulong) data.SteamId.Steam64.Id,
AuthenticatorType = 1,
DeviceIdentifier = deviceId,
Version = 2
};
var resp = await client.PostProtoMsg(reqUri, req);
- if (resp is { Result: EResult.InvalidState, ResponseMsg.Status: 2 })
+ if (resp is {Result: EResult.InvalidState, ResponseMsg.Status: 2})
{
throw new AuthenticatorLinkerException(AuthenticatorLinkerError.InvalidStateWithStatus2);
}
@@ -100,7 +100,7 @@ public static class SteamAuthenticatorLinkerApi
{
SteamId = data.SteamId.Steam64.ToUlong(),
AuthenticatorCode = code,
- AuthenticatorTime = (ulong)time,
+ AuthenticatorTime = (ulong) time,
ConfirmationCode = confirmationCode,
ValidateConfirmationCode = validateSmsCode
};
@@ -108,7 +108,7 @@ public static class SteamAuthenticatorLinkerApi
var resp = await client.PostProto(reqUri, req);
- if (resp is { Success: true, WantMore: false })
+ if (resp is {Success: true, WantMore: false})
{
return new LinkResult();
}
diff --git a/src/SteamLibForked/Api/Mobile/SteamMobileApi.cs b/src/SteamLibForked/Api/Mobile/SteamMobileApi.cs
index 9679c06..3e4e1b7 100644
--- a/src/SteamLibForked/Api/Mobile/SteamMobileApi.cs
+++ b/src/SteamLibForked/Api/Mobile/SteamMobileApi.cs
@@ -1,11 +1,11 @@
-using Newtonsoft.Json.Linq;
+using System.Net;
+using Newtonsoft.Json.Linq;
using SteamLib.Core;
using SteamLib.Core.StatusCodes;
using SteamLib.Exceptions;
using SteamLib.Exceptions.Authorization;
using SteamLib.ProtoCore;
using SteamLib.ProtoCore.Services;
-using System.Net;
namespace SteamLib.Api.Mobile;
diff --git a/src/SteamLibForked/Api/Mobile/SteamMobileConfirmationsApi.cs b/src/SteamLibForked/Api/Mobile/SteamMobileConfirmationsApi.cs
index 8c28cfc..fe84af7 100644
--- a/src/SteamLibForked/Api/Mobile/SteamMobileConfirmationsApi.cs
+++ b/src/SteamLibForked/Api/Mobile/SteamMobileConfirmationsApi.cs
@@ -1,4 +1,5 @@
-using AchiesUtilities.Web.Extensions;
+using System.Net;
+using AchiesUtilities.Web.Extensions;
using SteamLib.Core;
using SteamLib.Core.StatusCodes;
using SteamLib.Exceptions;
@@ -7,7 +8,6 @@ using SteamLib.SteamMobile;
using SteamLib.SteamMobile.Confirmations;
using SteamLib.Utility;
using SteamLib.Web.Scrappers.JSON;
-using System.Net;
namespace SteamLib.Api.Mobile;
diff --git a/src/SteamLibForked/Api/Services/AuthenticationServiceApi.cs b/src/SteamLibForked/Api/Services/AuthenticationServiceApi.cs
index 94358c1..11ce584 100644
--- a/src/SteamLibForked/Api/Services/AuthenticationServiceApi.cs
+++ b/src/SteamLibForked/Api/Services/AuthenticationServiceApi.cs
@@ -1,9 +1,9 @@
-using SteamLib.Core;
+using System.Diagnostics.CodeAnalysis;
+using System.Net;
+using SteamLib.Core;
using SteamLib.Exceptions.Authorization;
using SteamLib.ProtoCore;
using SteamLib.ProtoCore.Services;
-using System.Diagnostics.CodeAnalysis;
-using System.Net;
namespace SteamLib.Api.Services;
diff --git a/src/SteamLibForked/Api/SteamGlobalApi.cs b/src/SteamLibForked/Api/SteamGlobalApi.cs
index cf5d242..d744d23 100644
--- a/src/SteamLibForked/Api/SteamGlobalApi.cs
+++ b/src/SteamLibForked/Api/SteamGlobalApi.cs
@@ -1,8 +1,8 @@
-using SteamLib.Core;
+using System.Net;
+using System.Web;
+using SteamLib.Core;
using SteamLib.Models;
using SteamLib.Web.Scrappers.HTML;
-using System.Net;
-using System.Web;
namespace SteamLib.Api;
diff --git a/src/SteamLibForked/Authentication/AdmissionHelper.cs b/src/SteamLibForked/Authentication/AdmissionHelper.cs
index 9c1fc69..8404c84 100644
--- a/src/SteamLibForked/Authentication/AdmissionHelper.cs
+++ b/src/SteamLibForked/Authentication/AdmissionHelper.cs
@@ -1,4 +1,5 @@
-using AchiesUtilities.Extensions;
+using System.Net;
+using AchiesUtilities.Extensions;
using AchiesUtilities.Models;
using Newtonsoft.Json;
using SteamLib.Core;
@@ -6,7 +7,6 @@ using SteamLib.Models.Account;
using SteamLibForked.Abstractions;
using SteamLibForked.Models.Core;
using SteamLibForked.Models.Session;
-using System.Net;
namespace SteamLib.Authentication;
@@ -131,7 +131,7 @@ public static class AdmissionHelper
}
var mobileToken = mobileSession.GetMobileToken();
- if (domainCookieSet == false && mobileToken is { IsExpired: false })
+ if (domainCookieSet == false && mobileToken is {IsExpired: false})
{
var domain = SteamDomains.GetDomainUri(SteamDomain.Community);
container.Add(domain, new Cookie(ACCESS_COOKIE_NAME, mobileToken.Value.SignedToken)
@@ -208,7 +208,7 @@ public static class AdmissionHelper
static Cookie CloneCookie(Cookie cookie)
{
return new Cookie(cookie.Name, cookie.Value, cookie.Path)
- { Expires = cookie.Expires, Secure = cookie.Secure, HttpOnly = cookie.HttpOnly };
+ {Expires = cookie.Expires, Secure = cookie.Secure, HttpOnly = cookie.HttpOnly};
}
}
diff --git a/src/SteamLibForked/Authentication/AuthHelper.cs b/src/SteamLibForked/Authentication/AuthHelper.cs
index 72ce592..3b1c9f2 100644
--- a/src/SteamLibForked/Authentication/AuthHelper.cs
+++ b/src/SteamLibForked/Authentication/AuthHelper.cs
@@ -1,6 +1,6 @@
-using SteamLib.ProtoCore.Enums;
+using System.Security.Cryptography;
+using SteamLib.ProtoCore.Enums;
using SteamLib.ProtoCore.Services;
-using System.Security.Cryptography;
namespace SteamLib.Authentication;
diff --git a/src/SteamLibForked/Authentication/SteamTokenHelper.cs b/src/SteamLibForked/Authentication/SteamTokenHelper.cs
index 3c6798b..6c8361e 100644
--- a/src/SteamLibForked/Authentication/SteamTokenHelper.cs
+++ b/src/SteamLibForked/Authentication/SteamTokenHelper.cs
@@ -1,11 +1,11 @@
-using AchiesUtilities.Models;
+using System.Collections.ObjectModel;
+using System.Net.Http.Headers;
+using System.Text.RegularExpressions;
+using AchiesUtilities.Models;
using Microsoft.IdentityModel.JsonWebTokens;
using SteamLibForked.Models.Core;
using SteamLibForked.Models.Session;
using SteamLibForked.Models.SteamIds;
-using System.Collections.ObjectModel;
-using System.Net.Http.Headers;
-using System.Text.RegularExpressions;
namespace SteamLib.Authentication;
diff --git a/src/SteamLibForked/Core/StatusCodes/SteamStatusCode.cs b/src/SteamLibForked/Core/StatusCodes/SteamStatusCode.cs
index 5ed764c..2a11bd8 100644
--- a/src/SteamLibForked/Core/StatusCodes/SteamStatusCode.cs
+++ b/src/SteamLibForked/Core/StatusCodes/SteamStatusCode.cs
@@ -67,7 +67,7 @@ public partial class SteamStatusCode : Enumeration
public static SteamStatusCode FromEResult(EResult result)
{
- var r = (int)result;
+ var r = (int) result;
var fromId = FromId(r);
return fromId ?? new SteamStatusCode(r, "Unknown");
}
diff --git a/src/SteamLibForked/Core/SteamDomains.cs b/src/SteamLibForked/Core/SteamDomains.cs
index b787d88..a74737c 100644
--- a/src/SteamLibForked/Core/SteamDomains.cs
+++ b/src/SteamLibForked/Core/SteamDomains.cs
@@ -1,5 +1,5 @@
-using SteamLibForked.Models.Core;
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
+using SteamLibForked.Models.Core;
namespace SteamLib.Core;
diff --git a/src/SteamLibForked/Core/SteamLibErrorMonitor.cs b/src/SteamLibForked/Core/SteamLibErrorMonitor.cs
index 9eee138..f49d7c2 100644
--- a/src/SteamLibForked/Core/SteamLibErrorMonitor.cs
+++ b/src/SteamLibForked/Core/SteamLibErrorMonitor.cs
@@ -1,7 +1,7 @@
-using Microsoft.Extensions.Logging;
-using SteamLib.Exceptions.General;
-using System.Diagnostics.CodeAnalysis;
+using System.Diagnostics.CodeAnalysis;
using System.Runtime.ExceptionServices;
+using Microsoft.Extensions.Logging;
+using SteamLib.Exceptions.General;
namespace SteamLib.Core;
diff --git a/src/SteamLibForked/Factory/Helpers/DeviceDetailsDefaultBuilder.cs b/src/SteamLibForked/Factory/Helpers/DeviceDetailsDefaultBuilder.cs
index ead9c59..e3113f4 100644
--- a/src/SteamLibForked/Factory/Helpers/DeviceDetailsDefaultBuilder.cs
+++ b/src/SteamLibForked/Factory/Helpers/DeviceDetailsDefaultBuilder.cs
@@ -9,13 +9,13 @@ public static class DeviceDetailsDefaultBuilder
[Obsolete("Not recommended")]
public static DeviceDetails CreateDefault(string? deviceFriendlyName)
{
- return new DeviceDetails(deviceFriendlyName ?? string.Empty, EAuthTokenPlatformType.WebBrowser, (int?)null,
+ return new DeviceDetails(deviceFriendlyName ?? string.Empty, EAuthTokenPlatformType.WebBrowser, (int?) null,
null);
}
public static DeviceDetails CreateCommunityDetails(string userAgent)
{
- return new DeviceDetails(userAgent, EAuthTokenPlatformType.WebBrowser, (int?)null, null);
+ return new DeviceDetails(userAgent, EAuthTokenPlatformType.WebBrowser, (int?) null, null);
}
public static DeviceDetails CreateMobileDetails(string deviceName)
diff --git a/src/SteamLibForked/Models/Core/Session/MobileSessionData.cs b/src/SteamLibForked/Models/Core/Session/MobileSessionData.cs
index 4b1cb1a..5c228fc 100644
--- a/src/SteamLibForked/Models/Core/Session/MobileSessionData.cs
+++ b/src/SteamLibForked/Models/Core/Session/MobileSessionData.cs
@@ -1,7 +1,7 @@
-using Newtonsoft.Json;
+using System.Diagnostics.CodeAnalysis;
+using Newtonsoft.Json;
using SteamLibForked.Abstractions;
using SteamLibForked.Models.Core;
-using System.Diagnostics.CodeAnalysis;
namespace SteamLibForked.Models.Session;
@@ -38,7 +38,7 @@ public sealed class MobileSessionData : SessionData, IMobileSessionData
if (token.Type != SteamAccessTokenType.Mobile)
throw new ArgumentException("Token must be of type MobileAccess", nameof(token))
{
- Data = { { "ActualType", token.Type } }
+ Data = {{"ActualType", token.Type}}
};
MobileToken = token;
@@ -46,7 +46,7 @@ public sealed class MobileSessionData : SessionData, IMobileSessionData
public override MobileSessionData Clone()
{
- return (MobileSessionData)((ISessionData)this).Clone();
+ return (MobileSessionData) ((ISessionData) this).Clone();
}
object ICloneable.Clone()
diff --git a/src/SteamLibForked/Models/Core/Session/SessionData.cs b/src/SteamLibForked/Models/Core/Session/SessionData.cs
index ec88b55..1d060cc 100644
--- a/src/SteamLibForked/Models/Core/Session/SessionData.cs
+++ b/src/SteamLibForked/Models/Core/Session/SessionData.cs
@@ -1,8 +1,8 @@
-using Newtonsoft.Json;
+using System.Collections.Concurrent;
+using Newtonsoft.Json;
using SteamLib.Web.Converters;
using SteamLibForked.Abstractions;
using SteamLibForked.Models.Core;
-using System.Collections.Concurrent;
namespace SteamLibForked.Models.Session;
@@ -61,7 +61,7 @@ public class SessionData : ISessionData
public virtual SessionData Clone()
{
- return (SessionData)((ICloneable)this).Clone();
+ return (SessionData) ((ICloneable) this).Clone();
}
object ICloneable.Clone()
diff --git a/src/SteamLibForked/Models/Core/SteamId.cs b/src/SteamLibForked/Models/Core/SteamId.cs
index 0c77b02..3559792 100644
--- a/src/SteamLibForked/Models/Core/SteamId.cs
+++ b/src/SteamLibForked/Models/Core/SteamId.cs
@@ -43,7 +43,7 @@ public readonly struct SteamId : IEquatable //TODO: validation in parse
public static SteamId FromSteam64(ulong steam64, char type = 'U', short universe = 0)
{
- return new SteamId(new SteamId64((long)steam64), type, universe);
+ return new SteamId(new SteamId64((long) steam64), type, universe);
}
public static SteamId FromSteam2(byte lowestBit, int highestBit, byte universe = 0, char type = 'U')
diff --git a/src/SteamLibForked/Models/Core/SteamIds/SteamId3.cs b/src/SteamLibForked/Models/Core/SteamIds/SteamId3.cs
index 0642233..54d4c77 100644
--- a/src/SteamLibForked/Models/Core/SteamIds/SteamId3.cs
+++ b/src/SteamLibForked/Models/Core/SteamIds/SteamId3.cs
@@ -19,7 +19,7 @@ public readonly struct SteamId3 : IEquatable
{
var bit = Id % 2;
var highestBits = Id / 2;
- return new SteamId2(universe, (byte)bit, highestBits);
+ return new SteamId2(universe, (byte) bit, highestBits);
}
diff --git a/src/SteamLibForked/Models/Core/SteamIds/SteamId64.cs b/src/SteamLibForked/Models/Core/SteamIds/SteamId64.cs
index 57e1dbf..b9a72ff 100644
--- a/src/SteamLibForked/Models/Core/SteamIds/SteamId64.cs
+++ b/src/SteamLibForked/Models/Core/SteamIds/SteamId64.cs
@@ -16,15 +16,15 @@ public readonly struct SteamId64 : IEquatable
public SteamId2 ToSteam2(short universe = 0)
{
- var accountIdLowBit = (byte)(Id & 1);
- var accountIdHighBits = (int)(Id >> 1) & 0x7FFFFFF;
- return new SteamId2((byte)universe, accountIdLowBit, accountIdHighBits);
+ var accountIdLowBit = (byte) (Id & 1);
+ var accountIdHighBits = (int) (Id >> 1) & 0x7FFFFFF;
+ return new SteamId2((byte) universe, accountIdLowBit, accountIdHighBits);
}
public SteamId3 ToSteam3(char type = 'U')
{
- var accountIdLowBit = (byte)(Id & 1);
- var accountIdHighBits = (int)(Id >> 1) & 0x7FFFFFF;
+ var accountIdLowBit = (byte) (Id & 1);
+ var accountIdHighBits = (int) (Id >> 1) & 0x7FFFFFF;
return new SteamId3(accountIdLowBit + accountIdHighBits * 2, type);
}
@@ -36,7 +36,7 @@ public readonly struct SteamId64 : IEquatable
public ulong ToUlong()
{
- return (ulong)Id;
+ return (ulong) Id;
}
public long ToLong()
diff --git a/src/SteamLibForked/ProtoCore/ProtoHelpers.cs b/src/SteamLibForked/ProtoCore/ProtoHelpers.cs
index 6674517..f0e9623 100644
--- a/src/SteamLibForked/ProtoCore/ProtoHelpers.cs
+++ b/src/SteamLibForked/ProtoCore/ProtoHelpers.cs
@@ -1,7 +1,7 @@
-using ProtoBuf;
+using System.Diagnostics.CodeAnalysis;
+using ProtoBuf;
using SteamLib.ProtoCore.Enums;
using SteamLib.ProtoCore.Interfaces;
-using System.Diagnostics.CodeAnalysis;
namespace SteamLib.ProtoCore;
@@ -25,7 +25,7 @@ public static class ProtoHelpers
if (response.Headers.TryGetValues("x-eresult", out var val))
{
var eResultInt = Convert.ToInt32(val.Single());
- return (EResult)eResultInt;
+ return (EResult) eResultInt;
}
return EResult.Invalid;
diff --git a/src/SteamLibForked/ProtoCore/ProtoResponse.cs b/src/SteamLibForked/ProtoCore/ProtoResponse.cs
index e2a2503..671dd39 100644
--- a/src/SteamLibForked/ProtoCore/ProtoResponse.cs
+++ b/src/SteamLibForked/ProtoCore/ProtoResponse.cs
@@ -22,7 +22,7 @@ public class ProtoResponse : ProtoResponse
{
public TProtoResponse? ResponseMsg
{
- get => ProtoObject == null ? default : (TProtoResponse)ProtoObject;
+ get => ProtoObject == null ? default : (TProtoResponse) ProtoObject;
set => ProtoObject = value;
}
@@ -37,7 +37,7 @@ public class ProtoResponse : ProtoResponse
if (response.Headers.TryGetValues("x-eresult", out var val))
{
var eResultInt = Convert.ToInt32(val.Single());
- eResult = (EResult)eResultInt;
+ eResult = (EResult) eResultInt;
}
var msg = default(TProtoResponse);
@@ -67,7 +67,7 @@ public class ProtoResponse : ProtoResponse
if (response.Headers.TryGetValues("x-eresult", out var val))
{
var eResultInt = Convert.ToInt32(val.Single());
- eResult = (EResult)eResultInt;
+ eResult = (EResult) eResultInt;
}
var msg = default(TProtoResponse);
diff --git a/src/SteamLibForked/ProtoCore/Services/AuthenticationService.cs b/src/SteamLibForked/ProtoCore/Services/AuthenticationService.cs
index 7940b4e..1b83e04 100644
--- a/src/SteamLibForked/ProtoCore/Services/AuthenticationService.cs
+++ b/src/SteamLibForked/ProtoCore/Services/AuthenticationService.cs
@@ -1,8 +1,8 @@
-using ProtoBuf;
+using System.Security.Cryptography;
+using ProtoBuf;
using SteamLib.ProtoCore.Enums;
using SteamLib.ProtoCore.Interfaces;
using SteamLib.Utility;
-using System.Security.Cryptography;
// ReSharper disable InconsistentNaming
// ReSharper disable IdentifierTypo
@@ -81,18 +81,18 @@ public class DeviceDetails : IProtoMsg
{
DeviceFriendlyName = deviceFriendlyName;
PlatformType = platformType;
- OsType = (int?)osType;
+ OsType = (int?) osType;
GamingDeviceType = gamingDeviceType;
}
public static DeviceDetails CreateDefault()
{
- return new DeviceDetails("", EAuthTokenPlatformType.WebBrowser, (int?)null, null);
+ return new DeviceDetails("", EAuthTokenPlatformType.WebBrowser, (int?) null, null);
}
public static DeviceDetails CreateCommunityDetails(string userAgent)
{
- return new DeviceDetails(userAgent, EAuthTokenPlatformType.WebBrowser, (int?)null, null);
+ return new DeviceDetails(userAgent, EAuthTokenPlatformType.WebBrowser, (int?) null, null);
}
public static DeviceDetails CreateMobileDetails(string deviceName)
diff --git a/src/SteamLibForked/SteamLibForked.csproj.DotSettings b/src/SteamLibForked/SteamLibForked.csproj.DotSettings
index 174eb96..a082a14 100644
--- a/src/SteamLibForked/SteamLibForked.csproj.DotSettings
+++ b/src/SteamLibForked/SteamLibForked.csproj.DotSettings
@@ -1,5 +1,12 @@
-
- False
- True
- True
- True
\ No newline at end of file
+
+ False
+ True
+ True
+ True
\ No newline at end of file
diff --git a/src/SteamLibForked/SteamMobile/AuthenticatorLinker/SteamAuthenticatorLinker.cs b/src/SteamLibForked/SteamMobile/AuthenticatorLinker/SteamAuthenticatorLinker.cs
index 7d6fd94..942138e 100644
--- a/src/SteamLibForked/SteamMobile/AuthenticatorLinker/SteamAuthenticatorLinker.cs
+++ b/src/SteamLibForked/SteamMobile/AuthenticatorLinker/SteamAuthenticatorLinker.cs
@@ -103,7 +103,7 @@ public class SteamAuthenticatorLinker
var sendSms = await this.SendSmsCode();
if (sendSms != EResult.OK)
- throw new AuthenticatorLinkerException($"Can't send SMS code: {sendSms} ({(int)sendSms})");
+ throw new AuthenticatorLinkerException($"Can't send SMS code: {sendSms} ({(int) sendSms})");
Logger?.LogDebug("SMS code sent");
}
@@ -155,14 +155,14 @@ public class SteamAuthenticatorLinker
var error = result.Error switch
{
LinkError.GeneralFailure => throw new AuthenticatorLinkerException(result.Code!.Value)
- { OnFinalization = true },
+ {OnFinalization = true},
LinkError.BadConfirmationCode => AuthenticatorLinkerError.BadConfirmationCode,
LinkError.UnableToGenerateCorrectCodes => AuthenticatorLinkerError.UnableToGenerateCorrectCodes,
_ => throw new ArgumentOutOfRangeException(nameof(result.Error), result.Error,
$"LinkError {result.Error} not supported")
};
- throw new AuthenticatorLinkerException(error) { OnFinalization = true };
+ throw new AuthenticatorLinkerException(error) {OnFinalization = true};
}
Logger?.LogInformation("Linking completed");
diff --git a/src/SteamLibForked/SteamMobile/SteamGuardCodeGenerator.cs b/src/SteamLibForked/SteamMobile/SteamGuardCodeGenerator.cs
index de0bea3..d0b5fef 100644
--- a/src/SteamLibForked/SteamMobile/SteamGuardCodeGenerator.cs
+++ b/src/SteamLibForked/SteamMobile/SteamGuardCodeGenerator.cs
@@ -1,11 +1,11 @@
-using SteamLib.Abstractions;
+using System.Security.Cryptography;
+using System.Text;
+using System.Text.RegularExpressions;
+using SteamLib.Abstractions;
using SteamLib.Api.Services;
using SteamLib.Authentication;
using SteamLib.ProtoCore.Enums;
using SteamLibForked.Abstractions.Auth;
-using System.Security.Cryptography;
-using System.Text;
-using System.Text.RegularExpressions;
namespace SteamLib.SteamMobile;
@@ -53,7 +53,7 @@ public class SteamGuardCodeGenerator : ISteamGuardProvider
for (var i = 8; i > 0; i--)
{
- timeArray[i - 1] = (byte)time;
+ timeArray[i - 1] = (byte) time;
time >>= 8;
}
@@ -62,7 +62,7 @@ public class SteamGuardCodeGenerator : ISteamGuardProvider
var hashedData = hmacGenerator.ComputeHash(timeArray);
var codeArray = new byte[5];
- var b = (byte)(hashedData[19] & 0xF);
+ var b = (byte) (hashedData[19] & 0xF);
var codePoint = ((hashedData[b] & 0x7F) << 24) | ((hashedData[b + 1] & 0xFF) << 16) |
((hashedData[b + 2] & 0xFF) << 8) | (hashedData[b + 3] & 0xFF);
diff --git a/src/SteamLibForked/SteamMobile/TimeAligner.cs b/src/SteamLibForked/SteamMobile/TimeAligner.cs
index 18085f7..802152b 100644
--- a/src/SteamLibForked/SteamMobile/TimeAligner.cs
+++ b/src/SteamLibForked/SteamMobile/TimeAligner.cs
@@ -1,7 +1,7 @@
-using AchiesUtilities.Models;
+using System.Diagnostics;
+using AchiesUtilities.Models;
using Newtonsoft.Json.Linq;
using SteamLib.Core;
-using System.Diagnostics;
namespace SteamLib.SteamMobile;
@@ -50,7 +50,7 @@ public static class TimeAligner
var j = JObject.Parse(respStr);
var time = j["response"]!["server_time"]!.Value();
var now = UtcNow - sw.Elapsed;
- _timeDifference = (int)(time - now.ToLong());
+ _timeDifference = (int) (time - now.ToLong());
_aligned = true;
}
finally
@@ -72,7 +72,7 @@ public static class TimeAligner
var j = JObject.Parse(respStr);
var time = j["response"]!["server_time"]!.Value();
var now = UtcNow - sw.Elapsed;
- _timeDifference = (int)(time - now.ToLong());
+ _timeDifference = (int) (time - now.ToLong());
_aligned = true;
}
finally
diff --git a/src/SteamLibForked/Utility/EncryptionHelper.cs b/src/SteamLibForked/Utility/EncryptionHelper.cs
index 6e6e316..c521aa2 100644
--- a/src/SteamLibForked/Utility/EncryptionHelper.cs
+++ b/src/SteamLibForked/Utility/EncryptionHelper.cs
@@ -60,7 +60,7 @@ public static class EncryptionHelper
break;
}
- array[n4] = (byte)time;
+ array[n4] = (byte) time;
time >>= 8;
n3 = n4;
}
diff --git a/src/SteamLibForked/Utility/MafileSerialization/DeserializedMafileData.cs b/src/SteamLibForked/Utility/MafileSerialization/DeserializedMafileData.cs
index db332ea..85e2cb6 100644
--- a/src/SteamLibForked/Utility/MafileSerialization/DeserializedMafileData.cs
+++ b/src/SteamLibForked/Utility/MafileSerialization/DeserializedMafileData.cs
@@ -1,6 +1,6 @@
-using Newtonsoft.Json.Linq;
+using System.Diagnostics.CodeAnalysis;
+using Newtonsoft.Json.Linq;
using SteamLibForked.Models.SteamIds;
-using System.Diagnostics.CodeAnalysis;
namespace SteamLib.Utility.MafileSerialization;
@@ -73,13 +73,13 @@ public class DeserializedMafileInfo
public bool IsActual => Version == MafileSerializer.MAFILE_VERSION;
[MemberNotNullWhen(true, nameof(UnusedProperties))]
- public bool HasUnusedProperties => UnusedProperties is { Count: > 0 };
+ public bool HasUnusedProperties => UnusedProperties is {Count: > 0};
[MemberNotNullWhen(true, nameof(MissingProperties))]
- public bool HasMissingProperties => MissingProperties is { Count: > 0 };
+ public bool HasMissingProperties => MissingProperties is {Count: > 0};
[MemberNotNullWhen(true, nameof(MissingImportantProperties))]
- public bool HasMissingImportantProperties => MissingImportantProperties is { Count: > 0 };
+ public bool HasMissingImportantProperties => MissingImportantProperties is {Count: > 0};
public bool HasSession => SessionResult == DeserializedMafileSessionResult.Valid;
public bool HasIdentificationProperty { get; init; }
@@ -100,7 +100,7 @@ public class DeserializedMafileInfo
isExtended = true;
}
- if (isExtended && missingProperties is { Count: > 0 })
+ if (isExtended && missingProperties is {Count: > 0})
{
var important = missingProperties.Intersect(ImportantProperties).ToList();
if (important.Count > 0) missingImportantProperties = important.ToHashSet();
diff --git a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer.cs b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer.cs
index 66f0d39..1417c33 100644
--- a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer.cs
+++ b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer.cs
@@ -29,7 +29,7 @@ public partial class MafileSerializer
var versionToken = GetToken(j, SIGNATURE_PROPERTY_NAME);
unusedProperties.Remove(CREDITS_PROPERTY_NAME);
int? version = null;
- if (versionToken is { Type: JTokenType.Integer })
+ if (versionToken is {Type: JTokenType.Integer})
{
version = versionToken.Value();
}
diff --git a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_SessionData.cs b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_SessionData.cs
index 2295c7a..a2938ab 100644
--- a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_SessionData.cs
+++ b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_SessionData.cs
@@ -1,9 +1,9 @@
-using Newtonsoft.Json.Linq;
+using System.Security.Cryptography;
+using System.Text;
+using Newtonsoft.Json.Linq;
using SteamLib.Authentication;
using SteamLibForked.Models.Session;
using SteamLibForked.Models.SteamIds;
-using System.Security.Cryptography;
-using System.Text;
namespace SteamLib.Utility.MafileSerialization;
@@ -17,14 +17,14 @@ public partial class MafileSerializer //SessionData
var refreshToken = GetAuthToken(j, nameof(MobileSessionData.RefreshToken), "refreshtoken", "refresh_token",
"refresh", "OAuthToken");
- if (refreshToken is not { Type: SteamAccessTokenType.MobileRefresh })
+ if (refreshToken is not {Type: SteamAccessTokenType.MobileRefresh})
{
result = DeserializedMafileSessionResult.Invalid;
return null;
}
var accessToken = GetAuthToken(j, "accesstoken", "access_token", "access", "steamLoginSecure");
- if (accessToken is not { Type: SteamAccessTokenType.Mobile })
+ if (accessToken is not {Type: SteamAccessTokenType.Mobile})
{
accessToken = null;
}
diff --git a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Utility.cs b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Utility.cs
index 98be422..fec2054 100644
--- a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Utility.cs
+++ b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Utility.cs
@@ -1,6 +1,6 @@
-using Newtonsoft.Json.Linq;
+using System.Numerics;
+using Newtonsoft.Json.Linq;
using SteamLibForked.Models.SteamIds;
-using System.Numerics;
namespace SteamLib.Utility.MafileSerialization;
@@ -167,11 +167,11 @@ public partial class MafileSerializer //Utility
{
res = settings.DeserializationOptions.RestrictOverflowSerialNumberRecovery
? 0
- : GetFromOverflow((long)bigInt);
+ : GetFromOverflow((long) bigInt);
}
else if (bigInt > ulong.MinValue && bigInt < ulong.MaxValue) //Valid range
{
- res = (ulong)bigInt;
+ res = (ulong) bigInt;
}
else
{
@@ -192,7 +192,7 @@ public partial class MafileSerializer //Utility
ulong originalValue;
unchecked
{
- originalValue = (ulong)overflow + ulong.MaxValue + 1;
+ originalValue = (ulong) overflow + ulong.MaxValue + 1;
}
return originalValue;
diff --git a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Validate.cs b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Validate.cs
index b18a3f9..0f966e8 100644
--- a/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Validate.cs
+++ b/src/SteamLibForked/Utility/MafileSerialization/MafileSerializer_Validate.cs
@@ -1,7 +1,7 @@
-using Newtonsoft.Json.Linq;
+using System.Diagnostics.CodeAnalysis;
+using Newtonsoft.Json.Linq;
using SteamLib.Authentication;
using SteamLibForked.Models.Session;
-using System.Diagnostics.CodeAnalysis;
namespace SteamLib.Utility.MafileSerialization;
diff --git a/src/SteamLibForked/Utility/SteamIdParser.cs b/src/SteamLibForked/Utility/SteamIdParser.cs
index 5228e0d..53a4bfd 100644
--- a/src/SteamLibForked/Utility/SteamIdParser.cs
+++ b/src/SteamLibForked/Utility/SteamIdParser.cs
@@ -1,5 +1,5 @@
-using SteamLibForked.Models.SteamIds;
-using System.Text.RegularExpressions;
+using System.Text.RegularExpressions;
+using SteamLibForked.Models.SteamIds;
namespace SteamLib.Utility;
diff --git a/src/SteamLibForked/Web/ClientBuilder.cs b/src/SteamLibForked/Web/ClientBuilder.cs
index 52a8333..9118d7a 100644
--- a/src/SteamLibForked/Web/ClientBuilder.cs
+++ b/src/SteamLibForked/Web/ClientBuilder.cs
@@ -1,8 +1,8 @@
-using AchiesUtilities.Web.Models;
+using System.Net;
+using System.Net.Http.Headers;
+using AchiesUtilities.Web.Models;
using SteamLib.Authentication;
using SteamLibForked.Abstractions;
-using System.Net;
-using System.Net.Http.Headers;
namespace SteamLib.Web;
diff --git a/src/SteamLibForked/Web/Converters/SteamIdConverters.cs b/src/SteamLibForked/Web/Converters/SteamIdConverters.cs
index 7a422f8..f4a5844 100644
--- a/src/SteamLibForked/Web/Converters/SteamIdConverters.cs
+++ b/src/SteamLibForked/Web/Converters/SteamIdConverters.cs
@@ -18,7 +18,7 @@ public class SteamIdToSteam64Converter : JsonConverter
return SteamId.FromSteam64(l);
}
- var str = (string)reader.Value!;
+ var str = (string) reader.Value!;
return new SteamId(SteamId64.Parse(str));
}
}
@@ -33,7 +33,7 @@ public class SteamIdToSteam2Converter : JsonConverter
public override SteamId ReadJson(JsonReader reader, Type objectType, SteamId existingValue, bool hasExistingValue,
JsonSerializer serializer)
{
- var str = (string)reader.Value!;
+ var str = (string) reader.Value!;
return new SteamId(SteamId2.Parse(str));
}
}
@@ -48,7 +48,7 @@ public class SteamIdToSteam3Converter : JsonConverter
public override SteamId ReadJson(JsonReader reader, Type objectType, SteamId existingValue, bool hasExistingValue,
JsonSerializer serializer)
{
- var str = (string)reader.Value!;
+ var str = (string) reader.Value!;
return new SteamId(SteamId3.Parse(str));
}
}
@@ -69,7 +69,7 @@ public class Steam64ToLongConverter : JsonConverter
return new SteamId64(l);
}
- var str = (string)reader.Value!;
+ var str = (string) reader.Value!;
return SteamId64.Parse(str);
}
}
@@ -84,7 +84,7 @@ public class SteamId2ToStringConverter : JsonConverter
public override SteamId2 ReadJson(JsonReader reader, Type objectType, SteamId2 existingValue, bool hasExistingValue,
JsonSerializer serializer)
{
- var str = (string)reader.Value!;
+ var str = (string) reader.Value!;
return SteamId2.Parse(str);
}
}
@@ -99,7 +99,7 @@ public class SteamId3ToStringConverter : JsonConverter
public override SteamId3 ReadJson(JsonReader reader, Type objectType, SteamId3 existingValue, bool hasExistingValue,
JsonSerializer serializer)
{
- var str = (string)reader.Value!;
+ var str = (string) reader.Value!;
return SteamId3.Parse(str);
}
}
\ No newline at end of file
diff --git a/src/SteamLibForked/Web/Scrappers/HTML/ScriptHeaderScrapper.cs b/src/SteamLibForked/Web/Scrappers/HTML/ScriptHeaderScrapper.cs
index 4cc3d3c..24d2836 100644
--- a/src/SteamLibForked/Web/Scrappers/HTML/ScriptHeaderScrapper.cs
+++ b/src/SteamLibForked/Web/Scrappers/HTML/ScriptHeaderScrapper.cs
@@ -1,9 +1,9 @@
-using HtmlAgilityPack;
+using System.Diagnostics.CodeAnalysis;
+using System.Text.RegularExpressions;
+using HtmlAgilityPack;
using JetBrains.Annotations;
using SteamLib.Exceptions.General;
using SteamLib.Models;
-using System.Diagnostics.CodeAnalysis;
-using System.Text.RegularExpressions;
namespace SteamLib.Web.Scrappers.HTML;
@@ -12,9 +12,7 @@ public static class ScriptHeaderScrapper
{
private const string XPATH = "//div[@class='responsive_page_content']/script";
- [RegexPattern]
- [SuppressMessage("ReSharper", "UseRawString")]
- [SuppressMessage("ReSharper", "StringLiteralTypo")]
+ [RegexPattern] [SuppressMessage("ReSharper", "UseRawString")] [SuppressMessage("ReSharper", "StringLiteralTypo")]
private static readonly string _regexTip =
@"g_sessionID = ""(?.*)"";"
+ @"\s*g_steamID = (?.*);";
diff --git a/src/SteamLibForked/Web/Scrappers/JSON/MobileConfirmationScrapper.cs b/src/SteamLibForked/Web/Scrappers/JSON/MobileConfirmationScrapper.cs
index 726dda1..d1f02b1 100644
--- a/src/SteamLibForked/Web/Scrappers/JSON/MobileConfirmationScrapper.cs
+++ b/src/SteamLibForked/Web/Scrappers/JSON/MobileConfirmationScrapper.cs
@@ -78,7 +78,7 @@ public static class MobileConfirmationScrapper
ConfirmationType.MarketSellTransaction => GetMarketConfirmation(json),
ConfirmationType.RegisterApiKey => GetRegisterApiKeyConfirmation(json),
ConfirmationType.Purchase => GetPurchaseConfirmation(json),
- _ => new Confirmation(json.Id, json.Nonce, (int)json.Type, json.CreatorId, json.Type, json.TypeName)
+ _ => new Confirmation(json.Id, json.Nonce, (int) json.Type, json.CreatorId, json.Type, json.TypeName)
{
Time = json.CreationTime.ToLocalDateTime()
}