diff --git a/src/ST.Client.Desktop.Avalonia.App/App.axaml.cs b/src/ST.Client.Desktop.Avalonia.App/App.axaml.cs index 7dfe8628b..cd647709e 100644 --- a/src/ST.Client.Desktop.Avalonia.App/App.axaml.cs +++ b/src/ST.Client.Desktop.Avalonia.App/App.axaml.cs @@ -133,6 +133,12 @@ namespace System.Application.UI windowService.Init(); SettingsHost.Load(); + if (GeneralSettings.IsStartupAppMinimized.Value) + { + Program.IsMinimize = true; + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + desktop.MainWindow = null; + } Theme = (AppTheme)UISettings.Theme.Value; UISettings.Theme.Subscribe(x => Theme = (AppTheme)x); UISettings.Language.Subscribe(x => R.ChangeLanguage(x)); @@ -150,7 +156,9 @@ namespace System.Application.UI #region 主窗口启动时加载的资源 compositeDisposable.Add(SettingsHost.Save); compositeDisposable.Add(ProxyService.Current.Dispose); + compositeDisposable.Add(AuthService.Current.SaveEditNameAuthenticators); compositeDisposable.Add(SteamConnectService.Current.Dispose); + #endregion MainWindow = new MainWindow { diff --git a/src/ST.Client.Desktop.Avalonia.App/CommandLineTools.cs b/src/ST.Client.Desktop.Avalonia.App/CommandLineTools.cs index 5328a1407..14e6975dd 100644 --- a/src/ST.Client.Desktop.Avalonia.App/CommandLineTools.cs +++ b/src/ST.Client.Desktop.Avalonia.App/CommandLineTools.cs @@ -52,7 +52,7 @@ namespace System.Application }); rootCommand.AddCommand(devtools); - // -clt c + // -clt c -silence var common = new Command("c", "common"); common.AddOption(new Option("-silence", "静默启动(不弹窗口)")); common.Handler = CommandHandler.Create((bool silence) => diff --git a/src/ST.Client.Desktop.Avalonia.App/Program.cs b/src/ST.Client.Desktop.Avalonia.App/Program.cs index 2e5215a68..c26ac52c9 100644 --- a/src/ST.Client.Desktop.Avalonia.App/Program.cs +++ b/src/ST.Client.Desktop.Avalonia.App/Program.cs @@ -1,5 +1,6 @@ using NLog; using NLog.Config; +using System.Application.Models.Settings; using System.Application.Services; using System.IO; using System.Linq; diff --git a/src/ST.Client.Desktop.Avalonia/Application/UI/Assets/AppResources/gg.gif b/src/ST.Client.Desktop.Avalonia/Application/UI/Assets/AppResources/gg.gif new file mode 100644 index 000000000..da02a21c2 Binary files /dev/null and b/src/ST.Client.Desktop.Avalonia/Application/UI/Assets/AppResources/gg.gif differ diff --git a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/About/About_SoftwarePage.axaml b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/About/About_SoftwarePage.axaml index 5920c7b5a..acf238d1d 100644 --- a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/About/About_SoftwarePage.axaml +++ b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/About/About_SoftwarePage.axaml @@ -5,6 +5,7 @@ xmlns:controls="clr-namespace:System.Application.UI.Views.Controls;assembly=System.Application.SteamTools.Client.Desktop.Avalonia" xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop" xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop" + xmlns:gif="clr-namespace:AvaloniaGif;assembly=AvaloniaGif" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:DataType="vm:AboutPageViewModel" x:CompileBindings="True" @@ -97,17 +98,17 @@ Text="Development: " VerticalAlignment="Center"/> @@ -116,7 +117,7 @@ Text="Business And Art: " VerticalAlignment="Center"/> @@ -134,10 +135,13 @@ + + + - @@ -150,7 +154,7 @@ @@ -179,17 +183,17 @@ - diff --git a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/GameListPage.axaml b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/GameListPage.axaml index 6439937b6..6a19f9d8f 100644 --- a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/GameListPage.axaml +++ b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/Pages/GameListPage.axaml @@ -218,10 +218,10 @@ - + CommandParameter="{Binding}" />--> - + CommandParameter="{Binding}" />--> - - - - diff --git a/src/ST.Client.Desktop.Avalonia/ST.Client.Desktop.Avalonia.csproj b/src/ST.Client.Desktop.Avalonia/ST.Client.Desktop.Avalonia.csproj index 0965e249b..b1454ae41 100644 --- a/src/ST.Client.Desktop.Avalonia/ST.Client.Desktop.Avalonia.csproj +++ b/src/ST.Client.Desktop.Avalonia/ST.Client.Desktop.Avalonia.csproj @@ -19,6 +19,10 @@ + + + + Properties\AssemblyInfo.cs diff --git a/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsDesktopPlatformServiceImpl.cs b/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsDesktopPlatformServiceImpl.cs index 7768a97ef..a4c78051b 100644 --- a/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsDesktopPlatformServiceImpl.cs +++ b/src/ST.Client.Desktop.Windows/Services/Implementation/WindowsDesktopPlatformServiceImpl.cs @@ -105,7 +105,7 @@ namespace System.Application.Services.Implementation td.Settings.StopIfGoingOnBatteries = false; td.Settings.DisallowStartIfOnBatteries = false; td.Triggers.Add(new LogonTrigger()); - td.Actions.Add(new ExecAction(AppHelper.ProgramName, "-minimized", Path.GetDirectoryName(Assembly.GetCallingAssembly().Location))); + td.Actions.Add(new ExecAction(AppHelper.ProgramName, "-clt c -silence", Path.GetDirectoryName(Assembly.GetCallingAssembly().Location))); if (IsAdministrator) td.Principal.RunLevel = TaskRunLevel.Highest; TaskService.Instance.RootFolder.RegisterTaskDefinition(name, td); diff --git a/src/ST.Client.Desktop/Models/MyAuthenticator.cs b/src/ST.Client.Desktop/Models/MyAuthenticator.cs index 99a4d7880..26aa25f33 100644 --- a/src/ST.Client.Desktop/Models/MyAuthenticator.cs +++ b/src/ST.Client.Desktop/Models/MyAuthenticator.cs @@ -12,9 +12,10 @@ namespace System.Application.Models { } - public MyAuthenticator(IGAPAuthenticatorDTO data) + public MyAuthenticator(IGAPAuthenticatorDTO data) : this() { AuthenticatorData = data; + OriginName = AuthenticatorData.Name; } public IGAPAuthenticatorDTO AuthenticatorData { get; set; } @@ -32,6 +33,7 @@ namespace System.Application.Models } } + public string OriginName; public string Name { get @@ -45,6 +47,7 @@ namespace System.Application.Models } } + public int Index { get @@ -194,6 +197,7 @@ namespace System.Application.Models { case "name": Name = reader.ReadElementContentAsString(); + OriginName = Name; break; case "created": diff --git a/src/ST.Client.Desktop/Models/Settings/SteamSettings.cs b/src/ST.Client.Desktop/Models/Settings/SteamSettings.cs index 90e6e4134..af0918882 100644 --- a/src/ST.Client.Desktop/Models/Settings/SteamSettings.cs +++ b/src/ST.Client.Desktop/Models/Settings/SteamSettings.cs @@ -18,15 +18,17 @@ namespace System.Application.Models.Settings private static void IsRunSteamNoCheckUpdate_ValueChanged(object sender, ValueChangedEventArgs e) { if (e.NewValue) - SteamStratParameter.Value += ""; - + SteamStratParameter.Value += " -noverifyfiles"; + else + SteamStratParameter.Value = SteamStratParameter.Value.Replace("-silent", "").Trim(); } private static void IsRunSteamMinimized_ValueChanged(object sender, ValueChangedEventArgs e) { if (e.NewValue) - SteamStratParameter.Value += ""; - + SteamStratParameter.Value += " -silent"; + else + SteamStratParameter.Value = SteamStratParameter.Value.Replace("-silent", "").Trim(); } /// diff --git a/src/ST.Client.Desktop/Services/Mvvm/AuthService.cs b/src/ST.Client.Desktop/Services/Mvvm/AuthService.cs index 07951a162..9e649fa3b 100644 --- a/src/ST.Client.Desktop/Services/Mvvm/AuthService.cs +++ b/src/ST.Client.Desktop/Services/Mvvm/AuthService.cs @@ -483,5 +483,18 @@ namespace System.Application.Services await repository.DeleteAsync(auth.AuthenticatorData.Id); Current.Authenticators.Remove(auth); } + + + public void SaveEditNameAuthenticators() + { + Task.Run(() => + { + var auths = Authenticators.Items.Where(x => x.Name != x.OriginName); + + foreach (var auth in auths) + AddOrUpdateSaveAuthenticators(auth); + }); + + } } } diff --git a/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs b/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs index 814621c37..eee3d289a 100644 --- a/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs +++ b/src/ST.Client.Desktop/UI/Resx/AppResources.Designer.cs @@ -1088,6 +1088,15 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 确认交易 的本地化字符串。 + /// + public static string LocalAuth_AuthTrade { + get { + return ResourceManager.GetString("LocalAuth_AuthTrade", resourceCulture); + } + } + /// /// 查找类似 取消交易 的本地化字符串。 /// @@ -1242,6 +1251,24 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 令牌云同步 的本地化字符串。 + /// + public static string LocalAuth_CloudSync { + get { + return ResourceManager.GetString("LocalAuth_CloudSync", resourceCulture); + } + } + + /// + /// 查找类似 复制令牌 的本地化字符串。 + /// + public static string LocalAuth_Copy { + get { + return ResourceManager.GetString("LocalAuth_Copy", resourceCulture); + } + } + /// /// 查找类似 已复制令牌 的本地化字符串。 /// @@ -1350,6 +1377,24 @@ namespace System.Application.UI.Resx { } } + /// + /// 查找类似 查看令牌 的本地化字符串。 + /// + public static string LocalAuth_ShowAuthCode { + get { + return ResourceManager.GetString("LocalAuth_ShowAuthCode", resourceCulture); + } + } + + /// + /// 查找类似 查看令牌详细数据 的本地化字符串。 + /// + public static string LocalAuth_ShowAuthInfo { + get { + return ResourceManager.GetString("LocalAuth_ShowAuthInfo", resourceCulture); + } + } + /// /// 查找类似 Steam身份验证器的完整数据,可在导入不同软件时使用: 的本地化字符串。 /// diff --git a/src/ST.Client.Desktop/UI/Resx/AppResources.resx b/src/ST.Client.Desktop/UI/Resx/AppResources.resx index 8d27ad601..0c344e137 100644 --- a/src/ST.Client.Desktop/UI/Resx/AppResources.resx +++ b/src/ST.Client.Desktop/UI/Resx/AppResources.resx @@ -462,6 +462,9 @@ 令牌自定义名称 + + 确认交易 + 取消交易 @@ -516,6 +519,12 @@ 无效的交易 + + 令牌云同步 + + + 复制令牌 + 已复制令牌 @@ -552,6 +561,12 @@ Steam的移动身份验证器应用程序的桌面实现。导入方法:选择SDA目录下maFiles文件夹的maFile文件进行导入。(不支持导入加密文件,请先移除密码在导入) + + 查看令牌 + + + 查看令牌详细数据 + Steam身份验证器的完整数据,可在导入不同软件时使用: diff --git a/src/ST.Client.Desktop/UI/ViewModels/Pages/About/AboutPageViewModel.cs b/src/ST.Client.Desktop/UI/ViewModels/Pages/About/AboutPageViewModel.cs index bdd823898..4db82b381 100644 --- a/src/ST.Client.Desktop/UI/ViewModels/Pages/About/AboutPageViewModel.cs +++ b/src/ST.Client.Desktop/UI/ViewModels/Pages/About/AboutPageViewModel.cs @@ -35,7 +35,21 @@ namespace System.Application.UI.ViewModels public Version ClientVersion => ThisAssembly.ClientVersion; - public static string ClearnetLink => "https://steampp.net/"; + public static string RmbadminSteamLink => SteamApiUrls.MY_PROFILE_URL; + + public static string RmbadminLink => "https://github.com/rmbadmin"; + + public static string AigioLLink => "https://github.com/AigioL"; + + public static string MossimosLink => "https://github.com/Mossimos"; + + public static string CliencerLink => "https://space.bilibili.com/30031316"; + + public static string PrivacyLink => "https://steampp.net/privacy"; + public static string AgreementLink => "https://steampp.net/agreement"; + + + public static string OfficialLink => "https://steampp.net/"; public static string SourceCodeLink => "https://github.com/rmbadmin/SteamTools"; @@ -45,8 +59,6 @@ namespace System.Application.UI.ViewModels public static string FAQLink => "https://steampp.net/faq"; - public static string DocsLink => "https://docs.wasabiwallet.io/"; - public static string LicenseLink => "https://github.com/rmbadmin/SteamTools/blob/develop/LICENSE"; } } diff --git a/src/ST.Client.Desktop/UI/ViewModels/Pages/LocalAuthPageViewModel.cs b/src/ST.Client.Desktop/UI/ViewModels/Pages/LocalAuthPageViewModel.cs index e22347b21..3c08d1e18 100644 --- a/src/ST.Client.Desktop/UI/ViewModels/Pages/LocalAuthPageViewModel.cs +++ b/src/ST.Client.Desktop/UI/ViewModels/Pages/LocalAuthPageViewModel.cs @@ -31,15 +31,15 @@ namespace System.Application.UI.ViewModels // { new MenuItemViewModel(nameof(AppResources.Add)) { IconKey="AddDrawing", Command= AddAuthCommand }, - new MenuItemViewModel(nameof(AppResources.Edit)) { IconKey="EditDrawing" }, - new MenuItemViewModel(nameof(AppResources.Export)) { IconKey="ExportDrawing", - Command= RefreshAuthCommand }, + //new MenuItemViewModel(nameof(AppResources.Edit)) { IconKey="EditDrawing" }, + //new MenuItemViewModel(nameof(AppResources.Export)) { IconKey="ExportDrawing", + // Command= RefreshAuthCommand }, new MenuItemViewModel(), new MenuItemViewModel(nameof(AppResources.Refresh)) {IconKey="RefreshDrawing", Command= RefreshAuthCommand }, - new MenuItemViewModel(), - new MenuItemViewModel(nameof(AppResources.Encrypt)) {IconKey="LockDrawing" }, - new MenuItemViewModel(nameof(AppResources.CloudSync)) {IconKey="CloudDrawing" }, + //new MenuItemViewModel(), + //new MenuItemViewModel(nameof(AppResources.Encrypt)) {IconKey="LockDrawing" }, + //new MenuItemViewModel(nameof(AppResources.CloudSync)) {IconKey="CloudDrawing" }, // } //}, };