mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-26 14:51:42 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04e2188437 | |||
| b4c4f52fd1 | |||
| f079488840 | |||
| 4bae3f0250 | |||
| 4c9ec85d6f | |||
| 4761fc70fe | |||
| 3abc12f4bc | |||
| 99982cacb6 | |||
| 2a641e99ae |
@@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "changelog", "changelog", "{
|
||||
changelog\1.5.4.html = changelog\1.5.4.html
|
||||
changelog\1.5.5.html = changelog\1.5.5.html
|
||||
changelog\1.5.6.html = changelog\1.5.6.html
|
||||
changelog\1.7.1.html = changelog\1.7.1.html
|
||||
changelog\1.7.2.html = changelog\1.7.2.html
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamLibForked", "src\SteamLibForked\SteamLibForked.csproj", "{224F9DB0-3D20-A614-BA2A-12F22B13A2C6}"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<item>
|
||||
<version>1.5.6.0</version>
|
||||
<url>https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.5.6/NebulaAuth.1.5.6.zip</url>
|
||||
<changelog>https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.5.6.html</changelog>
|
||||
<version>1.7.2.0</version>
|
||||
<url>https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/releases/download/1.7.2/NebulaAuth.1.7.2.zip</url>
|
||||
<changelog>https://achiez.github.io/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/changelog/1.7.2.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -0,0 +1,85 @@
|
||||
<!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.7</div>
|
||||
<div class="date">23.05.2025</div>
|
||||
<div class="description">
|
||||
<ul>
|
||||
<li>
|
||||
<b>NEWS:</b> Official Telegram group now available! Join us at
|
||||
<b>
|
||||
<a href="https://t.me/nebulaauth">t.me/nebulaauth</a>
|
||||
</b>
|
||||
</li>
|
||||
<li><b>FIX:</b>Removed request to /market/ upon login to prevent 429 error on banned IP</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,89 @@
|
||||
<!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.7.1</div>
|
||||
<div class="date">09.07.2025</div>
|
||||
<div class="description">
|
||||
<ul>
|
||||
<li>
|
||||
<b>NEWS:</b> Official Telegram group now available! Join us at
|
||||
<b>
|
||||
<a href="https://t.me/nebulaauth">t.me/nebulaauth</a>
|
||||
</b>
|
||||
</li>
|
||||
<li><b>UPDATE:</b> Added support for a new confirmation type — Purchase.</li>
|
||||
<li><b>UPDATE:</b> Merged Global 1.7.0 updates into the release version (<a href="https://t.me/nebulaauth/32">patch notes</a>).</li>
|
||||
<li><b>FIX:</b> Fixed a crash occurring during confirmation loading.</li>
|
||||
<li><b>ENHANCEMENT:</b> Improved localization and system messages.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -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.7.2</div>
|
||||
<div class="date">10.07.2025</div>
|
||||
<div class="description">
|
||||
<ul>
|
||||
<li>
|
||||
<b>NEWS:</b> Official Telegram group now available! Join us at
|
||||
<b>
|
||||
<a href="https://t.me/nebulaauth">t.me/nebulaauth</a>
|
||||
</b>
|
||||
</li>
|
||||
<li><b>FIX:</b> Crash on loading trade confirmations</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+1
-20
@@ -7,30 +7,11 @@
|
||||
xmlns:background="clr-namespace:NebulaAuth.Converters.Background">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<converters:CoefficientConverter x:Key="CoefficientConverter" />
|
||||
<converters:ReverseBooleanConverter x:Key="ReverseBooleanConverter" />
|
||||
<converters:ProxyTextConverter x:Key="ProxyTextConverter" />
|
||||
<converters:ProxyDataTextConverter x:Key="ProxyDataTextConverter" />
|
||||
<converters:MultiCommandParameterConverter x:Key="MultiCommandParameterConverter" />
|
||||
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
||||
<converters:AnyMafilesToVisibilityConverter x:Key="AnyMafilesToVisibilityConverter" />
|
||||
<converters:PortableMaClientStatusToColorConverter x:Key="PortableMaClientStatusToColorConverter" />
|
||||
|
||||
<converters:NullableToBooleanConverter x:Key="NullableToBooleanConverter" />
|
||||
<!-- Background converters-->
|
||||
<background:BackgroundImageVisibleConverter x:Key="BackgroundImageVisibleConverter" />
|
||||
<background:BackgroundSourceConverter x:Key="BackgroundSourceConverter" />
|
||||
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<materialDesign:NullableToVisibilityConverter x:Key="NullableToVisibilityConverter" />
|
||||
|
||||
|
||||
<system:Boolean x:Key="True">True</system:Boolean>
|
||||
<system:Boolean x:Key="False">False</system:Boolean>
|
||||
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<ResourceDictionary Source="/Converters/Converters.xaml"/>
|
||||
<ResourceDictionary Source="Theme/Themes/DefaultTheme.xaml" />
|
||||
<ResourceDictionary
|
||||
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:converters="clr-namespace:NebulaAuth.Converters"
|
||||
xmlns:background="clr-namespace:NebulaAuth.Converters.Background">
|
||||
<converters:CoefficientConverter x:Key="CoefficientConverter" />
|
||||
<converters:ReverseBooleanConverter x:Key="ReverseBooleanConverter" />
|
||||
<converters:ProxyTextConverter x:Key="ProxyTextConverter" />
|
||||
<converters:ProxyDataTextConverter x:Key="ProxyDataTextConverter" />
|
||||
<converters:MultiCommandParameterConverter x:Key="MultiCommandParameterConverter" />
|
||||
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
||||
<converters:AnyMafilesToVisibilityConverter x:Key="AnyMafilesToVisibilityConverter" />
|
||||
<converters:PortableMaClientStatusToColorConverter x:Key="PortableMaClientStatusToColorConverter" />
|
||||
|
||||
<converters:NullableToBooleanConverter x:Key="NullableToBooleanConverter" />
|
||||
<!-- Background converters-->
|
||||
<background:BackgroundImageVisibleConverter x:Key="BackgroundImageVisibleConverter" />
|
||||
<background:BackgroundSourceConverter x:Key="BackgroundSourceConverter" />
|
||||
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<materialDesign:NullableToVisibilityConverter x:Key="NullableToVisibilityConverter" />
|
||||
|
||||
|
||||
<system:Boolean x:Key="True">True</system:Boolean>
|
||||
<system:Boolean x:Key="False">False</system:Boolean>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -44,7 +44,7 @@ public class SnackbarController
|
||||
|
||||
private static TimeSpan GetSnackbarTime(string str)
|
||||
{
|
||||
var duration = str.Length / 0.03;
|
||||
var duration = str.Length / 0.022;
|
||||
if (duration < MIN_SNACKBAR_TIME)
|
||||
{
|
||||
duration = MIN_SNACKBAR_TIME;
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace NebulaAuth.Core;
|
||||
public static class UpdateManager
|
||||
{
|
||||
private const string UPDATE_URL =
|
||||
"https://raw.githubusercontent.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/master/misc/update.xml";
|
||||
"https://raw.githubusercontent.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/master/NebulaAuth/update.xml";
|
||||
|
||||
public static void CheckForUpdates()
|
||||
{
|
||||
|
||||
@@ -90,7 +90,8 @@ public partial class PortableMaClient : ObservableObject, IDisposable
|
||||
var toConfirm = new List<Confirmation>();
|
||||
if (AutoConfirmMarket)
|
||||
{
|
||||
var market = conf.Where(c => c.ConfType == ConfirmationType.MarketSellTransaction);
|
||||
var market = conf.Where(c =>
|
||||
c.ConfType is ConfirmationType.MarketSellTransaction or ConfirmationType.Purchase);
|
||||
toConfirm.AddRange(market);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,5 +40,6 @@ public static class Shell
|
||||
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
Logger.Fatal((Exception) e.ExceptionObject);
|
||||
LogManager.Shutdown();
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
<SatelliteResourceLanguages>en;ru;ua</SatelliteResourceLanguages>
|
||||
<ApplicationIcon>Theme\lock.ico</ApplicationIcon>
|
||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||
<AssemblyVersion>1.7.0</AssemblyVersion>
|
||||
<AssemblyVersion>1.7.2</AssemblyVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -10,4 +10,5 @@
|
||||
• Антик-окно как в MarketApp, возможность сразу открыть браузер напр. на CefSharp с залогиненым аккаунтом
|
||||
• Стабильность авто-подтверждений, возможность задать пользователю порог времени когда льются ошибки и только тогда выключать авто-подтверждение
|
||||
• Безопасное сохранение мафайлов через .tmp / .bak
|
||||
• Создание механизма накопления ошибок, чтобы исправить Patch Tuesday, условно аккаунт может игнорировать ошибки 1-2 часа (настриавемо)
|
||||
• Создание механизма накопления ошибок, чтобы исправить Patch Tuesday, условно аккаунт может игнорировать ошибки 1-2 часа (настриавемо)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
xmlns:entities="clr-namespace:NebulaAuth.Model.Entities"
|
||||
xmlns:vm="clr-namespace:NebulaAuth.ViewModel">
|
||||
|
||||
|
||||
|
||||
<DataTemplate DataType="{x:Type confirmations:Confirmation}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -207,4 +207,31 @@
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type confirmations:PurchaseConfirmation}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Width="20" Height="20" VerticalAlignment="Center" DockPanel.Dock="Left"
|
||||
Kind="ShopComplete" Margin="0,0,10,0" />
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="1" Text="{Tr MainWindow.ConfirmationTemplates.Purchase}" />
|
||||
<TextBlock VerticalAlignment="Center" Grid.Column="2" HorizontalAlignment="Right"
|
||||
Text="{Binding Time, StringFormat=t}" />
|
||||
<Button Margin="5,0,0,0" VerticalAlignment="Center" Grid.Column="3"
|
||||
Style="{StaticResource MaterialDesignIconButton}"
|
||||
Command="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.(vm:MainVM.ConfirmCommand)}"
|
||||
CommandParameter="{Binding }">
|
||||
<materialDesign:PackIcon Kind="Check" />
|
||||
</Button>
|
||||
<Button Grid.Column="4" Style="{StaticResource MaterialDesignIconButton}"
|
||||
Command="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext.(vm:MainVM.CancelCommand)}"
|
||||
CommandParameter="{Binding }">
|
||||
<materialDesign:PackIcon Kind="Close" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -255,7 +255,12 @@
|
||||
"en": "Market",
|
||||
"ru": "Маркет",
|
||||
"ua": "Маркет"
|
||||
}
|
||||
},
|
||||
"Purchase": {
|
||||
"en": "Purchase",
|
||||
"ru": "Покупка",
|
||||
"ua": "Покупка"
|
||||
}
|
||||
},
|
||||
"CodeCopied": {
|
||||
"ru": "Скопировано",
|
||||
@@ -1098,14 +1103,14 @@
|
||||
},
|
||||
"ExceptionHandler": {
|
||||
"SessionInvalidException": {
|
||||
"ru": "Сессия истекла. Попробуйте обновить ее через меню или залогиниться заново",
|
||||
"en": "Session expired. Try to refresh it through menu or login again",
|
||||
"ua": "Сесія прострочена. Спробуйте оновити її через меню або залогінитися знову"
|
||||
"ru": "Сессия истекла. Попробуйте обновить ее или залогиниться заново (Аккаунт → войти)",
|
||||
"en": "Session expired. Try to refresh it or login again (Account → Login)",
|
||||
"ua": "Сесія прострочена. Спробуйте оновити її через меню або залогінитися знову (Акаунт → Увійти)"
|
||||
},
|
||||
"SessionExpiredException": {
|
||||
"ru": "Сессия полностью истекла. Нужно залогиниться заново",
|
||||
"en": "Session fully expired. Need to login again",
|
||||
"ua": "Сесія повніст'ю прострочена'. Потрібно залогінитися знову"
|
||||
"ru": "Сессия полностью истекла. Нужно залогиниться заново (Аккаунт → Войти)",
|
||||
"en": "Session fully expired. Need to login again (Account → Login)",
|
||||
"ua": "Сесія повніст'ю прострочена'. Потрібно залогінитися знову (Акаунт → Увійти)"
|
||||
},
|
||||
"TaskCanceledException": {
|
||||
"ru": "Произошла отмена операции",
|
||||
|
||||
@@ -21,7 +21,7 @@ public class SessionData : ISessionData
|
||||
|
||||
public SteamAuthToken RefreshToken { get; }
|
||||
public ConcurrentDictionary<SteamDomain, SteamAuthToken> Tokens { get; }
|
||||
|
||||
|
||||
[JsonConstructor]
|
||||
public SessionData(string sessionId, SteamId steamId, SteamAuthToken refreshToken,
|
||||
IDictionary<SteamDomain, SteamAuthToken>? tokens)
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
public class AccountRecoveryConfirmation : Confirmation
|
||||
{
|
||||
public AccountRecoveryConfirmation(long id, ulong nonce, long creator, string typeName) : base(id, nonce, 6,
|
||||
public AccountRecoveryConfirmation(long id, ulong nonce, ulong creator, string typeName) : base(id, nonce, 6,
|
||||
creator, ConfirmationType.AccountRecovery, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class Confirmation
|
||||
/// <summary>
|
||||
/// Represents either the Trade Offer ID or market transaction ID that caused this confirmation to be created.
|
||||
/// </summary>
|
||||
public long CreatorId { get; }
|
||||
public ulong CreatorId { get; }
|
||||
|
||||
public string TypeName { get; init; }
|
||||
public string HeadLine { get; init; } = string.Empty;
|
||||
@@ -31,7 +31,7 @@ public class Confirmation
|
||||
/// </summary>
|
||||
public int IntType;
|
||||
|
||||
public Confirmation(long id, ulong nonce, int intType, long creatorId, ConfirmationType confType, string typeName)
|
||||
public Confirmation(long id, ulong nonce, int intType, ulong creatorId, ConfirmationType confType, string typeName)
|
||||
{
|
||||
Id = id;
|
||||
Nonce = nonce;
|
||||
|
||||
@@ -6,7 +6,7 @@ public class MarketConfirmation : Confirmation
|
||||
public string ItemName { get; init; } = string.Empty;
|
||||
public string PriceString { get; init; } = string.Empty;
|
||||
|
||||
public MarketConfirmation(long id, ulong key, long creator, string typeName) : base(id, key, 3, creator,
|
||||
public MarketConfirmation(long id, ulong key, ulong creator, string typeName) : base(id, key, 3, creator,
|
||||
ConfirmationType.MarketSellTransaction, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace SteamLib.SteamMobile.Confirmations;
|
||||
|
||||
public class PurchaseConfirmation : Confirmation
|
||||
{
|
||||
public PurchaseConfirmation(long id, ulong nonce, int intType, ulong creatorId, string typeName) : base(id, nonce, intType, creatorId, ConfirmationType.Purchase, typeName)
|
||||
{
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
public class RegisterApiKeyConfirmation : Confirmation
|
||||
{
|
||||
public RegisterApiKeyConfirmation(long id, ulong nonce, long creatorId, string typeName) : base(id, nonce, 8,
|
||||
public RegisterApiKeyConfirmation(long id, ulong nonce, ulong creatorId, string typeName) : base(id, nonce, 8,
|
||||
creatorId, ConfirmationType.RegisterApiKey, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ public class TradeConfirmation : Confirmation
|
||||
public bool IsReceiveNothing { get; set; }
|
||||
public override TradeConfirmationDetails? Details { get; }
|
||||
|
||||
public long TradeId => CreatorId;
|
||||
public ulong TradeId => CreatorId;
|
||||
|
||||
public TradeConfirmation(long id, ulong nonce, long creator, string typeName) : base(id, nonce, 1, creator,
|
||||
public TradeConfirmation(long id, ulong nonce, ulong creator, string typeName) : base(id, nonce, 1, creator,
|
||||
ConfirmationType.Trade, typeName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,5 +6,6 @@ public enum ConfirmationType
|
||||
Trade = 2,
|
||||
MarketSellTransaction = 3,
|
||||
AccountRecovery = 6,
|
||||
RegisterApiKey = 9
|
||||
RegisterApiKey = 9,
|
||||
Purchase = 12
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class ConfirmationJson
|
||||
[JsonProperty("type")] public ConfirmationType Type { get; set; }
|
||||
[JsonProperty("type_name")] public string TypeName { get; set; } = string.Empty;
|
||||
[JsonProperty("id")] public long Id { get; set; }
|
||||
[JsonProperty("creator_id")] public long CreatorId { get; set; }
|
||||
[JsonProperty("creator_id")] public ulong CreatorId { get; set; }
|
||||
[JsonProperty("nonce")] public ulong Nonce { get; set; }
|
||||
[JsonProperty("creation_time")] public UnixTimeStamp CreationTime { get; set; }
|
||||
[JsonProperty("cancel")] public string Cancel { get; set; } = string.Empty;
|
||||
|
||||
@@ -77,6 +77,7 @@ public static class MobileConfirmationScrapper
|
||||
ConfirmationType.AccountRecovery => GetAccountRecoveryConfirmation(json),
|
||||
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)
|
||||
{
|
||||
Time = json.CreationTime.ToLocalDateTime()
|
||||
@@ -166,4 +167,13 @@ public static class MobileConfirmationScrapper
|
||||
PriceString = string.Empty //TODO:
|
||||
};
|
||||
}
|
||||
|
||||
private static PurchaseConfirmation GetPurchaseConfirmation(ConfirmationJson confirmation)
|
||||
{
|
||||
return new PurchaseConfirmation(confirmation.Id, confirmation.Nonce, (int) confirmation.Type,
|
||||
confirmation.CreatorId, confirmation.TypeName)
|
||||
{
|
||||
Time = confirmation.CreationTime.ToLocalDateTime()
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user