Compare commits

..

8 Commits

Author SHA1 Message Date
wangyingpan 6a726e151b 🎨 调整代码结构 2024-06-06 14:38:09 +08:00
wangyingpan 979cd83662 解决冲突 2024-06-05 09:50:36 +08:00
wangyingpan 48234a8a7e 🎨 调整提示文本 2024-06-04 17:43:17 +08:00
wangyingpan 513f32c309 🎨 改善共存令牌处理逻辑,优化文本 2024-06-04 17:43:14 +08:00
wangyingpan bbe6e4f68f ✨ 导入steam令牌 新增添加 联合steam 令牌方式 2024-06-04 17:42:36 +08:00
wangyingpan 58e5147e14 🎨 调整提示文本 2024-06-04 17:10:33 +08:00
wangyingpan 11ea59fb3b 🎨 改善共存令牌处理逻辑,优化文本 2024-06-04 16:55:57 +08:00
wangyingpan 8b6010b36a ✨ 导入steam令牌 新增添加 联合steam 令牌方式 2024-05-30 15:21:26 +08:00
13 changed files with 9 additions and 155 deletions
-18
View File
@@ -496,15 +496,6 @@
"Summary": "账号平台设置集合",
"IsRegionOrEndregion": null,
"IsValueType": null
},
{
"TypeName": "bool",
"PropertyName": "IsShowAccountName",
"DefaultValue": "false",
"DefaultValueIsConst": false,
"Summary": "是否显示账号用户名",
"IsRegionOrEndregion": null,
"IsValueType": null
}
],
"Usings": ""
@@ -979,15 +970,6 @@
"Summary": "自定义 DNS over HTTPS 地址",
"IsRegionOrEndregion": null,
"IsValueType": null
},
{
"TypeName": "int",
"PropertyName": "AcceleratorTabsSelectedIndex",
"DefaultValue": "0",
"DefaultValueIsConst": false,
"Summary": "加速页面 Tab 选项卡选中下标",
"IsRegionOrEndregion": null,
"IsValueType": null
}
],
"Usings": ""
@@ -155,21 +155,7 @@ public static class CertGenerator
}
else
{
try
{
builder.AddDnsName(name);
}
catch
{
/* name = Environment.MachineName
* System.ArgumentException: Decoded string is not a valid IDN name. (Parameter 'unicode')
* at System.Globalization.IdnMapping.IcuGetAsciiCore(String unicodeString, Char* unicode, Int32 count)
* at System.Globalization.IdnMapping.GetAscii(String unicode, Int32 index, Int32 count)
* at System.Security.Cryptography.X509Certificates.SubjectAlternativeNameBuilder.AddDnsName(String dnsName)
* at BD.WTTS.Services.Implementation.CertGenerator.Add(SubjectAlternativeNameBuilder builder, String name)
* at BD.WTTS.Services.Implementation.CertGenerator.CreateEndCertificate(X509Certificate2 issuerCertificate, X500DistinguishedName subjectName, IEnumerable`1 extraDnsNames, Nullable`1 notBefore, Nullable`1 notAfter, Int32 rsaKeySizeInBits)
*/
}
builder.AddDnsName(name);
}
}
@@ -155,11 +155,6 @@ public partial interface IProxySettings
/// </summary>
string? CustomDohAddres { get; set; }
/// <summary>
/// 加速页面 Tab 选项卡选中下标
/// </summary>
int AcceleratorTabsSelectedIndex { get; set; }
/// <summary>
/// 启用脚本自动检查更新的默认值
/// </summary>
@@ -275,9 +270,4 @@ public partial interface IProxySettings
/// </summary>
const string? DefaultCustomDohAddres = null;
/// <summary>
/// 加速页面 Tab 选项卡选中下标的默认值
/// </summary>
static readonly int DefaultAcceleratorTabsSelectedIndex = 0;
}
@@ -201,7 +201,7 @@ public sealed partial class ProxySettings_ : IProxySettings, ISettings, ISetting
/// 加速页面 Tab 选项卡选中下标
/// </summary>
[MPKey(23), MP2Key(23), JsonPropertyOrder(23)]
public int AcceleratorTabsSelectedIndex { get; set; } = IProxySettings.DefaultAcceleratorTabsSelectedIndex;
public int AcceleratorTabsSelectedIndex { get; set; }
}
@@ -369,6 +369,5 @@ public static partial class ProxySettings
/// 加速页面 Tab 选项卡选中下标
/// </summary>
public static SettingsStructProperty<int, ProxySettings_> AcceleratorTabsSelectedIndex { get; }
= new(DefaultAcceleratorTabsSelectedIndex);
= new();
}
@@ -28,6 +28,7 @@ public sealed partial class ArchiSteamFarmPlusPageViewModel : ViewModelBase
var model = new ArchiSteamFarmExePathSettingsPageViewModel();
await IWindowManager.Instance.ShowTaskDialogAsync(model,
title: BDStrings.ASF_Settings,
subHeader: BDStrings.ASF_SetExePathFirst,
pageContent: new ArchiSteamFarmExePathSettingsPage(),
isCancelButton: true,
cancelCloseAction: () =>
@@ -130,77 +130,6 @@
IsClickEnabled="True"
ToolTip.Tip="{Binding Path=., Mode=OneWay, Source={x:Static spp:Strings.Settings_General_BrowseCustomFolder}, Converter={StaticResource StringFormatConverter}, ConverterParameter=www}" />
</ui:SettingsExpander>
<!--<spp:OptionsDisplayItem Header="ASF 文件路径">
<spp:OptionsDisplayItem.Description>
<TextBlock
MaxWidth="120"
MaxLines="1"
Text="{Binding Source={x:Static ms:ASFSettings.ArchiSteamFarmExePath}, Path=Value, Mode=OneWay}"
TextTrimming="CharacterEllipsis" />
</spp:OptionsDisplayItem.Description>
<spp:OptionsDisplayItem.Icon>
<ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE756;" />
</spp:OptionsDisplayItem.Icon>
<spp:OptionsDisplayItem.ActionButton>
<Button Command="{Binding SelectASFExePath}" Content="选择路径" />
</spp:OptionsDisplayItem.ActionButton>
</spp:OptionsDisplayItem>-->
<spp:OptionsDisplayItem Header="自动启动 ASF">
<spp:OptionsDisplayItem.Icon>
<ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE770;" />
</spp:OptionsDisplayItem.Icon>
<spp:OptionsDisplayItem.ActionButton>
<ToggleSwitch Classes="LeftContent" IsChecked="{Binding Source={x:Static ms:ASFSettings.AutoRunArchiSteamFarm}, Path=Value, Mode=TwoWay}" />
</spp:OptionsDisplayItem.ActionButton>
</spp:OptionsDisplayItem>
<spp:OptionsDisplayItem Header="检查文件安全性">
<spp:OptionsDisplayItem.Icon>
<ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE83D;" />
</spp:OptionsDisplayItem.Icon>
<spp:OptionsDisplayItem.ActionButton>
<ToggleSwitch Classes="LeftContent" IsChecked="{Binding Source={x:Static ms:ASFSettings.CheckArchiSteamFarmExe}, Path=Value, Mode=TwoWay}" />
</spp:OptionsDisplayItem.ActionButton>
</spp:OptionsDisplayItem>
<spp:OptionsDisplayItem Header="ASF 监听端口">
<spp:OptionsDisplayItem.Icon>
<ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE704;" />
</spp:OptionsDisplayItem.Icon>
<spp:OptionsDisplayItem.ActionButton>
<ui:NumberBox Minimum="5000" Value="{Binding Source={x:Static ms:ASFSettings.IPCPortId}, Path=Value, Mode=TwoWay}" />
</spp:OptionsDisplayItem.ActionButton>
</spp:OptionsDisplayItem>
<spp:OptionsDisplayItem Header="端口被占时随机端口号">
<spp:OptionsDisplayItem.Icon>
<ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE770;" />
</spp:OptionsDisplayItem.Icon>
<spp:OptionsDisplayItem.ActionButton>
<ToggleSwitch Classes="LeftContent" IsChecked="{Binding Source={x:Static ms:ASFSettings.IPCPortOccupiedRandom}, Path=Value, Mode=TwoWay}" />
</spp:OptionsDisplayItem.ActionButton>
</spp:OptionsDisplayItem>
<spp:OptionsDisplayItem Header="控制台最大行数">
<spp:OptionsDisplayItem.Icon>
<ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xF2B7;" />
</spp:OptionsDisplayItem.Icon>
<spp:OptionsDisplayItem.ActionButton>
<ui:NumberBox Minimum="1" Value="{Binding Source={x:Static ms:ASFSettings.ConsoleMaxLine}, Path=Value, Mode=TwoWay}" />
</spp:OptionsDisplayItem.ActionButton>
</spp:OptionsDisplayItem>
<spp:OptionsDisplayItem Header="控制台字体大小">
<spp:OptionsDisplayItem.Icon>
<ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xE8E9;" />
</spp:OptionsDisplayItem.Icon>
<spp:OptionsDisplayItem.ActionButton>
<ui:NumberBox Minimum="1" Value="{Binding Source={x:Static ms:ASFSettings.ConsoleFontSize}, Path=Value, Mode=TwoWay}" />
</spp:OptionsDisplayItem.ActionButton>
</spp:OptionsDisplayItem>
</StackPanel>
</spp:ContentLoader>
</spp:PageBase>
@@ -40,11 +40,6 @@ public partial interface IGameAccountSettings
/// </summary>
ConcurrentDictionary<string, PlatformSettings>? PlatformSettings { get; set; }
/// <summary>
/// 是否显示账号用户名
/// </summary>
bool IsShowAccountName { get; set; }
/// <summary>
/// 账号备注字典的默认值
/// </summary>
@@ -65,9 +60,4 @@ public partial interface IGameAccountSettings
/// </summary>
static readonly ConcurrentDictionary<string, PlatformSettings> DefaultPlatformSettings = new();
/// <summary>
/// 是否显示账号用户名的默认值
/// </summary>
static readonly bool DefaultIsShowAccountName = false;
}
@@ -67,12 +67,6 @@ public sealed partial class GameAccountSettings_ : IGameAccountSettings, ISettin
[MPKey(3), MP2Key(3), JsonPropertyOrder(3)]
public ConcurrentDictionary<string, PlatformSettings>? PlatformSettings { get; set; } = IGameAccountSettings.DefaultPlatformSettings;
/// <summary>
/// 是否显示账号用户名
/// </summary>
[MPKey(4), MP2Key(4), JsonPropertyOrder(4)]
public bool IsShowAccountName { get; set; } = IGameAccountSettings.DefaultIsShowAccountName;
}
public static partial class GameAccountSettings
@@ -101,10 +95,4 @@ public static partial class GameAccountSettings
public static SettingsProperty<string, PlatformSettings, ConcurrentDictionary<string, PlatformSettings>, GameAccountSettings_> PlatformSettings { get; }
= new(DefaultPlatformSettings);
/// <summary>
/// 是否显示账号用户名
/// </summary>
public static SettingsStructProperty<bool, GameAccountSettings_> IsShowAccountName { get; }
= new(DefaultIsShowAccountName);
}
@@ -6,7 +6,6 @@
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"
xmlns:spp="https://steampp.net/ui"
xmlns:ui="using:FluentAvalonia.UI.Controls"
@@ -220,13 +219,8 @@
ContextFlyout="{StaticResource SharedMenuFlyout}"
Description="{Binding LastLoginTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"
MoreFlyout="{StaticResource SharedMenuFlyout}"
Status="{Binding Path=Res.UserChange_RecentLogin, Mode=OneWay, Source={x:Static s:ResourceService.Current}}">
<spp:AppItem.Tags>
<WrapPanel>
<TextBlock IsVisible="{Binding Source={x:Static ms:GameAccountSettings.IsShowAccountName}, Path=Value, Mode=OneWay}" Text="{Binding AccountName}" />
<TextBlock IsVisible="{Binding AliasName, Converter={StaticResource IsNullConverter}, ConverterParameter=invert}" Text="{Binding AliasName, StringFormat={}({0})}" />
</WrapPanel>
</spp:AppItem.Tags>
Status="{Binding Path=Res.UserChange_RecentLogin, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"
Tags="{Binding AliasName}">
<ToolTip.Tip>
<TextBlock>
<Run Text="双击可快速切换到此账号登录" />
@@ -4,7 +4,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ms="https://steampp.net/settings"
xmlns:s="https://steampp.net/services"
xmlns:spp="https://steampp.net/ui"
xmlns:ui="using:FluentAvalonia.UI.Controls"
@@ -126,10 +125,6 @@
IsVisible="{Binding !IsSelectedSteam}"
Text="平台设置" />
<!--<ui:MenuFlyoutItem x:Name="PluginSettingButton" Text="{Binding Path=Res.Settings_Plugin, Mode=OneWay,Source={x:Static s:ResourceService.Current}}" />-->
<ui:ToggleMenuFlyoutItem
IsChecked="{Binding Source={x:Static ms:GameAccountSettings.IsShowAccountName}, Path=Value, Mode=TwoWay}"
IsVisible="{Binding IsSelectedSteam}"
Text="显示用户名" />
<ui:MenuFlyoutSeparator IsVisible="{Binding !IsSelectedSteam}" />
<ui:MenuFlyoutItem IsEnabled="False">
<ui:MenuFlyoutItem.Text>