mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-21 09:02:26 +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
|
||||
|
||||
- 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
|
||||
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
|
||||
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
|
||||
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
|
||||
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:
|
||||
# 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]
|
||||
public DateTime? VipEndTime { get; set; }
|
||||
|
||||
const string VipEndTimeStringDef = "新用户免费试用 2 天";
|
||||
|
||||
[Reactive]
|
||||
public string? VipEndTimeString { get; set; }
|
||||
public string? VipEndTimeString { get; set; } = VipEndTimeStringDef;
|
||||
|
||||
GameAcceleratorService()
|
||||
{
|
||||
@@ -177,54 +179,51 @@ public sealed partial class GameAcceleratorService
|
||||
.ObserveOn(RxApp.MainThreadScheduler)
|
||||
.Subscribe(async x =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
|
||||
return;
|
||||
|
||||
var vipEndTimeResult = await IMicroServiceClient.Instance.Manage.GetXunYouVipEndTime();
|
||||
if (vipEndTimeResult == null)
|
||||
string vipEndTimeString = VipEndTimeStringDef;
|
||||
try
|
||||
{
|
||||
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)
|
||||
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
|
||||
{
|
||||
VipEndTime = etime.Value.ToDateTime(UnixTimestampType.Seconds);
|
||||
//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}";
|
||||
//}
|
||||
return;
|
||||
}
|
||||
|
||||
if (VipEndTime.Value.AddDays(365).Date == DateTimeOffset.Now.Date)
|
||||
VipEndTimeString = "新用户试用2天";
|
||||
else
|
||||
VipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
|
||||
var vipEndTimeResult = await IMicroServiceClient.Instance.Manage.GetXunYouVipEndTime();
|
||||
if (vipEndTimeResult == null)
|
||||
{
|
||||
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),
|
||||
"XunYouSDK.GetVipEndTime is fail, message: {message}, code: {code}.",
|
||||
vipEndTimeResult.Content.Message,
|
||||
vipEndTimeResult.Content.Code);
|
||||
VipEndTimeString = vipEndTimeString;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
+1
@@ -300,6 +300,7 @@ public sealed partial class SteamLoginImportPageViewModel : ViewModelBase
|
||||
if (await steamAuthenticator.RemoveAuthenticatorViaChallengeContinueSync(PhoneCodeText, _enrollState.AccessToken!))
|
||||
{
|
||||
await SaveAuthenticatorAsync();
|
||||
RevocationCodeText = steamAuthenticator.RecoveryCode;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user