Compare commits

..

7 Commits

Author SHA1 Message Date
wangyingpan 7a4964efac 🚑 解决冲突 2024-04-29 13:29:44 +08:00
wangyingpan f646ab1c6f ✨ 替换令牌中添加绑定手机号窜哦做 2024-04-28 16:36:57 +08:00
wangyingpan b4e0b6d773 Merge branch 'fix/authenticator-verifycode-ui' of https://github.com/BeyondDimension/SteamTools into fix/authenticator-verifycode-ui 2024-04-23 14:55:55 +08:00
wangyingpan 5e5b397251 🎨 删除绑定手机号步骤
🐛 修复替换令牌逻辑验证码信息展示错误的问题
2024-04-23 14:54:30 +08:00
wangyingpan 18c742a9ef 🐛 修复添加令牌邮箱/短信验证ui显示 2024-04-23 14:54:30 +08:00
wangyingpan d634204bd4 🎨 删除绑定手机号步骤
🐛 修复替换令牌逻辑验证码信息展示错误的问题
2024-04-23 14:43:44 +08:00
wangyingpan c20b20407e 🐛 修复添加令牌邮箱/短信验证ui显示 2024-04-23 13:55:25 +08:00
26 changed files with 100 additions and 233 deletions
+5 -5
View File
@@ -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;DebugType=pdbonly
run: dotnet build -c Release src\BD.WTTS.Client.AppHost\BD.WTTS.Client.AppHost.csproj --nologo -v q /property:WarningLevel=1
- 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;DebugType=pdbonly
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
- 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;DebugType=pdbonly
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.App\BD.WTTS.Client.Avalonia.App.csproj --nologo -v q /property:WarningLevel=1
- 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;DebugType=pdbonly
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
- name: Test
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q /property:WarningLevel=1
# release:
# name: Release
+1 -3
View File
@@ -213,9 +213,7 @@ Get_NewVer() {
sleep 1
#本地版本 Hash
if [ -f "AppVer" ]; then
o_sha384=$(cat "AppVer")
fi
o_sha384=$(cat "AppVer")
if [ -e "AppVer" ]; then
if [ "${o_sha384,,}" = "${n_sha384,,}" ]; then
Show_Run "已是最新版本,是否启动程序?"
+2 -12
View File
@@ -11,12 +11,6 @@ public sealed partial class App : Application
{
const string TAG = "AvaApp";
public App()
{
OpenBrowserCommand = ReactiveCommand.Create<object?>(OpenBrowserCommandCore);
CopyToClipboardCommand = ReactiveCommand.Create<object?>(CopyToClipboardCommandCore);
}
/// <summary>
/// 获取当前主窗口
/// </summary>
@@ -231,9 +225,7 @@ public sealed partial class App : Application
public static FontFamily DefaultFontFamily => _DefaultFontFamily.Value;
public ICommand OpenBrowserCommand { get; }
public async void OpenBrowserCommandCore(object? url)
public async void OpenBrowserCommand(object? url)
{
try
{
@@ -264,9 +256,7 @@ public sealed partial class App : Application
}
}
public ICommand CopyToClipboardCommand { get; }
public async void CopyToClipboardCommandCore(object? text)
public async void CopyToClipboardCommand(object text)
{
try
{
@@ -6,8 +6,8 @@
x:CompileBindings="True">
<Styles.Resources>
<ResourceDictionary>
<sys:Double x:Key="TitleBarHeight">50</sys:Double>
<Thickness x:Key="TitleBarAfterMargin">0,50,0,0</Thickness>
<sys:Double x:Key="TitleBarHeight">60</sys:Double>
<Thickness x:Key="TitleBarAfterMargin">0,60,0,0</Thickness>
<sys:Double x:Key="SplashScreenImageWidth">100</sys:Double>
<Thickness x:Key="PageMargin">10</Thickness>
@@ -210,7 +210,7 @@
<wnd:MinMaxCloseControl
Name="SystemCaptionButtons"
Height="{Binding TemplateSettings.TitleBarHeight, RelativeSource={RelativeSource TemplatedParent}}"
Margin="14,0"
Margin="18,0"
HorizontalAlignment="Right"
VerticalAlignment="Top" />
@@ -1,7 +1,5 @@
using Avalonia.Markup.Xaml.MarkupExtensions;
using Avalonia.Rendering.Composition;
using FluentAvalonia.UI.Controls.Experimental;
using FluentAvalonia.UI.Navigation;
namespace BD.WTTS.UI.Views.Pages;
@@ -19,7 +17,6 @@ public class PageBase : UserControl
}
_disposables.Add(UISettings.WindowBackgroundCustomImage.Subscribe(x => IsShowBackgroundImage = !x));
//AddHandler(Frame.NavigatingFromEvent, FrameNavigatingFrom, RoutingStrategies.Direct);
//AddHandler(Frame.NavigatedToEvent, FrameNavigatedTo, RoutingStrategies.Direct);
}
@@ -145,7 +142,6 @@ public class PageBase : UserControl
//_previewImageHost = e.NameScope.Find<IconSourceElement>("PreviewImageElement");
//_detailsHost = e.NameScope.Find<StackPanel>("DetailsTextHost");
_optionsHost = e.NameScope.Find<Panel>("OptionsRegion");
_tabsHost = e.NameScope.Find<Border>("TabRegion");
_detailsPanel = e.NameScope.Find<Panel>("PageDetails");
@@ -274,28 +270,33 @@ public class PageBase : UserControl
ec.ImplicitAnimations = ani;
}
//private void FrameNavigatingFrom(object? sender, NavigatingCancelEventArgs e)
//private void FrameNavigatingFrom(object sender, NavigatingCancelEventArgs e)
//{
// // If TargetType is not set, we know we're currently on a CoreControls page since those
// // are grouped pages - whereas, FA controls only display one control per page and
// // set all the extra properties
// bool isFAControlPage = TargetType != null;
// // Only setup the ConnectedAnimation if it makes sense
// if ((e.SourcePageType == typeof(HomePageViewModel)) ||
// (e.SourcePageType == typeof(PluginStorePageViewModel)))
// if ((!isFAControlPage && e.SourcePageType == typeof(CoreControlsPageViewModel)) ||
// (isFAControlPage && e.SourcePageType == typeof(FAControlsOverviewPageViewModel)))
// {
// // Only setup the Back connected animation if we're going back to the
// // controls list pages
// var svc = ConnectedAnimationService.GetForView(TopLevel.GetTopLevel(this));
// svc.PrepareToAnimate("BackAnimation", (Control)_previewImageHost.Parent);
// //NavigationService.Instance.PreviousPage = this;
// NavigationService.Instance.PreviousPage = this;
// }
//}
//private void FrameNavigatedTo(object? sender, NavigationEventArgs e)
//private void FrameNavigatedTo(object sender, NavigationEventArgs e)
//{
// var svc = ConnectedAnimationService.GetForView(TopLevel.GetTopLevel(this));
// var animation = svc.GetAnimation("ForwardAnimation");
// if (animation != null)
// {
// var coordinated = new List<Visual?>
// var coordinated = new List<Visual>
// {
// _optionsHost,
// _detailsHost,
@@ -24,10 +24,10 @@
</Style>
<Style Selector="ui|NavigationView.AppNav[IsBackButtonVisible=False] SplitView /template/ ContentPresenter#PART_PanePresenter">
<Setter Property="Margin" Value="0 42 0 0" />
<Setter Property="Margin" Value="0 50 0 0" />
</Style>
<Style Selector="ui|NavigationView.AppNav[IsBackButtonVisible=True] SplitView /template/ ContentPresenter#PART_PanePresenter">
<Setter Property="Margin" Value="0 2 0 0" />
<Setter Property="Margin" Value="0 10 0 0" />
</Style>
<Style Selector="ui|NavigationViewItem.AppNav">
@@ -331,7 +331,7 @@
PaneDisplayMode="Left">
<ui:NavigationView.Resources>
<!-- Override this -->
<Thickness x:Key="NavigationViewContentMargin">0,50,0,0</Thickness>
<Thickness x:Key="NavigationViewContentMargin">0,60,0,0</Thickness>
</ui:NavigationView.Resources>
<ui:NavigationView.Styles>
<Style Selector="Button#NavigationViewBackButton">
@@ -342,7 +342,7 @@
<Setter Property="Content" Value="&#xF0D5;" />
</Style>
<Style Selector="Grid#PaneToggleButtonGrid">
<Setter Property="Margin" Value="5 0 0 0" />
<Setter Property="Margin" Value="5 5 0 0" />
<Setter Property="ToolTip.Tip" Value="{Binding Path=Res.Back, Mode=OneWay, Source={x:Static s:ResourceService.Current}}" />
<Setter Property="ToolTip.Placement" Value="Bottom" />
</Style>
@@ -10,7 +10,7 @@
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="spp:PluginStorePageViewModel"
x:DataType="spp:HomePageViewModel"
mc:Ignorable="d">
<ScrollViewer Padding="20">
<!--<spp:ContentLoader IsLoading="False">-->
@@ -23,7 +23,7 @@
Text="插件商店是什么?"
Theme="{StaticResource TitleTextBlockStyle}" />
<TextBlock Text="3.0 版本的计划是将所有功能插件化,拆分后按需下载安装,每个人都可以只下载自己需要的插件功能使用,并且支持所有人都可以开发插件,等等还有许多暂时不方便说的内容,因为计划的过于异想天开,且遇到的问题有点多,所以开发难度有点点大,这个功能上线还需要一点时间,上线后 3.0 也将正式发布正式版,对一直等待的大家说声抱歉麻烦在多等等了 😭,如果您不习惯启动后是插件商店页面也可以在界面设置中修改启动默认页。" TextWrapping="WrapWithOverflow" />
<TextBlock Text="3.0版本的计划是将所有功能插件化,拆分后按需下载安装,每个人都可以只下载自己需要的插件功能使用,并且支持所有人都可以开发插件,等等还有许多暂时不方便说的内容,因为计划的过于异想天开,且遇到的问题有点多,所以开发难度有点点大,这个功能上线还需要一点时间,对一直等待的大家说声抱歉麻烦在多等等了😭。" TextWrapping="WrapWithOverflow" />
<TextBlock
Margin="-3,0,0,0"
Text="已安装功能"
@@ -55,12 +55,11 @@
<DataTemplate DataType="spp:TabItemViewModel">
<Border spp:Animations.EnableAnimations="True">
<Button
Command="{Binding $parent[spp:PluginStorePage].((spp:PluginStorePageViewModel)DataContext).NavgationToMenuPageCommand}"
Command="{Binding $parent[spp:HomePage].((spp:HomePageViewModel)DataContext).NavgationToMenuPageCommand}"
CommandParameter="{Binding}"
Theme="{StaticResource NavButtonStyle}">
<Grid RowDefinitions="3*,*">
<Border
Name="IconHost"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
CornerRadius="4 4 0 0"
@@ -1,6 +1,3 @@
using FluentAvalonia.UI.Controls.Experimental;
using FluentAvalonia.UI.Navigation;
namespace BD.WTTS.UI.Views.Pages;
public partial class PluginStorePage : UserControl
@@ -8,85 +5,5 @@ public partial class PluginStorePage : UserControl
public PluginStorePage()
{
InitializeComponent();
this.SetViewModel<PluginStorePageViewModel>(useCache: true);
// Use the frame events here to ensure ConnectedAnimations still work with
// Back/Forward navigation and not just explicit page invokes
//AddHandler(Frame.NavigatingFromEvent, OnNavigatingFrom, RoutingStrategies.Direct);
//AddHandler(Frame.NavigatedToEvent, OnNavigatedTo, RoutingStrategies.Direct);
}
//private void PluginStorePage_Click(object? sender, RoutedEventArgs e)
//{
// if (sender != null && sender is Button b && b.DataContext is TabItemViewModel fci)
// {
// _animationPage = fci;
// //NavigationService.Instance.NavigateFromContext(fci);
// }
//}
//private void OnNavigatedTo(object? sender, NavigationEventArgs e)
//{
// if (_animationPage == null)
// return;
// var svc = ConnectedAnimationService.GetForView(TopLevel.GetTopLevel(this));
// var anim = svc.GetAnimation("BackAnimation");
// if (anim == null)
// return;
// var item = this.GetVisualDescendants()
// ?.Where(x => x is Button && x.DataContext == _animationPage)
// ?.FirstOrDefault()
// ?.GetVisualDescendants()
// .Where(x => x is Border && x.Name == "IconHost")
// .FirstOrDefault();
// var presenter = item;// GetAnimationSource();
// // In WinUI, ConnectedAnimation is somehow exempt from all clipping behaviors
// // Here, we are not, so disable ClipToBounds on all elements in the SettingsExpander
// // The rest are taken care of in the xaml.
// // NOTE: The ScrollViewer is not changed here as that's important for scrolling - thus
// // the animation will be cut off, but the back animation is pretty fast and mostly is
// // only visible closer to the element so we're ok, I think
// var x = presenter?.GetVisualParent();
// while (!(x is ScrollContentPresenter) && x != null)
// {
// x.ClipToBounds = false;
// x = x.GetVisualParent();
// }
// anim.Configuration = new DirectConnectedAnimationConfiguration();
// anim.TryStart(presenter);
//}
//private void OnNavigatingFrom(object? sender, NavigatingCancelEventArgs e)
//{
// if (_animationPage == null)
// return;
// // We're not navigating to a control page, don't set up the animation & clear
// // the previous animation source
// if (!e.SourcePageType.Name.Equals(nameof(TabItemViewModel)))
// {
// _animationPage = null;
// _animationPage = null;
// return;
// }
// var item = this.GetVisualDescendants()
// ?.Where(x => x is ListBoxItem && x.DataContext == _animationPage)
// ?.FirstOrDefault()
// ?.GetVisualDescendants()
// .Where(x => x is Viewbox && x.Name == "IconHost")
// .FirstOrDefault();
// var svc = ConnectedAnimationService.GetForView(TopLevel.GetTopLevel(this));
// svc.PrepareToAnimate("ForwardAnimation", item);
//}
//private TabItemViewModel? _animationPage;
}
@@ -425,12 +425,6 @@ public sealed class ScriptManager : GeneralHttpClientFactory, IScriptManager
//item.Content = string.Empty;
}
}
else
{
await TryReadFileAsync(item, true);
//item.Content = string.Empty;
}
}
}
return scripts;
@@ -52,10 +52,8 @@ public sealed partial class GameAcceleratorService
[Reactive]
public DateTime? VipEndTime { get; set; }
const string VipEndTimeStringDef = "新用户免费试用 2 天";
[Reactive]
public string? VipEndTimeString { get; set; } = VipEndTimeStringDef;
public string? VipEndTimeString { get; set; }
GameAcceleratorService()
{
@@ -179,51 +177,54 @@ public sealed partial class GameAcceleratorService
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(async x =>
{
string vipEndTimeString = VipEndTimeStringDef;
try
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
return;
var vipEndTimeResult = await IMicroServiceClient.Instance.Manage.GetXunYouVipEndTime();
if (vipEndTimeResult == null)
{
if (string.IsNullOrWhiteSpace(x?.WattOpenId))
{
return;
}
Log.Error(nameof(GameAcceleratorService),
"XunYouSDK.GetVipEndTime is null.");
return;
}
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.IsSuccess || vipEndTimeResult.Content == null)
if (vipEndTimeResult.Content.Code == XunYouBaseResponseCode.成功)
{
var etime = vipEndTimeResult.Content.Data?.ExpireTime;
if (etime.HasValue)
{
Toast.Show(ToastIcon.Error, "获取会员时间失败");
return;
}
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}";
//}
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);
if (VipEndTime.Value.AddDays(365).Date == DateTimeOffset.Now.Date)
VipEndTimeString = "新用户试用2天";
else
VipEndTimeString = $"游戏加速会员有效期 {VipEndTime.Value:yyyy-MM-dd}";
}
}
finally
else
{
VipEndTimeString = vipEndTimeString;
Log.Error(nameof(GameAcceleratorService),
"XunYouSDK.GetVipEndTime is fail, message: {message}, code: {code}.",
vipEndTimeResult.Content.Message,
vipEndTimeResult.Content.Code);
}
});
@@ -721,7 +721,6 @@
HorizontalAlignment="Right"
VerticalAlignment="Center"
IsVisible="{Binding Source={x:Static s:ProxyService.Current}, Path=ProxyStatus, Mode=OneWay}"
Orientation="Horizontal"
Spacing="8">
<StackPanel.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
@@ -737,26 +736,15 @@
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</StackPanel.Styles>
<Button Theme="{StaticResource TransparentButton}">
<ToolTip.Tip>
<TextBlock>
<Run FontSize="16" Text="Q:为什么加速后流量一直显示 0KB ?" />
<LineBreak />
<Run Text="A:流量统计图表是用于查看实时流量数据信息,您需要先访问对应的网站,这边才会有相应的流量波动数据,请检查是否已经选择了对应的网站加速项目,如果确定有正常勾选加速项目并且访问网站依然无流量,则可能是加速的监听服务没有启用成功,尝试更换加速模式。" />
<LineBreak />
<LineBreak />
<Run FontSize="16" Text="Q:加速后对应网站打不开显示SSL错误或者Steam浏览器显示-100错误?" />
<LineBreak />
<Run Text="A:可以尝试执行以下操作进行修复,关闭加速,点击加速设置-移除证书再安装证书,重开加速。或者加速设置-代理设置-尝试更换doh地址或者关闭doh使用dns等方案。" />
</TextBlock>
</ToolTip.Tip>
<ui:FontIcon FontSize="22" Glyph="&#xE82F;" />
</Button>
<TextBlock Text="{x:Static spp:Strings.CommunityFix_ProxyMode}" />
<TextBlock Text="{Binding Source={x:Static ms:ProxySettings.ProxyMode}, Path=Value, Mode=OneWay, Converter={StaticResource EnumLocalizationNameConverter}}" />
<TextBlock>
<Run Text="{x:Static spp:Strings.CommunityFix_ProxyMode}" />
<Run Text="{Binding Source={x:Static ms:ProxySettings.ProxyMode}, Path=Value, Mode=OneWay, Converter={StaticResource EnumLocalizationNameConverter}}" />
<TextBlock Text="{x:Static spp:Strings.CommunityFix_EnableScriptService}" />
<TextBlock Text="{Binding Source={x:Static s:ProxyService.Current}, Path=IsEnableScript, Converter={StaticResource StringFormatConverter}}" />
<Run Text=" " />
<Run Text="{x:Static spp:Strings.CommunityFix_EnableScriptService}" />
<Run Text="{Binding Source={x:Static s:ProxyService.Current}, Path=IsEnableScript, Converter={StaticResource StringFormatConverter}}" />
</TextBlock>
</StackPanel>
<spp:AdControl
@@ -300,7 +300,6 @@ public sealed partial class SteamLoginImportPageViewModel : ViewModelBase
if (await steamAuthenticator.RemoveAuthenticatorViaChallengeContinueSync(PhoneCodeText, _enrollState.AccessToken!))
{
await SaveAuthenticatorAsync();
RevocationCodeText = steamAuthenticator.RecoveryCode;
return;
}
}
@@ -696,7 +696,7 @@ Windows Registry Editor Version 5.00
var idsFile = Path.Combine(localCachePath, "ids.json");
var accountRemarks = Ioc.Get_Nullable<IPartialGameAccountSettings>()?.AccountRemarks;
var accountRemarks = Ioc.Get<IPartialGameAccountSettings>()?.AccountRemarks;
var accList = File.Exists(idsFile) ? JTokenHelper.ReadDict(idsFile).ToList() : null;
if (accList.Any_Nullable())
@@ -58,7 +58,7 @@ public partial class AccountItems : ReactiveUserControl<PlatformAccount>
3 => idConvert.Id32,
_ => idConvert.Id64,
};
App.Instance.CopyToClipboardCommandCore(id);
App.Instance.CopyToClipboardCommand(id);
}
}
@@ -113,7 +113,7 @@ public sealed partial class IdleCardPageViewModel : ViewModelBase
{
if (SteamLoginState.Success && SteamLoginState.SteamId != (ulong?)SteamConnectService.Current.CurrentSteamUser?.SteamId64)
{
Toast.Show(ToastIcon.Warning, Strings.SteamIdle_LoginSteamUserError);
Toast.Show(ToastIcon.Error, Strings.SteamIdle_LoginSteamUserError);
//RunState = false;
//RunLoaingState = false;
//return;
@@ -228,9 +228,10 @@ public sealed partial class IdleCardPageViewModel : ViewModelBase
LoginViewModel.Close += async _ =>
{
IsLogin = SteamLoginState.Success;
ViewState = 1;
await LoadBadges();
SteamAppsSort();
ViewState = 1;
};
ViewState = 0;
//var vm = new IdleSteamLoginPageViewModel(ref SteamLoginState);
@@ -529,10 +529,7 @@
IsVisible="{Binding !IdleGameList.Count}"
Text="未获取到挂卡游戏数据" />
</StackPanel>
<ItemsRepeater
DockPanel.Dock="Bottom"
ItemsSource="{Binding IdleGameList}"
VerticalCacheLength="50">
<ItemsRepeater DockPanel.Dock="Bottom" ItemsSource="{Binding IdleGameList}">
<ItemsRepeater.Layout>
<UniformGridLayout
ItemsJustification="Start"
-2
View File
@@ -152,6 +152,4 @@ public partial interface IApplication
System.Drawing.Size? GetScreenSize() => null;
bool? IsAnyWindowNotMinimized() => null;
async void OpenBrowserCommandCore(object? url) => await Browser2.OpenAsync(url?.ToString());
}
@@ -160,6 +160,15 @@ public static class ThirdPartyLoginHelper
static IDisposable? serverDisposable;
/// <summary>
/// 释放 WebSocket Server 占用资源
/// </summary>
public static void DisposeServer()
{
serverDisposable?.Dispose();
serverDisposable = null;
}
static void StartServer(IApplication app)
{
if (ws != null) return;
@@ -187,15 +196,6 @@ public static class ThirdPartyLoginHelper
});
}
/// <summary>
/// 释放 WebSocket Server 占用资源
/// </summary>
public static void DisposeServer()
{
serverDisposable?.Dispose();
serverDisposable = null;
}
static Aes? tempAes;
static bool isBind;
static WindowViewModel? vm;
@@ -220,7 +220,7 @@ public static class ThirdPartyLoginHelper
public static async Task StartAsync(WindowViewModel vm, ExternalLoginChannel channel, bool isBind)
{
var app = IApplication.Instance;
if (!OperatingSystem2.IsAndroid() && !OperatingSystem2.IsIOS() && !OperatingSystem2.IsMacOS())
if (!OperatingSystem2.IsAndroid() && !OperatingSystem2.IsIOS())
{
// Android/iOS 使用 URL Scheme 回调
StartServer(app);
@@ -273,10 +273,8 @@ public static class ThirdPartyLoginHelper
qs.Add("dg", DeviceIdHelper.DeviceIdG.ToStringN());
qs.Add("dr", DeviceIdHelper.DeviceIdR);
qs.Add("dn", DeviceIdHelper.DeviceIdN);
if (OperatingSystem2.IsMacOS())
{
if (OperatingSystem.IsMacOS())
qs.Add("isUS", "true");
}
var ub = new UriBuilder(apiBaseUrl)
{
Path = $"/identity/v1/externallogin/{(int)channel}",
@@ -95,11 +95,10 @@ public sealed class AdvertiseService : ReactiveObject
}
}
static async void ClickAdvertisement(AdvertisementDTO? dto)
private static async void ClickAdvertisement(AdvertisementDTO dto)
{
if (dto != null)
{
//IApplication.Instance.OpenBrowserCommandCore(dto.Url);
await Browser2.OpenAsync(dto.Url);
}
}
@@ -224,12 +224,6 @@ public sealed class UserService : ReactiveObject
/// <returns></returns>
public async Task OpenAuthUrl(string url)
{
if (url.StartsWith(Constants.Urls.WattGame, StringComparison.OrdinalIgnoreCase))
{
OpenAuthUrl(url, FastLoginWebChannel.WattGame);
return;
}
var token = await userManager.GetAuthTokenAsync();
if (token == null)
{
@@ -524,7 +524,7 @@ public sealed class SteamConnectService
#region 加载备注信息和 JumpList
var accountRemarks = Ioc.Get_Nullable<IPartialGameAccountSettings>()?.AccountRemarks;
var accountRemarks = Ioc.Get<IPartialGameAccountSettings>()?.AccountRemarks;
#if WINDOWS
List<(string title, string applicationPath, string iconResourcePath, string arguments, string description, string customCategory)>? jumplistData = new();
@@ -318,7 +318,7 @@ partial class Startup // 自定义控制台命令参数
var users = steamService.GetRememberUserList();
var accountRemarks =
Ioc.Get_Nullable<IPartialGameAccountSettings>()?.AccountRemarks;
Ioc.Get<IPartialGameAccountSettings>()?.AccountRemarks;
var sUsers = users.Select(s =>
{
@@ -10,13 +10,6 @@ public sealed class PluginStorePageViewModel : TabItemViewModel
public override string IconKey => "avares://BD.WTTS.Client.Avalonia/UI/Assets/Icons/home.ico";
public ICommand NavgationToMenuPageCommand { get; }
public PluginStorePageViewModel()
{
NavgationToMenuPageCommand = ReactiveCommand.Create<TabItemViewModel>(NavgationToMenuPage);
}
public void NavgationToMenuPage(TabItemViewModel tabItem)
{
INavigationService.Instance.Navigate(tabItem.PageType, NavigationTransitionEffect.FromBottom);