Compare commits

..
Author SHA1 Message Date
Aigio Liu 88b4aac622 🔖 3.0.0-rc.15 2025-02-13 00:42:17 +08:00
yingpanwang 9504413ff7 Merge branch 'develop' of https://github.com/BeyondDimension/SteamTools into develop 2025-02-12 16:59:28 +08:00
yingpanwang 0f28de1e94 🐛 解决登陆时、确认报价时未携带Origin的请求头导致请求失败的问题 2025-02-12 16:58:27 +08:00
john.jiang ad11654cb4 🎨 修复挂卡登录缓存问题,增加本地储存 token 过期检查并生成新 token 2025-02-12 16:26:47 +08:00
ff m f43aa16c6a 🐛 fix Linux 不编译 ASF 2025-01-23 20:36:33 +08:00
Aigio Liu c0e757dc12 🔖 3.0.0-rc.14 2025-01-23 14:31:08 +08:00
RMBGAME fcecb2c14c 💄 文案调整 2025-01-23 14:25:51 +08:00
RMBGAME 408911de4a 🐛 修复 MacOS 中 挂时长游戏功能按钮显示问题 2025-01-23 14:15:40 +08:00
lxy829 23932298fc ⬆️ Common 1.25.10122.11624 2025-01-23 11:54:06 +08:00
lxy829 7c554190af Revert "🎨 Version_BDCommon"
This reverts commit 2f2065e453.
2025-01-23 11:18:19 +08:00
lxy829 2f2065e453 🎨 Version_BDCommon 2025-01-22 18:54:19 +08:00
RMBGAME 1480b5d4df 🐛 新增启用时检查 DNS 可用性 2025-01-21 16:45:43 +08:00
RMBGAME 9ae326ce9f 🐛 临时处理 Avalonia 11.2.3 导致的 FluentAvalonia Icon 宽度不正确问题 2025-01-21 00:42:01 +08:00
Lxy829 3dd83886b8 Merge pull request #3571 from NeKoOuO/patch-1
Translate TW
2025-01-09 10:32:21 +08:00
RMBGAME 3a1a256198 ⬆️ Avalonia 11.2.3 2025-01-06 17:49:03 +08:00
RMBGAME 84f9ae5227 🐛 Name Fix 2024-12-19 17:50:58 +08:00
lxy829 ce85b39328 🎨 Strings.ru 2024-12-16 17:02:21 +08:00
Lxy829 6c23ac30a3 Merge pull request #3527 from kotovasia5120/develop
translate RU,EN
2024-12-16 16:14:20 +08:00
ɴᴇᴋᴏ bbe9596d8d Update Strings.zh-Hant.resx 2024-12-09 09:50:52 +08:00
Aigio Liu 5c42a2336d 🔖 v3.0.1320.0 2024-12-02 19:01:31 +08:00
k1mlka afa4ad9e91 🐛 紧急修复证书有效期检查 Timer 报错 2024-12-02 18:48:40 +08:00
Aigio Liu 50a3c7624e 🎨 SupportedOSPlatformVersion macos 12.0 2024-12-02 14:35:36 +08:00
kotovasia b84fd825b3 Merge pull request #1 from kotovasia5120/kotovasia5120-patch-1
translate RU,EN
2024-10-27 16:48:28 +03:00
kotovasia 1732c84606 translate RU,EN 2024-10-25 02:37:55 +03:00
40 changed files with 10187 additions and 6586 deletions
+9
View File
@@ -997,6 +997,15 @@
"Summary": "加速后自动唤起 Watt 加速器界面",
"IsRegionOrEndregion": null,
"IsValueType": null
},
{
"TypeName": "bool",
"PropertyName": "ProxyBeforeDNSCheck",
"DefaultValue": "true",
"DefaultValueIsConst": true,
"Summary": "加速前进行 DNS 可用性检查",
"IsRegionOrEndregion": null,
"IsValueType": null
}
],
"Usings": ""
+3 -3
View File
@@ -16,14 +16,14 @@ public static partial class AssemblyInfo
/// <summary>
/// 预览版本号,范围 1~9,只增不减
/// </summary>
const string ver_for_preview = "9";
const string ver_for_preview = "0";
/// <summary>
/// RC 版本号,范围 0~9,只增不减
/// </summary>
const string ver_for_rc = "13";
const string ver_for_rc = "15";
public const string FileVersion = $"{Version2}.{ver_for_rc}1{ver_for_preview}.0";
public const string FileVersion = $"{Version2}.{ver_for_rc}2{ver_for_preview}.0";
//public const string InformationalVersion = Version;
//public const string InformationalVersion = $"{Version}-preview.{ver_for_preview}";
@@ -4,7 +4,7 @@ namespace Avalonia.Controls;
public static class AvaloniaControlsInternalsWindowExtensions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CloseCore_(this Window window, WindowCloseReason reason, bool isProgrammatic) => window.CloseCore(reason, isProgrammatic);
public static void CloseCore_(this Window window, WindowCloseReason reason, bool isProgrammatic, bool ignoreCancel) => window.CloseCore(reason, isProgrammatic, ignoreCancel);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void HandleResized_(this Window window, Size clientSize, WindowResizeReason reason) => window.HandleResized(clientSize, reason);
@@ -174,7 +174,7 @@ namespace Avalonia.Controls.ApplicationLifetimes
{
if (w.Owner is null)
{
w.CloseCore_(WindowCloseReason.ApplicationShutdown, isProgrammatic);
w.CloseCore_(WindowCloseReason.ApplicationShutdown, isProgrammatic, false);
}
}
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ms="https://steampp.net/settings"
xmlns:sys="using:System"
xmlns:ui="using:FluentAvalonia.UI.Controls"
x:CompileBindings="True">
<Styles.Resources>
<ResourceDictionary>
@@ -39,6 +40,14 @@
<Setter Property="FontFamily" Value="{Binding Source={x:Static ms:UISettings.FontName}, Path=Value, Mode=OneWay, Converter={StaticResource NameToFontFamilyConverter}}" />
</Style>
<Style Selector="ui|FontIcon">
<Setter Property="MinWidth" Value="16" />
</Style>
<Style Selector="ui|SymbolIcon">
<Setter Property="MinWidth" Value="16" />
</Style>
<!--<Style Selector="TextBlock">
<Setter Property="FontFamily" Value="{Binding Source={x:Static ms:UISettings.FontName}, Path=Value, Mode=OneWay, Converter={StaticResource NameToFontFamilyConverter}}" />
</Style>-->
@@ -48,26 +48,41 @@ sealed partial class YarpReverseProxyServiceImpl : ReverseProxyServiceImpl, IRev
platformService,
CertificateManager);
X509Certificate2? cer = CertificateManager.RootCertificatePackable;
if (cer is not null && DateTime.Now <= cer.NotAfter && cer.NotAfter <= DateTime.Now.AddMonths(1))
try
{
var interval = cer.NotAfter - DateTime.Now;
_certificateTimer = new System.Timers.Timer(interval)
X509Certificate2? cer = CertificateManager.RootCertificatePackable;
if (cer is not null &&
DateTime.Now <= cer.NotAfter && cer.NotAfter <= DateTime.Now.AddMilliseconds(int.MaxValue))
{
AutoReset = false,
};
var interval = cer.NotAfter - DateTime.Now;
_certificateTimer.Elapsed += async (_, _) =>
{
ICertificateManager.Constants.CheckRootCertificate(
platformService,
CertificateManager);
_certificateTimer = new System.Timers.Timer(interval)
{
AutoReset = false,
};
await StopProxyAsync();
await StartProxyImpl();
};
_certificateTimer.Start();
_certificateTimer.Elapsed += async (_, _) =>
{
try
{
ICertificateManager.Constants.CheckRootCertificate(
platformService,
CertificateManager);
await StopProxyAsync();
await StartProxyImpl();
}
catch (Exception e)
{
e.LogAndShowT(TAG, msg: "CheckRootCertificate in Timer.Elapsed Error");
}
};
_certificateTimer.Start();
}
}
catch (Exception e)
{
e.LogAndShowT(TAG, msg: "CheckRootCertificate Error");
}
}
}
@@ -345,7 +345,8 @@ internal partial class NetworkTestService : INetworkTestService
)
{
using UdpClient udpClient = new UdpClient(dnsServerIp, dnsServerPort);
udpClient.Client.SendTimeout = 3000;
udpClient.Client.ReceiveTimeout = 3000;
var query = new DnsQueryUdpRequest(testDomain, dnsRecordType);
Stopwatch watch = Stopwatch.StartNew();
@@ -382,7 +383,7 @@ internal partial class NetworkTestService : INetworkTestService
Proxy = HttpNoProxy.Instance,
};
using HttpClient client = new HttpClient(handler);
client.Timeout = TimeSpan.FromSeconds(3);
string queryUrl = $"{dohServer}?name={testDomain}&type={dnsRecordType}";
Stopwatch watch = Stopwatch.StartNew();
@@ -307,6 +307,7 @@ public sealed partial class GameAcceleratorService
Games.AddOrUpdate(CurrentAcceleratorGame);
//加速后
TracepointHelper.TrackEvent("AcceleratorGameSuccess");
Toast.Show(ToastIcon.Success, "加速成功");
if (ProxySettings.AutoShowWattAcceleratorWindow.Value)
{
@@ -628,44 +629,45 @@ public sealed partial class GameAcceleratorService
};
var install = Ioc.Get<IAcceleratorService>().XY_Install(GameAcceleratorSettings.WattAcceleratorDirPath.Value!);
td.Opened += async (s, e) =>
td.Opened += (s, e) =>
{
await foreach (var item in install)
{
if (item.HandleUI(out var content))
{
switch (content)
{
case < 100:
Dispatcher.UIThread.Post(() => { td.Content = $"正在下载 {item.Content}%"; });
td.SetProgressBarState(item.Content, TaskDialogProgressState.Normal);
break;
case 100:
td.SetProgressBarState(item.Content, TaskDialogProgressState.Indeterminate);
Dispatcher.UIThread.Post(() => { td.Content = $"下载完成,正在安装..."; });
break;
case (int)XunYouDownLoadCode.安装成功:
//处理成功
//Dispatcher.UIThread.Post(() => { td.Content = $"安装完成"; });
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
td.Hide();
break;
case int n when n > 101 && n < (int)XunYouDownLoadCode.启动安装程序失败:
//处理失败
break;
// Code 和进度重叠 递进 1000 XunYouInstallOrStartCode.默认 XunYouInstallOrStartCode.已安装
case 1000:
Dispatcher.UIThread.Post(() => { td.Content = $"默认"; });
// XunYouInstallOrStartCode.默认
break;
case 1001:
Dispatcher.UIThread.Post(() => { td.Content = $"已安装"; });
// XunYouInstallOrStartCode.已安装
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
break;
}
}
}
DownloadCallbackAsync(td, install).Wait();
//await foreach (var item in install)
//{
// if (item.HandleUI(out var content))
// {
// switch (content)
// {
// case < 100:
// Dispatcher.UIThread.Post(() => { td.Content = $"正在下载 {item.Content}%"; });
// td.SetProgressBarState(item.Content, TaskDialogProgressState.Normal);
// break;
// case 100:
// td.SetProgressBarState(item.Content, TaskDialogProgressState.Indeterminate);
// Dispatcher.UIThread.Post(() => { td.Content = $"下载完成,正在安装..."; });
// break;
// case (int)XunYouDownLoadCode.安装成功:
// //处理成功
// //Dispatcher.UIThread.Post(() => { td.Content = $"安装完成"; });
// Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
// td.Hide();
// break;
// case int n when n > 101 && n < (int)XunYouDownLoadCode.启动安装程序失败:
// //处理失败
// break;
// // Code 和进度重叠 递进 1000 XunYouInstallOrStartCode.默认 XunYouInstallOrStartCode.已安装
// case 1000:
// Dispatcher.UIThread.Post(() => { td.Content = $"默认"; });
// // XunYouInstallOrStartCode.默认
// break;
// case 1001:
// Dispatcher.UIThread.Post(() => { td.Content = $"已安装"; });
// // XunYouInstallOrStartCode.已安装
// Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
// break;
// }
// }
//}
};
//_ = Task.Run(() => { XunYouSDK.InstallAsync(progress, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "WattAccelerator")); });
@@ -674,6 +676,47 @@ public sealed partial class GameAcceleratorService
}
}
private static async Task DownloadCallbackAsync(TaskDialog td, IAsyncEnumerable<ApiRsp<int>> install)
{
await foreach (var item in install)
{
if (item.HandleUI(out var content))
{
switch (content)
{
case < 100:
Dispatcher.UIThread.Post(() => { td.Content = $"正在下载 {item.Content}%"; });
td.SetProgressBarState(item.Content, TaskDialogProgressState.Normal);
break;
case 100:
td.SetProgressBarState(item.Content, TaskDialogProgressState.Indeterminate);
Dispatcher.UIThread.Post(() => { td.Content = $"下载完成,正在安装..."; });
break;
case (int)XunYouDownLoadCode.安装成功:
//处理成功
//Dispatcher.UIThread.Post(() => { td.Content = $"安装完成"; });
TracepointHelper.TrackEvent("DownloadInstallSuccess");
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
td.Hide();
break;
case int n when n > 101 && n < (int)XunYouDownLoadCode.启动安装程序失败:
//处理失败
break;
// Code 和进度重叠 递进 1000 XunYouInstallOrStartCode.默认 XunYouInstallOrStartCode.已安装
case 1000:
Dispatcher.UIThread.Post(() => { td.Content = $"默认"; });
// XunYouInstallOrStartCode.默认
break;
case 1001:
Dispatcher.UIThread.Post(() => { td.Content = $"已安装"; });
// XunYouInstallOrStartCode.已安装
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
break;
}
}
}
}
public static async void UninstallAccelerator()
{
var xunYouIsInstall = await Ioc.Get<IAcceleratorService>().XY_IsInstall();
@@ -1,5 +1,6 @@
// ReSharper disable once CheckNamespace
using BD.WTTS.Helpers;
using BD.WTTS.Services.Implementation;
namespace BD.WTTS.Services;
@@ -73,6 +74,18 @@ partial class ProxyService
bool useDoh = ProxySettings.UseDoh.Value;
string? customDohAddres = ProxySettings.CustomDohAddres2.Value;
if (ProxySettings.ProxyBeforeDNSCheck.Value)
{
if (useDoh)
{
customDohAddres = await GetFastestDNSAsync(ProxySettingsWindowViewModel.DohAddress);
}
else
{
proxyDNS = await GetFastestDNSAsync(ProxySettingsWindowViewModel.ProxyDNSs.Skip(1));
}
}
Lazy<IPAddress> proxyIp_ = new(() => ReverseProxySettings.GetProxyIp(proxyIp));
void SetProxyIp(IPAddress proxyIPAddress)
{
@@ -463,4 +476,69 @@ partial class ProxyService
return proxyStatus;
}
}
async Task<(long delayMs, string dns)> GetValidDNSAsync(string dns, CancellationToken cancellationToken = default)
{
var testDomain = "dnscheck-test.steampp.net";
try
{
long delayMs;
IPAddress[] address;
if (ProxySettings.UseDoh.Value)
{
(delayMs, address) = await INetworkTestService.Instance.TestDNSOverHttpsAsync(testDomain, dns, cancellationToken: cancellationToken);
}
else
{
(delayMs, address) = await INetworkTestService.Instance.TestDNSAsync(testDomain, dns, 53, cancellationToken: cancellationToken);
}
if (address.Length == 0)
throw new Exception("Parsing failed. Return empty ip address.");
return (delayMs, dns);
}
catch (Exception ex)
{
Log.Error(nameof(StartOrStopProxyService), ex.ToString(), "DNS检测出错");
return (0, dns);
}
}
async Task<string?> GetFastestDNSAsync(IEnumerable<string> dnsAddresses, CancellationToken cancellationToken = default)
{
var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
var tasks = new List<Task<(long delayMs, string dns)>>();
foreach (var dns in dnsAddresses)
{
tasks.Add(GetValidDNSAsync(dns, cts.Token));
}
try
{
// 等待任意一个任务完成
var completedTask = await Task.WhenAny(tasks);
// 获取任务结果
var (delayMs, dns) = await completedTask;
_ = cts.CancelAsync(); // 取消其他任务
// 如果任务成功完成(假设 delayMs > 0 表示成功)
if (delayMs > 0)
{
return dns; // 返回第一个成功的 DNS 地址
}
}
catch (OperationCanceledException)
{
// 任务被取消,忽略
}
catch (Exception ex)
{
Log.Error(nameof(StartOrStopProxyService), ex.ToString(), "DNS检测出错");
}
// 如果没有有效结果,返回默认值
return null;
}
}
@@ -165,6 +165,11 @@ public partial interface IProxySettings
/// </summary>
bool AutoShowWattAcceleratorWindow { get; set; }
/// <summary>
/// 加速前进行 DNS 可用性检查
/// </summary>
bool ProxyBeforeDNSCheck { get; set; }
/// <summary>
/// 启用脚本自动检查更新的默认值
/// </summary>
@@ -290,4 +295,9 @@ public partial interface IProxySettings
/// </summary>
const bool DefaultAutoShowWattAcceleratorWindow = true;
/// <summary>
/// 加速前进行 DNS 可用性检查的默认值
/// </summary>
const bool DefaultProxyBeforeDNSCheck = true;
}
@@ -209,6 +209,12 @@ public sealed partial class ProxySettings_ : IProxySettings, ISettings, ISetting
[MPKey(24), MP2Key(24), JsonPropertyOrder(24)]
public bool AutoShowWattAcceleratorWindow { get; set; } = IProxySettings.DefaultAutoShowWattAcceleratorWindow;
/// <summary>
/// 加速前进行 DNS 可用性检查
/// </summary>
[MPKey(25), MP2Key(25), JsonPropertyOrder(25)]
public bool ProxyBeforeDNSCheck { get; set; } = IProxySettings.DefaultProxyBeforeDNSCheck;
}
public static partial class ProxySettings
@@ -383,4 +389,10 @@ public static partial class ProxySettings
public static SettingsStructProperty<bool, ProxySettings_> AutoShowWattAcceleratorWindow { get; }
= new(DefaultAutoShowWattAcceleratorWindow);
/// <summary>
/// 加速前进行 DNS 可用性检查
/// </summary>
public static SettingsStructProperty<bool, ProxySettings_> ProxyBeforeDNSCheck { get; }
= new(DefaultProxyBeforeDNSCheck);
}
@@ -4,7 +4,7 @@ namespace BD.WTTS.UI.ViewModels;
public sealed partial class AcceleratorPageViewModel : TabItemViewModel
{
public override string Name => Strings.Welcome;
public override string Name => Strings.CommunityFix;
[Reactive]
public ReadOnlyCollection<ProxyDomainGroupViewModel>? EnableProxyDomainGroupVMs { get; set; }
@@ -2,7 +2,7 @@ namespace BD.WTTS.UI.ViewModels;
public sealed partial class GameAcceleratorPageViewModel : TabItemViewModel
{
public override string Name => Strings.Welcome;
public override string Name => Strings.GameAccelerator;
private readonly ReadOnlyObservableCollection<XunYouGameViewModel>? _Games;
@@ -4,7 +4,7 @@ namespace BD.WTTS.UI.ViewModels;
public partial class ScriptPageViewModel : TabItemViewModel
{
public override string Name => Strings.Welcome;
public override string Name => Strings.ScriptConfig;
protected readonly ReadOnlyObservableCollection<ScriptDTO>? _ProxyScripts;
@@ -88,6 +88,12 @@
</ui:SettingsExpanderItem.Footer>
</ui:SettingsExpanderItem>
<ui:SettingsExpanderItem>
<TextBlock Text="启动加速时检查 DNS 可用性" />
<ui:SettingsExpanderItem.Footer>
<ToggleSwitch Classes="LeftContent" IsChecked="{Binding Source={x:Static ms:ProxySettings.ProxyBeforeDNSCheck}, Path=Value, Mode=TwoWay}" />
</ui:SettingsExpanderItem.Footer>
</ui:SettingsExpanderItem>
<!--<DockPanel>
<Label Content="自定义根证书密码"></Label>
<TextBox></TextBox>
@@ -2,7 +2,7 @@ using BD.WTTS.UI.Views.Controls;
namespace BD.WTTS.UI.ViewModels;
public sealed partial class ArchiSteamFarmPlusPageViewModel : ViewModelBase
public sealed partial class ArchiSteamFarmPlusPageViewModel
{
private readonly IArchiSteamFarmService asfService = IArchiSteamFarmService.Instance;
@@ -2,8 +2,10 @@ using ArchiSteamFarm.Steam;
namespace BD.WTTS.UI.ViewModels;
public sealed partial class ArchiSteamFarmPlusPageViewModel
public sealed partial class ArchiSteamFarmPlusPageViewModel : TabItemViewModel
{
public override string Name => "ASF";
/// <summary>
/// 选择 ASF 可执行文件路径
/// </summary>
@@ -12,7 +12,7 @@ using BD.WTTS.UI.Views.Controls;
namespace BD.WTTS.UI.ViewModels;
public sealed partial class AuthenticatorHomePageViewModel : ViewModelBase
public sealed partial class AuthenticatorHomePageViewModel
{
const int MAX_SYNC_VALUE = 100;
@@ -2,8 +2,10 @@ using KeyValuePair = BD.Common.Entities.KeyValuePair;
namespace BD.WTTS.UI.ViewModels;
public partial class AuthenticatorHomePageViewModel
public partial class AuthenticatorHomePageViewModel : TabItemViewModel
{
public override string Name => Strings.LocalAuth;
[Reactive]
public bool IsLoading { get; set; }
@@ -7,7 +7,7 @@ public sealed partial class GameAccountPageViewModel : TabItemViewModel
{
static readonly Uri PlatformsPath = new("avares://BD.WTTS.Client.Plugins.GameAccount/UI/Assets/Platforms.json");
public override string Name => Strings.Welcome;
public override string Name => Strings.UserFastChange;
[Reactive]
public ObservableCollection<PlatformAccount>? GamePlatforms { get; set; }
@@ -3,8 +3,6 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="using:Avalonia.Xaml.Interactivity"
xmlns:ia="using:Avalonia.Xaml.Interactions.Core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ms="https://steampp.net/settings"
xmlns:s="https://steampp.net/services"
@@ -190,7 +188,15 @@
</spp:AppItem.ActionButton>-->
<spp:AppItem.Image>
<Panel x:Name="ItemImage">
<i:Interaction.Behaviors>
<Panel.Styles>
<Style Selector="Panel#ItemBox">
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="Panel#ItemBox:pointerover">
<Setter Property="Opacity" Value="0.8" />
</Style>
</Panel.Styles>
<!--<i:Interaction.Behaviors>
<ia:EventTriggerBehavior EventName="PointerEntered" SourceObject="{Binding #ItemImage}">
<ia:ChangePropertyAction
PropertyName="IsVisible"
@@ -203,7 +209,7 @@
TargetObject="{Binding #ItemBox}"
Value="False" />
</ia:EventTriggerBehavior>
</i:Interaction.Behaviors>
</i:Interaction.Behaviors>-->
<Panel MinWidth="{Binding $parent[spp:AppItem].MinWidth}" MaxWidth="{Binding $parent[spp:AppItem].MaxWidth}">
<spp:Image2
Name="AppImage"
@@ -247,11 +253,7 @@
</DockPanel>
</Border>
</Panel>
<Panel
x:Name="ItemBox"
Background="{DynamicResource SolidBackgroundFillColorBaseBrush}"
IsVisible="False"
Opacity="0.8">
<Panel x:Name="ItemBox" Background="{DynamicResource SolidBackgroundFillColorBaseBrush}">
<Button
Padding="0"
HorizontalAlignment="Center"
@@ -8,7 +8,7 @@ using BD.WTTS.Helpers;
namespace BD.WTTS.UI.ViewModels;
public sealed partial class IdleCardPageViewModel : ViewModelBase
public sealed partial class IdleCardPageViewModel
{
readonly ISteamService SteamTool = ISteamService.Instance;
readonly ISteamIdleCardService IdleCard = ISteamIdleCardService.Instance;
@@ -4,8 +4,10 @@ using BD.SteamClient.Services;
namespace BD.WTTS.UI.ViewModels;
public sealed partial class IdleCardPageViewModel
public sealed partial class IdleCardPageViewModel : TabItemViewModel
{
public override string Name => Strings.SteamIdleCard;
/// <summary>
/// 有限运行此游戏
/// </summary>
@@ -26,7 +26,7 @@ public sealed partial class IdleSteamLoginPageViewModel : WindowViewModel
{
IsLoading = true;
if (SteamLoginState.SteamId == 0)
if (!Requires2FA && !RequiresEmailAuth)
{
SteamLoginState.Username = UserNameText;
SteamLoginState.Password = PasswordText;
@@ -65,9 +65,10 @@ public sealed partial class IdleSteamLoginPageViewModel : WindowViewModel
}
else if (SteamLoginState.Message != null)
{
IsLoading = false;
Toast.Show(ToastIcon.Warning, SteamLoginState.Message);
}
IsLoading = false;
}
}
catch (Exception ex)
@@ -5,6 +5,7 @@ using System.Security.Policy;
using static BD.WTTS.Client.Tools.Publish.Helpers.DotNetCLIHelper;
using static BD.WTTS.GlobalDllImportResolver;
using JsonSerializer = System.Text.Json.JsonSerializer;
using System.Runtime.InteropServices;
namespace BD.WTTS.Client.Tools.Publish.Commands;
@@ -843,6 +844,7 @@ $"""
arg.ReadyToRun = false;
arg.Trimmed = false;
arg.SelfContained = false;
arg.Architecture = architecture;
// https://learn.microsoft.com/zh-cn/dotnet/core/tools/dotnet-run
// https://download.visualstudio.microsoft.com/download/pr/c1e2729e-ab96-4929-911d-bf0f24f06f47/1b2f39cbc4eb530e39cfe6f54ce78e45/aspnetcore-runtime-7.0.7-linux-x64.tar.gz
// dotnet "Steam++.dll" -clt devtools
@@ -889,7 +891,9 @@ $"""
bool? EnableMsixTooling = null,
bool? GenerateAppxPackageOnBuild = null,
bool? StripSymbols = null,
bool? CreatePackage = null)
bool? CreatePackage = null,
Architecture? Architecture = null
)
{
string? _Configuration;
@@ -1150,11 +1154,13 @@ publish -c {0} -p:OutputType={1} -p:PublishDir=bin\{0}\Publish\win-any -p:Publis
yield return AssemblyInfo.Accelerator;
yield return AssemblyInfo.GameAccount;
yield return AssemblyInfo.GameList;
yield return AssemblyInfo.ArchiSteamFarmPlus;
yield return AssemblyInfo.Authenticator;
if (platform == Platform.Windows)
yield return AssemblyInfo.GameTools;
yield return AssemblyInfo.SteamIdleCard;
if (platform == Platform.Windows)
{
yield return AssemblyInfo.ArchiSteamFarmPlus;
yield return AssemblyInfo.GameTools;
}
}
/// <summary>
@@ -25,7 +25,7 @@ interface Constants
static readonly string[] all_rids = new[] {
"win-x64", "win-x86", "win-arm64",
"osx-x64", "osx-arm64",
"linux-x64", "linux-arm64",
"linux-x64", "linux-arm64", "linux-loongarch64",
};
static readonly string[] ignoreDirNames = new[]
@@ -122,6 +122,7 @@ interface Constants
Architecture.Arm64 => "arm64",
Architecture.X64 => "x64",
Architecture.X86 => "x86",
Architecture.LoongArch64 => "loongarch64",
_ => throw new ArgumentOutOfRangeException(nameof(architecture), architecture, null),
};
@@ -160,6 +161,12 @@ interface Constants
case "arm64":
info.Architecture = Architecture.Arm64;
break;
case "loongarch64":
info.Architecture = Architecture.LoongArch64;
break;
case "riscv64":
info.Architecture = Architecture.RiscV64;
break;
}
}
return info;
@@ -43,6 +43,8 @@ public static partial class GlobalDllImportResolver
Architecture.Arm64 => "linux-arm64", // 在 64 位 ARM 上运行的 Linux 发行版本,如 Raspberry Pi Model 3 及更高版本上的 Ubuntu 服务器 64 位
Architecture.Arm => "linux-arm", // 在 ARM 上运行的 Linux 发行版本,如 Raspberry Pi Model 2 及更高版本上的 Raspbian
Architecture.Armv6 => "linux-armv6",
Architecture.LoongArch64 => "linux-loongarch64", // 在龙芯 LoongArch64 上运行的 Linux 发行版本
Architecture.RiscV64 => "linux-riscv64", // 在 RISC-V 64 位上运行的 Linux 发行版本
_ => throw new PlatformNotSupportedException(),
};
#else
+1 -1
View File
@@ -124,7 +124,7 @@ namespace BD.WTTS.Client.Resources {
}
/// <summary>
/// 查找类似 调整当前设备上共享的 Steam 账号优先级顺序,用于解决想玩账号 B 的共享却一直使用的是账号 A 的共享这种问题,拖拽操作从上到下的排序为共享库使用的优先级顺序,也可以选择暂时禁用或启用指定账号的共享。调整后保存重启 Steam 生效! 的本地化字符串。
/// 查找类似 (因 Steam 已抛弃旧版本家庭共享 该功能已经失效!) 调整当前设备上共享的 Steam 账号优先级顺序,用于解决想玩账号 B 的共享却一直使用的是账号 A 的共享这种问题,拖拽操作从上到下的排序为共享库使用的优先级顺序,也可以选择暂时禁用或启用指定账号的共享。调整后保存重启 Steam 生效! 的本地化字符串。
/// </summary>
public static string AccountChange_ShareManageAboutTips {
get {
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2236,7 +2236,7 @@
<value>修改的数据生效需要重启 Steam 是否需要重启 Steam。</value>
</data>
<data name="AccountChange_ShareManageAboutTips" xml:space="preserve">
<value>调整当前设备上共享的 Steam 账号优先级顺序,用于解决想玩账号 B 的共享却一直使用的是账号 A 的共享这种问题,拖拽操作从上到下的排序为共享库使用的优先级顺序,也可以选择暂时禁用或启用指定账号的共享。调整后保存重启 Steam 生效!</value>
<value>(因 Steam 已抛弃旧版本家庭共享 该功能已经失效!) 调整当前设备上共享的 Steam 账号优先级顺序,用于解决想玩账号 B 的共享却一直使用的是账号 A 的共享这种问题,拖拽操作从上到下的排序为共享库使用的优先级顺序,也可以选择暂时禁用或启用指定账号的共享。调整后保存重启 Steam 生效!</value>
</data>
<data name="CommunityFix_SubProcessFileNotExist" xml:space="preserve">
<value>网络加速子进程文件不存在</value>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -6,7 +6,7 @@ namespace BD.WTTS.UI.ViewModels;
public sealed class PluginStorePageViewModel : TabItemViewModel
{
public override string Name => Strings.Welcome;
public override string Name => Strings.Plugin_Store;
public override string IconKey => "avares://BD.WTTS.Client.Avalonia/UI/Assets/Icons/home.ico";
+1
View File
@@ -5,6 +5,7 @@
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net$(DotNet_Version)</TargetFrameworks>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">12.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
+1
View File
@@ -7,6 +7,7 @@
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks)</TargetFrameworks>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">12.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
+1
View File
@@ -5,6 +5,7 @@
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net$(DotNet_Version)</TargetFrameworks>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">12.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
+1
View File
@@ -4,6 +4,7 @@
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net$(DotNet_Version)-windows10.0.19041</TargetFrameworks>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">12.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>