mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-22 01:16:17 +08:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc19a02f4f | |||
| d59d63d57e | |||
| 9ad6e8fa8d | |||
| 45ef15b220 | |||
| 25dfd1f888 | |||
| 0495cd3079 | |||
| ea9c45d78b | |||
| 4427fd1a5f | |||
| edf3c3a72c | |||
| 55490d2351 | |||
| 17ae6655b4 |
@@ -68,19 +68,19 @@ jobs:
|
|||||||
run: dotnet --info
|
run: dotnet --info
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.AppHost
|
- name: Build BD.WTTS.Client.AppHost
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.AppHost\BD.WTTS.Client.AppHost.csproj --nologo -v q /property:WarningLevel=1
|
run: dotnet build -c Release src\BD.WTTS.Client.AppHost\BD.WTTS.Client.AppHost.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.Plugins.Accelerator.ReverseProxy
|
- name: Build BD.WTTS.Client.Plugins.Accelerator.ReverseProxy
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy.csproj --nologo -v q /property:WarningLevel=1
|
run: dotnet build -c Release src\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.Avalonia.App
|
- name: Build BD.WTTS.Client.Avalonia.App
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.App\BD.WTTS.Client.Avalonia.App.csproj --nologo -v q /property:WarningLevel=1
|
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.App\BD.WTTS.Client.Avalonia.App.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.Avalonia.Designer.HostApp
|
- name: Build BD.WTTS.Client.Avalonia.Designer.HostApp
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.Designer.HostApp\BD.WTTS.Client.Avalonia.Designer.HostApp.csproj --nologo -v q /property:WarningLevel=1
|
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.Designer.HostApp\BD.WTTS.Client.Avalonia.Designer.HostApp.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q /property:WarningLevel=1
|
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
# release:
|
# release:
|
||||||
# name: Release
|
# name: Release
|
||||||
|
|||||||
+1
-1
Submodule ref/SteamClient updated: 724b8552cb...d137c6195b
+1
-1
Submodule ref/WinAuth updated: eabbfe1513...f6ad4f84ca
@@ -52,8 +52,10 @@ public sealed partial class GameAcceleratorService
|
|||||||
[Reactive]
|
[Reactive]
|
||||||
public DateTime? VipEndTime { get; set; }
|
public DateTime? VipEndTime { get; set; }
|
||||||
|
|
||||||
|
const string VipEndTimeStringDef = "新用户免费试用 2 天";
|
||||||
|
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public string? VipEndTimeString { get; set; }
|
public string? VipEndTimeString { get; set; } = VipEndTimeStringDef;
|
||||||
|
|
||||||
GameAcceleratorService()
|
GameAcceleratorService()
|
||||||
{
|
{
|
||||||
@@ -177,54 +179,51 @@ public sealed partial class GameAcceleratorService
|
|||||||
.ObserveOn(RxApp.MainThreadScheduler)
|
.ObserveOn(RxApp.MainThreadScheduler)
|
||||||
.Subscribe(async x =>
|
.Subscribe(async x =>
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
|
string vipEndTimeString = VipEndTimeStringDef;
|
||||||
return;
|
try
|
||||||
|
|
||||||
var vipEndTimeResult = await IMicroServiceClient.Instance.Manage.GetXunYouVipEndTime();
|
|
||||||
if (vipEndTimeResult == null)
|
|
||||||
{
|
{
|
||||||
Log.Error(nameof(GameAcceleratorService),
|
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
|
||||||
"XunYouSDK.GetVipEndTime is null.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!vipEndTimeResult.IsSuccess || vipEndTimeResult.Content == null)
|
|
||||||
{
|
|
||||||
Toast.Show(ToastIcon.Error, "获取会员时间失败");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vipEndTimeResult.Content.Code == XunYouBaseResponseCode.成功)
|
|
||||||
{
|
|
||||||
var etime = vipEndTimeResult.Content.Data?.ExpireTime;
|
|
||||||
if (etime.HasValue)
|
|
||||||
{
|
{
|
||||||
VipEndTime = etime.Value.ToDateTime(UnixTimestampType.Seconds);
|
return;
|
||||||
//var acc_order = (await IMicroServiceClient.Instance.Ordering.GetUserOrderCount([OrderStatus.Paid, OrderStatus.Completed], OrderBusinessType.XunYouOrder)).Content;
|
}
|
||||||
//if (acc_order <= 0)
|
|
||||||
//{
|
|
||||||
// if (VipEndTime.Value.AddDays(365).Date == DateTimeOffset.Now.Date)
|
|
||||||
// VipEndTimeString = "试用时长到期";
|
|
||||||
// else
|
|
||||||
// VipEndTimeString = "新用户试用2天";
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// VipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (VipEndTime.Value.AddDays(365).Date == DateTimeOffset.Now.Date)
|
var vipEndTimeResult = await IMicroServiceClient.Instance.Manage.GetXunYouVipEndTime();
|
||||||
VipEndTimeString = "新用户试用2天";
|
if (vipEndTimeResult == null)
|
||||||
else
|
{
|
||||||
VipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
|
Log.Error(nameof(GameAcceleratorService),
|
||||||
|
"XunYouSDK.GetVipEndTime is null.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!vipEndTimeResult.IsSuccess || vipEndTimeResult.Content == null)
|
||||||
|
{
|
||||||
|
Toast.Show(ToastIcon.Error, "获取会员时间失败");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vipEndTimeResult.Content.Code == XunYouBaseResponseCode.成功)
|
||||||
|
{
|
||||||
|
var etime = vipEndTimeResult.Content.Data?.ExpireTime;
|
||||||
|
if (etime.HasValue)
|
||||||
|
{
|
||||||
|
VipEndTime = etime.Value.ToDateTime(UnixTimestampType.Seconds);
|
||||||
|
if (VipEndTime.Value > DateTime.Now)
|
||||||
|
{
|
||||||
|
vipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.Error(nameof(GameAcceleratorService),
|
||||||
|
"XunYouSDK.GetVipEndTime is fail, message: {message}, code: {code}.",
|
||||||
|
vipEndTimeResult.Content.Message,
|
||||||
|
vipEndTimeResult.Content.Code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
finally
|
||||||
{
|
{
|
||||||
Log.Error(nameof(GameAcceleratorService),
|
VipEndTimeString = vipEndTimeString;
|
||||||
"XunYouSDK.GetVipEndTime is fail, message: {message}, code: {code}.",
|
|
||||||
vipEndTimeResult.Content.Message,
|
|
||||||
vipEndTimeResult.Content.Code);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
@@ -300,6 +300,7 @@ public sealed partial class SteamLoginImportPageViewModel : ViewModelBase
|
|||||||
if (await steamAuthenticator.RemoveAuthenticatorViaChallengeContinueSync(PhoneCodeText, _enrollState.AccessToken!))
|
if (await steamAuthenticator.RemoveAuthenticatorViaChallengeContinueSync(PhoneCodeText, _enrollState.AccessToken!))
|
||||||
{
|
{
|
||||||
await SaveAuthenticatorAsync();
|
await SaveAuthenticatorAsync();
|
||||||
|
RevocationCodeText = steamAuthenticator.RecoveryCode;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user