mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-27 21:43:14 +08:00
fix appUpdate&steamauth
This commit is contained in:
@@ -21,6 +21,9 @@ namespace System
|
||||
public const string DirPublish =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\Release\Publish";
|
||||
|
||||
public const string DirPublish_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Publish";
|
||||
|
||||
public const string DirPublish_Win7Troubleshoot =
|
||||
@"\src\" + ProjectDir_Win7Troubleshoot + @"\bin\Release\Publish\net35";
|
||||
|
||||
|
||||
@@ -38,16 +38,7 @@ namespace System.Application.Services
|
||||
/// </summary>
|
||||
AppVersionDTO? NewVersionInfo { get; }
|
||||
|
||||
string NewVersionInfoDesc
|
||||
{
|
||||
get
|
||||
{
|
||||
var value = NewVersionInfo?.Description;
|
||||
if (string.IsNullOrWhiteSpace(value)) return string.Empty;
|
||||
var lines = value.Split(';', StringSplitOptions.RemoveEmptyEntries);
|
||||
return string.Join(Environment.NewLine, lines);
|
||||
}
|
||||
}
|
||||
string NewVersionInfoDesc { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查更新,返回新版本信息
|
||||
|
||||
@@ -56,7 +56,27 @@ namespace System.Application.Services.Implementation
|
||||
|
||||
public bool IsExistUpdate { get; protected set; }
|
||||
|
||||
public AppVersionDTO? NewVersionInfo { get; protected set; }
|
||||
AppVersionDTO? _NewVersionInfo;
|
||||
public AppVersionDTO? NewVersionInfo
|
||||
{
|
||||
get => _NewVersionInfo;
|
||||
protected set
|
||||
{
|
||||
_NewVersionInfo = value;
|
||||
this.RaisePropertyChanged(nameof(NewVersionInfoDesc));
|
||||
}
|
||||
}
|
||||
|
||||
public string NewVersionInfoDesc
|
||||
{
|
||||
get
|
||||
{
|
||||
var value = NewVersionInfo?.Description;
|
||||
if (string.IsNullOrWhiteSpace(value)) return string.Empty;
|
||||
var lines = value.Split(';', StringSplitOptions.RemoveEmptyEntries);
|
||||
return string.Join(Environment.NewLine, lines);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当存在新的版本时,重写此方法实现弹窗提示用户
|
||||
@@ -147,7 +167,7 @@ namespace System.Application.Services.Implementation
|
||||
}
|
||||
else if (clear)
|
||||
{
|
||||
var files = Directory.GetFiles("*" + FileExDownloadCache);
|
||||
var files = Directory.GetFiles(dirPath, "*" + FileExDownloadCache);
|
||||
foreach (var item in files)
|
||||
{
|
||||
IOPath.FileTryDelete(item);
|
||||
|
||||
@@ -91,6 +91,6 @@ namespace System.Application.Models
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetRequestUri(string fileId) => $"{Prefix_HTTPS}steampp.net/uploads/publish/files/{fileId}.{FileEx.BIN}";
|
||||
public static string GetRequestUri(string fileId) => $"{Prefix_HTTPS}steampp.net/uploads/publish/files/{fileId}{FileEx.BIN}";
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -453,7 +453,7 @@ namespace System.Application.Models
|
||||
data.Add("access_token", state.OAuthToken);
|
||||
response = Request(WEBAPI_BASE + "/ISteamWebUserPresenceOAuth/Logon/v0001", "POST", data);
|
||||
|
||||
var sessionid = cookies.GetCookies(new Uri(COMMUNITY_BASE + "/"))["sessionid"].Value;
|
||||
var sessionid = cookies.GetCookies(new Uri(COMMUNITY_BASE + "/"))?["sessionid"]?.Value;
|
||||
|
||||
if (state.RequiresActivation == false)
|
||||
{
|
||||
|
||||
@@ -1225,14 +1225,14 @@ namespace WinAuth
|
||||
protected byte[]? Request(string url, string method, NameValueCollection? data, NameValueCollection? headers)
|
||||
{
|
||||
byte[]? responsedata;
|
||||
try
|
||||
{
|
||||
responsedata = Request(url, method, data, headers, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(nameof(WinAuthSteamClient), e, "Forward Request Fail.");
|
||||
}
|
||||
//try
|
||||
//{
|
||||
// responsedata = Request(url, method, data, headers, true);
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// Log.Error(nameof(WinAuthSteamClient), e, "Forward Request Fail.");
|
||||
//}
|
||||
|
||||
responsedata = Request(url, method, data, headers, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user