From c9e9e26ed26dc23c61982f3bd9f7e5daac7377af Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Sun, 24 Dec 2023 21:58:22 +0500 Subject: [PATCH 01/25] add release notes add localization for use-proxy --- ReleaseNotes/2.0.0-preview.1/En.md | 0 ReleaseNotes/2.0.0-preview.1/Ru.md | 12 +++++ build/Build.cs | 22 +++++---- .../HolyClient.StressTest/NickProvider.cs | 2 + .../Pages/StressTest/ProxySourceViewModel.cs | 34 +++++++++++++ .../StressTestConfigurationViewModel.cs | 48 +++++-------------- .../StressTest/StressTestProcessViewModel.cs | 2 +- .../StressTestConfigurationView.axaml | 6 +-- .../StressTest/StressTestProcessView.axaml | 8 ++-- src/HolyClient/lang/words.loc.json | 12 +++++ 10 files changed, 95 insertions(+), 51 deletions(-) create mode 100644 ReleaseNotes/2.0.0-preview.1/En.md create mode 100644 ReleaseNotes/2.0.0-preview.1/Ru.md create mode 100644 src/HolyClient/ViewModels/Pages/StressTest/ProxySourceViewModel.cs diff --git a/ReleaseNotes/2.0.0-preview.1/En.md b/ReleaseNotes/2.0.0-preview.1/En.md new file mode 100644 index 00000000..e69de29b diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md new file mode 100644 index 00000000..0dd9cef9 --- /dev/null +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -0,0 +1,12 @@ +# Что нового в Minecraft Holy Client *2.0.0-preview.1*? + +## Основные функции + +Этот раздел содержит следующие подразделы: + +- [Исправление багов](###исправление-багов) +- [Производительность]() +- [Прокси]() +- [Плагины]() + +### Исправление багов \ No newline at end of file diff --git a/build/Build.cs b/build/Build.cs index 2caded5d..30faed68 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -192,11 +192,21 @@ class Build : NukeBuild { Console.WriteLine("Version: " + MinVer.Version); - DotNetNuGetPush(s => s + if (GitRepository.IsOnMasterBranch()) + { + DotNetNuGetPush(s => s .SetTargetPath($"{ArtifactsDirectory}/**/*.nupkg") - .SetSource("https://f.feedz.io/holyclient/holyclient/nuget/index.json") - .SetApiKey(FeedzApiKey) - ); + .SetSource("https://api.nuget.org/v3/index.json") + .SetApiKey(NuGetApiKey)); + } + else + { + + DotNetNuGetPush(s => s + .SetTargetPath($"{ArtifactsDirectory}/**/*.nupkg") + .SetSource("https://f.feedz.io/holyclient/holyclient/nuget/index.json") + .SetApiKey(FeedzApiKey)); + } }); @@ -308,8 +318,4 @@ from runtime in Runtimes }); - private static async Task UploadReleaseAssetToGithub(Release release, string asset) - { - - } } diff --git a/src/CoreLibs/HolyClient.StressTest/NickProvider.cs b/src/CoreLibs/HolyClient.StressTest/NickProvider.cs index 28927ccb..e9746dea 100644 --- a/src/CoreLibs/HolyClient.StressTest/NickProvider.cs +++ b/src/CoreLibs/HolyClient.StressTest/NickProvider.cs @@ -6,6 +6,8 @@ class NickProvider : INickProvider public NickProvider(string baseNick) { + if (string.IsNullOrWhiteSpace(baseNick)) + baseNick = ""; if (baseNick.Length > 16) throw new ArgumentException("Nick long"); _baseNick = baseNick; diff --git a/src/HolyClient/ViewModels/Pages/StressTest/ProxySourceViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/ProxySourceViewModel.cs new file mode 100644 index 00000000..49c29e90 --- /dev/null +++ b/src/HolyClient/ViewModels/Pages/StressTest/ProxySourceViewModel.cs @@ -0,0 +1,34 @@ +using HolyClient.StressTest; +using QuickProxyNet; +using ReactiveUI; +using System; + +namespace HolyClient.ViewModels; + +public class ProxySourceViewModel : ReactiveObject +{ + public Guid Id { get; private set; } + //public int AveragePing => Random.Shared.Next(100, 500); + + public string Name { get; set; } + + public string Icon { get; private set; } + + public ProxyType Type { get; set; } + public ProxySourceViewModel(IProxySource proxySource) + { + Id = proxySource.Id; + + Name = proxySource.Name; + + Type = proxySource.Type; + + Icon = proxySource switch + { + UrlProxySource => "UrlProxy", + FileProxySource => "FileProxy", + InMemoryProxySource => "InMemoryProxy" + }; + + } +} \ No newline at end of file diff --git a/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs index bcc98e71..a3b22628 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs @@ -7,7 +7,6 @@ using HolyClient.ViewModels.Pages.StressTest.Dialogs; using McProtoNet; using NuGet.Configuration; -using QuickProxyNet; using ReactiveUI; using ReactiveUI.Fody.Helpers; using ReactiveUI.Validation.Extensions; @@ -143,18 +142,24 @@ public StressTestConfigurationViewModel(IScreen hostScreen, IStressTest state) this.ValidationRule( viewModel => viewModel.Server, name => !string.IsNullOrWhiteSpace(name), - GetTr("Address")); + GetTr("Address")).DisposeWith(d); IObservable botsNicknameValid = this.WhenAnyValue(x => x.BotsNickname) - .Select(name => string.IsNullOrEmpty(name) - ? new ValidationState(false, GetTr("BotsNickname")) - - : (name.Length <= 14 - ? ValidationState.Valid : - new ValidationState(false, GetTr("BotsNickname.Long")))); + .Select(name => + { + if (string.IsNullOrWhiteSpace(name)) + { + return ValidationState.Valid; + } + if(name.Length >= 14) + { + return new ValidationState(false, GetTr("BotsNickname.Long")); + } + return ValidationState.Valid; + }); this.ValidationRule(vm => vm.BotsNickname, botsNicknameValid).DisposeWith(d); @@ -306,30 +311,3 @@ public StressTestConfigurationViewModel(IScreen hostScreen, IStressTest state) } -public class ProxySourceViewModel : ReactiveObject -{ - public Guid Id { get; private set; } - //public int AveragePing => Random.Shared.Next(100, 500); - - public string Name { get; set; } - - public string Icon { get; private set; } - - public ProxyType Type { get; set; } - public ProxySourceViewModel(IProxySource proxySource) - { - Id = proxySource.Id; - - Name = proxySource.Name; - - Type = proxySource.Type; - - Icon = proxySource switch - { - UrlProxySource => "UrlProxy", - FileProxySource => "FileProxy", - InMemoryProxySource => "InMemoryProxy" - }; - - } -} \ No newline at end of file diff --git a/src/HolyClient/ViewModels/Pages/StressTest/StressTestProcessViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/StressTestProcessViewModel.cs index b96de963..ab6247e0 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/StressTestProcessViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/StressTestProcessViewModel.cs @@ -104,7 +104,7 @@ public StressTestProcessViewModel(IScreen hostScreen, IStressTest stressTest, Lo CPS = x.CPS; PeakCPS = Math.Max(CPS, PeakCPS); - ProxyQuality = Random.Shared.Next(0, 70) + "%"; + //ProxyQuality = Random.Shared.Next(0, 70) + "%"; }).DisposeWith(d); diff --git a/src/HolyClient/Views/Pages/StressTest/StressTestConfigurationView.axaml b/src/HolyClient/Views/Pages/StressTest/StressTestConfigurationView.axaml index d4530ceb..74ab2285 100644 --- a/src/HolyClient/Views/Pages/StressTest/StressTestConfigurationView.axaml +++ b/src/HolyClient/Views/Pages/StressTest/StressTestConfigurationView.axaml @@ -99,11 +99,11 @@ - + + OnContent="{Tr StressTest.Configuration.GeneralSettings.UseProxy.On}" + OffContent="{Tr StressTest.Configuration.GeneralSettings.UseProxy.Off}"/> diff --git a/src/HolyClient/Views/Pages/StressTest/StressTestProcessView.axaml b/src/HolyClient/Views/Pages/StressTest/StressTestProcessView.axaml index be218be8..f124f5a2 100644 --- a/src/HolyClient/Views/Pages/StressTest/StressTestProcessView.axaml +++ b/src/HolyClient/Views/Pages/StressTest/StressTestProcessView.axaml @@ -21,25 +21,25 @@ - + - + - + - + diff --git a/src/HolyClient/lang/words.loc.json b/src/HolyClient/lang/words.loc.json index c4cd4eeb..ae87d6bb 100644 --- a/src/HolyClient/lang/words.loc.json +++ b/src/HolyClient/lang/words.loc.json @@ -183,6 +183,18 @@ "en": "Version", "ru": "Версия" }, + "UseProxy": { + "en": "Use proxy", + "ru": "Использование прокси", + "Off": { + "en": "Off", + "ru": "Без прокси" + }, + "On": { + "en": "On", + "ru": "Использовать" + } + }, "BehaviorSettings": { "en": "Behavior settings", "ru": "Настройки поведения" From 7914b4f24fdd13a9a9116dac94ae36f48fb04f5a Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Sun, 24 Dec 2023 21:59:35 +0500 Subject: [PATCH 02/25] test release notes --- ReleaseNotes/2.0.0-preview.1/Ru.md | 86 +++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index 0dd9cef9..7494c29d 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -9,4 +9,88 @@ - [Прокси]() - [Плагины]() -### Исправление багов \ No newline at end of file +### Исправление багов +asdslkgfdlkfgjlkdfjgkljdfgkdjf +gkdfjg;kdfjg +kfdj +gkfdj +gdfk;gjk;dfjg;kdfjg;dfj +gdfjg +kdlf;jg;kdfjg;lkdfjg +dfgj +d;lkfgj +d;flkgjdf;gjdfg;ojd +f;gdf +g;jdf +asdslkgfdlkfgjlkdfjgkljdfgkdjf +gkdfjg;kdfjg +kfdj +gkfdj +gdfk;gjk;dfjg;kdfjg;dfj +gdfjg +kdlf;jg;kdfjg;lkdfjg +dfgj +d;lkfgj +d;flkgjdf;gjdfg;ojd +f;gdf +g;jdf +asdslkgfdlkfgjlkdfjgkljdfgkdjf +gkdfjg;kdfjg +kfdj +gkfdj +gdfk;gjk;dfjg;kdfjg;dfj +gdfjg +kdlf;jg;kdfjg;lkdfjg +dfgj +d;lkfgj +d;flkgjdf;gjdfg;ojd +f;gdf +g;jdf + +### Производительность + +asdslkgfdlkfgjlkdfjgkljdfgkdjf +gkdfjg;kdfjg +kfdj +gkfdj +gdfk;gjk;dfjg;kdfjg;dfj +gdfjg +kdlf;jg;kdfjg;lkdfjg +dfgj +d;lkfgj +d;flkgjdf;gjdfg;ojd +f;gdf +g;jdfasdslkgfdlkfgjlkdfjgkljdfgkdjf +gkdfjg;kdfjg +kfdj +gkfdj +gdfk;gjk;dfjg;kdfjg;dfj +gdfjg +kdlf;jg;kdfjg;lkdfjg +dfgj +d;lkfgj +d;flkgjdf;gjdfg;ojd +f;gdf +g;jdfasdslkgfdlkfgjlkdfjgkljdfgkdjf +gkdfjg;kdfjg +kfdj +gkfdj +gdfk;gjk;dfjg;kdfjg;dfj +gdfjg +kdlf;jg;kdfjg;lkdfjg +dfgj +d;lkfgj +d;flkgjdf;gjdfg;ojd +f;gdf +g;jdfasdslkgfdlkfgjlkdfjgkljdfgkdjf +gkdfjg;kdfjg +kfdj +gkfdj +gdfk;gjk;dfjg;kdfjg;dfj +gdfjg +kdlf;jg;kdfjg;lkdfjg +dfgj +d;lkfgj +d;flkgjdf;gjdfg;ojd +f;gdf +g;jdf \ No newline at end of file From 15710e81b7301d5bc9f0f6b56cd93d3863f5c696 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Sun, 24 Dec 2023 22:00:36 +0500 Subject: [PATCH 03/25] test release notes --- ReleaseNotes/2.0.0-preview.1/Ru.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index 7494c29d..14b60e69 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -4,7 +4,7 @@ Этот раздел содержит следующие подразделы: -- [Исправление багов](###исправление-багов) +- [Исправление багов](#исправление-багов) - [Производительность]() - [Прокси]() - [Плагины]() From 2dae6738bb79dca016d6891064a0125cf4d4d9cd Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Sun, 24 Dec 2023 22:38:37 +0500 Subject: [PATCH 04/25] update release notes --- ReleaseNotes/2.0.0-preview.1/Ru.md | 109 +++++++---------------------- 1 file changed, 25 insertions(+), 84 deletions(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index 14b60e69..b0241806 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -5,92 +5,33 @@ Этот раздел содержит следующие подразделы: - [Исправление багов](#исправление-багов) -- [Производительность]() -- [Прокси]() -- [Плагины]() +- [Производительность](#производительность) +- [Прокси](#прокси) +- [Плагины](#плагины) ### Исправление багов -asdslkgfdlkfgjlkdfjgkljdfgkdjf -gkdfjg;kdfjg -kfdj -gkfdj -gdfk;gjk;dfjg;kdfjg;dfj -gdfjg -kdlf;jg;kdfjg;lkdfjg -dfgj -d;lkfgj -d;flkgjdf;gjdfg;ojd -f;gdf -g;jdf -asdslkgfdlkfgjlkdfjgkljdfgkdjf -gkdfjg;kdfjg -kfdj -gkfdj -gdfk;gjk;dfjg;kdfjg;dfj -gdfjg -kdlf;jg;kdfjg;lkdfjg -dfgj -d;lkfgj -d;flkgjdf;gjdfg;ojd -f;gdf -g;jdf -asdslkgfdlkfgjlkdfjgkljdfgkdjf -gkdfjg;kdfjg -kfdj -gkfdj -gdfk;gjk;dfjg;kdfjg;dfj -gdfjg -kdlf;jg;kdfjg;lkdfjg -dfgj -d;lkfgj -d;flkgjdf;gjdfg;ojd -f;gdf -g;jdf + +В Minecraft Holy Client было исправлено несколько багов: +- Счетчик ботов +- Рестарт ботов +- Socks5 прокси + ### Производительность -asdslkgfdlkfgjlkdfjgkljdfgkdjf -gkdfjg;kdfjg -kfdj -gkfdj -gdfk;gjk;dfjg;kdfjg;dfj -gdfjg -kdlf;jg;kdfjg;lkdfjg -dfgj -d;lkfgj -d;flkgjdf;gjdfg;ojd -f;gdf -g;jdfasdslkgfdlkfgjlkdfjgkljdfgkdjf -gkdfjg;kdfjg -kfdj -gkfdj -gdfk;gjk;dfjg;kdfjg;dfj -gdfjg -kdlf;jg;kdfjg;lkdfjg -dfgj -d;lkfgj -d;flkgjdf;gjdfg;ojd -f;gdf -g;jdfasdslkgfdlkfgjlkdfjgkljdfgkdjf -gkdfjg;kdfjg -kfdj -gkfdj -gdfk;gjk;dfjg;kdfjg;dfj -gdfjg -kdlf;jg;kdfjg;lkdfjg -dfgj -d;lkfgj -d;flkgjdf;gjdfg;ojd -f;gdf -g;jdfasdslkgfdlkfgjlkdfjgkljdfgkdjf -gkdfjg;kdfjg -kfdj -gkfdj -gdfk;gjk;dfjg;kdfjg;dfj -gdfjg -kdlf;jg;kdfjg;lkdfjg -dfgj -d;lkfgj -d;flkgjdf;gjdfg;ojd -f;gdf -g;jdf \ No newline at end of file +В Minecraft Holy Client была существенно улучшена производительность: +- Переиспользование памяти +- Повышена пропускная способность + +### Прокси + +В Minecraft Holy Client было внесён ряд изменений касающийся прокси: + +- Прокси по умолчанию +- Загрузка прокси из буфера обмена и URL + +### Плагины + +В Minecraft Holy Client было внесён ряд изменений касающийся плагинов: + +- Плагины по умолчанию \ No newline at end of file From 3e6fe03456d062107854f9ffd0957105df67c15d Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Mon, 25 Dec 2023 20:18:14 +0500 Subject: [PATCH 05/25] update ru Release notes --- ReleaseNotes/2.0.0-preview.1/Ru.md | 80 ++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 16 deletions(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index b0241806..443201ed 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -1,37 +1,85 @@ -# Что нового в Minecraft Holy Client *2.0.0-preview.1*? +# Что изменилось в Minecraft Holy Client *2.0.0-preview.1*? -## Основные функции +## Основные исправления Этот раздел содержит следующие подразделы: - [Исправление багов](#исправление-багов) - [Производительность](#производительность) -- [Прокси](#прокси) -- [Плагины](#плагины) +- [Стресс-тест](#стресс-тест) +- [Установщик](#установщик) ### Исправление багов В Minecraft Holy Client было исправлено несколько багов: -- Счетчик ботов -- Рестарт ботов -- Socks5 прокси +- [Счетчик ботов]() +- [Рестарт ботов]() +- [Socks5 прокси]() +#### Счетчик ботов + +Теперь счетчик количества ботов онлайн показывает значение корректно. + +#### Рестарт ботов + +Раньше боты могли не перезапуститься, если не удалось подключится к прокси или боты кикнуло с сервера, или во время работы произошла внутренння ошибка. Теперь бот корректно перезапускается. + +#### Socks5 прокси + +Раньше боты не могли подлкючатся к socks5 прокси из-за ошибки в реализации протокола. Сейчас боты могу подключаться к socks5 прокси. ### Производительность В Minecraft Holy Client была существенно улучшена производительность: -- Переиспользование памяти -- Повышена пропускная способность +- [Память]() +- [Повышена пропускная способность]() +- [Прокси]() + +#### Память + +Minecraft Holy Client уменьшил потребление RAM на 70% в некоторых сценариях за счет использование пула объектов MinecraftPrimitiveReader, MinecraftPrimitiveWriter, а также пакетов, которые приходят от сервера. + +#### Пропускная способность + +Теперь боты в Play режиме разделяют чтение данных из сети и их синтаксический анализ пакетов на два потока с помощью библиотеки System.IO.Pipelines. Это увеличило пропускную способность на 10%. + +#### Прокси + +QuickProxyNet по максимуму пере использует память при подключении к Socks4, Socks4a и Socks5 прокси. + + +### Стресс-тест + +- [Прокси по умолчанию]() +- [Плагины по умолчанию]() +- [Загрузка прокси из буфера обмена и URL]() +- [Отключение прокси]() +- [Дизайн окна со стресс-тест процессом]() + +#### Прокси по умолчанию + +Теперь в стресс-тесте используются прокси по умолчанию, если пользователь не добавил свои прокси. Эта возможность была добавлена на основе [голосования в Discord](https://discord.com/channels/1166051202367246396/1166055869566419085/1172042445928812574). + +#### Плагины по умолчанию + +Из результатов [голосования в Discord](https://discord.com/channels/1166051202367246396/1166055869566419085/1172041890040918057) было принято решения добавить в программу плагин по умолчанию. + +#### Загрузка прокси из буфера обмена и URL + +Раньше можно было загружать прокси только из файла, теперь импортировать прокси можно тремя способами: +- Файл +- URL +- Ручной ввод списка прокси -### Прокси +#### Отключение прокси -В Minecraft Holy Client было внесён ряд изменений касающийся прокси: +В основных настройках прокси добавлена возможность отключать использование прокси; боты будут использовать IP пользователя. -- Прокси по умолчанию -- Загрузка прокси из буфера обмена и URL +#### Дизайн окна со стресс-тест процессом -### Плагины +B окне со стресс-тест процессом убран график количества ботов онлайн, а также подключения в секунду. На место него поставлен логгер. +Показатели ботов онлайн и подключения в секунду перенесены наверх, также добавлен показатель пиковых подключений в секунду. -В Minecraft Holy Client было внесён ряд изменений касающийся плагинов: +### Установщик -- Плагины по умолчанию \ No newline at end of file +Теперь программа стала полностью кроссплатформенной и портативной, поэтому установщик ClickOnce на Windows больше не поддерживается. From 305b074078b662618614d74d967d1d3596f4efcd Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Mon, 25 Dec 2023 21:40:25 +0500 Subject: [PATCH 06/25] change Release notes --- ReleaseNotes/2.0.0-preview.1/Ru.md | 31 ++++++------------------------ 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index 443201ed..554f664e 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -11,50 +11,31 @@ ### Исправление багов -В Minecraft Holy Client было исправлено несколько багов: -- [Счетчик ботов]() -- [Рестарт ботов]() -- [Socks5 прокси]() - #### Счетчик ботов Теперь счетчик количества ботов онлайн показывает значение корректно. #### Рестарт ботов -Раньше боты могли не перезапуститься, если не удалось подключится к прокси или боты кикнуло с сервера, или во время работы произошла внутренння ошибка. Теперь бот корректно перезапускается. +Раньше боты могли не перезапуститься, если не удалось подключится к прокси или боты кикнуло с сервера, или во время работы произошла внутренняя ошибка. Теперь бот корректно перезапускается. #### Socks5 прокси -Раньше боты не могли подлкючатся к socks5 прокси из-за ошибки в реализации протокола. Сейчас боты могу подключаться к socks5 прокси. +Раньше боты не могли подключатся к socks5 прокси из-за ошибки в реализации протокола. Сейчас боты могу подключаться к socks5 прокси. ### Производительность -В Minecraft Holy Client была существенно улучшена производительность: -- [Память]() -- [Повышена пропускная способность]() -- [Прокси]() - -#### Память - -Minecraft Holy Client уменьшил потребление RAM на 70% в некоторых сценариях за счет использование пула объектов MinecraftPrimitiveReader, MinecraftPrimitiveWriter, а также пакетов, которые приходят от сервера. - -#### Пропускная способность -Теперь боты в Play режиме разделяют чтение данных из сети и их синтаксический анализ пакетов на два потока с помощью библиотеки System.IO.Pipelines. Это увеличило пропускную способность на 10%. +Производительность является важнейшим аспектом функционала Minecraft Holy Client, и каждая его особенность разрабатывается с учетом максимальной эффективности. Дополнительно, в Minecraft Holy Client внедрены следующие усовершенствования, заточенные исключительно под повышение производительности: -#### Прокси +- Радикально уменьшено потребление оперативной памяти. До этого на каждый тестовый бот создавались экземпляры MinecraftPrimitiveReader и MinecraftPrimitiveWriter, а также выделялась память при получении каждого нового пакета от сервера. Теперь мы активно используем пул объектов для повторного использования MinecraftPrimitiveReader и MinecraftPrimitiveWriter. -QuickProxyNet по максимуму пере использует память при подключении к Socks4, Socks4a и Socks5 прокси. +- Увеличена пропускная способность. Теперь боты в режиме Play разделяют процессы чтения данных из сети и их синтаксического анализа на два потока, используя библиотеку System.IO.Pipelines. Это привело к увеличению пропускной способности на 10%. +- Оптимизированы прокси-сервера. QuickProxyNet теперь максимально эффективно управляет памятью при подключении к прокси-серверам Socks4, Socks4a и Socks5. ### Стресс-тест -- [Прокси по умолчанию]() -- [Плагины по умолчанию]() -- [Загрузка прокси из буфера обмена и URL]() -- [Отключение прокси]() -- [Дизайн окна со стресс-тест процессом]() #### Прокси по умолчанию From 3ceb1083fa58f529d92dadd0168cdd28b4bfd709 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Mon, 25 Dec 2023 22:02:12 +0500 Subject: [PATCH 07/25] update RN --- ReleaseNotes/2.0.0-preview.1/Ru.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index 554f664e..08a66a34 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -43,7 +43,8 @@ #### Плагины по умолчанию -Из результатов [голосования в Discord](https://discord.com/channels/1166051202367246396/1166055869566419085/1172041890040918057) было принято решения добавить в программу плагин по умолчанию. +Ранее, пользователи имели возможность создавать поведение для стресс-тестов с использованием плагинов. Однако, осознавая, что эта опция могла показаться сложной для обычных пользователей, мы внесли улучшения. +Теперь в системе представлен новый плагин по умолчанию, который упрощает процесс запуска стресс-тестов и делает его доступным для всех. Но стоит отметить, что плагин по умолчанию пока всего лишь запускает простых ботов, которые регистрируются на сервер с помощью /reg \ \ и сразу начинают спамить. В будущем функционал плагина будет дополнен. #### Загрузка прокси из буфера обмена и URL From 4e453d9a8e8c679e1d0ca9140aa5ff48bab98cf0 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Mon, 25 Dec 2023 22:03:59 +0500 Subject: [PATCH 08/25] update RN --- ReleaseNotes/2.0.0-preview.1/Ru.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index 08a66a34..72ac4812 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -43,7 +43,7 @@ #### Плагины по умолчанию -Ранее, пользователи имели возможность создавать поведение для стресс-тестов с использованием плагинов. Однако, осознавая, что эта опция могла показаться сложной для обычных пользователей, мы внесли улучшения. +Ранее существовала опция создания поведения для стресс-тестов с использованием плагинов, что, возможно, могло показаться сложным для обычных пользователей. Теперь в системе представлен новый плагин по умолчанию, который упрощает процесс запуска стресс-тестов и делает его доступным для всех. Но стоит отметить, что плагин по умолчанию пока всего лишь запускает простых ботов, которые регистрируются на сервер с помощью /reg \ \ и сразу начинают спамить. В будущем функционал плагина будет дополнен. #### Загрузка прокси из буфера обмена и URL From 60acbd9f8980e50ab046129218da9b532a713239 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Mon, 25 Dec 2023 22:07:53 +0500 Subject: [PATCH 09/25] update RN --- ReleaseNotes/2.0.0-preview.1/Ru.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index 72ac4812..e8416c77 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -13,11 +13,11 @@ #### Счетчик ботов -Теперь счетчик количества ботов онлайн показывает значение корректно. +Была маленькая проблема, где в стресс-тест процессе счетчик количества ботов зашкаливал, когда как в реальности ботов было меньше или не было совсем. Теперь счетчик количества ботов онлайн показывает значение корректно. #### Рестарт ботов -Раньше боты могли не перезапуститься, если не удалось подключится к прокси или боты кикнуло с сервера, или во время работы произошла внутренняя ошибка. Теперь бот корректно перезапускается. +В предшествующих версиях боты могли не перезапускаться при возникновении ситуаций, таких как неудачная попытка подключения к прокси, выход ботов из сервера или внутренняя ошибка в процессе работы. В настоящее время бот корректно выполняет процесс перезапуска в таких сценариях. #### Socks5 прокси From 60d607d5a6fb80daaeb1f3a7c4d1e4e5f87a4b70 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Mon, 25 Dec 2023 22:13:55 +0500 Subject: [PATCH 10/25] add en RN --- ReleaseNotes/2.0.0-preview.1/En.md | 63 ++++++++++++++++++++++++++++++ ReleaseNotes/2.0.0-preview.1/Ru.md | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/ReleaseNotes/2.0.0-preview.1/En.md b/ReleaseNotes/2.0.0-preview.1/En.md index e69de29b..b789d9d9 100644 --- a/ReleaseNotes/2.0.0-preview.1/En.md +++ b/ReleaseNotes/2.0.0-preview.1/En.md @@ -0,0 +1,63 @@ +# What's New in Minecraft Holy Client *2.0.0-preview.1*? + +## Major Fixes + +This section includes the following subsections: + +- [Bug Fixes](#bug-fixes) +- [Performance](#performance) +- [Stress Test](#stress-test) +- [Installer](#installer) + +### Bug Fixes + +#### Bot Counter + +There was a minor issue where, during stress testing, the bot count would spike inaccurately, showing more bots than actually present. The bot online counter now accurately reflects the correct value. + +#### Bot Restart + +In previous versions, bots might fail to restart in situations like unsuccessful proxy connection attempts, bots exiting the server, or encountering internal errors during operation. Currently, bots reliably initiate the restart process in such scenarios. + +#### Socks5 Proxy + +Previously, bots couldn't connect to Socks5 proxies due to a protocol implementation error. Now, bots can successfully connect to Socks5 proxies. + +### Performance + +Performance is a crucial aspect of Minecraft Holy Client, and each feature is designed with maximum efficiency in mind. Additionally, the following enhancements have been incorporated into Minecraft Holy Client to specifically boost performance: + +- Significantly reduced RAM usage. Previously, new instances of MinecraftPrimitiveReader and MinecraftPrimitiveWriter were created for each test bot, and memory was allocated for each new packet received from the server. Now, we actively utilize object pooling to reuse MinecraftPrimitiveReader and MinecraftPrimitiveWriter. + +- Increased throughput. Play mode bots now separate the processes of reading data from the network and syntactic analysis of packets into two threads using the System.IO.Pipelines library. This has led to a 10% increase in throughput. + +- Optimized proxy servers. QuickProxyNet now efficiently manages memory when connecting to Socks4, Socks4a, and Socks5 proxy servers. + +### Stress Test + +#### Default Proxies + +Stress tests now use default proxies if the user has not added custom ones. This feature was added based on [Discord community voting](https://discord.com/channels/1166051202367246396/1166055869566419085/1172042445928812574). + +#### Default Plugins + +Previously, users had the option to create behavior for stress tests using plugins, which might have seemed complex for regular users. Now, a new default plugin has been introduced to simplify the process of running stress tests and make it accessible to everyone. It's worth noting that the default plugin currently only launches simple bots that register on the server using /reg \ \ and immediately start spamming. Additional functionality will be added to the plugin in the future. + +#### Loading Proxies from Clipboard and URL + +Previously, proxies could only be loaded from a file. Now, proxies can be imported in three ways: +- File +- URL +- Manual input of the proxy list + +#### Proxy Disable Option + +In the main proxy settings, an option has been added to disable the use of proxies; bots will use the user's IP. + +#### Stress Test Window Design + +The stress test window no longer includes a graph of the number of online bots and connections per second. Instead, a logger has been added. Online bot and connections per second indicators have been moved to the top, and a peak connections per second indicator has been added. + +### Installer + +The program is now fully cross-platform and portable, so the ClickOnce installer on Windows is no longer supported. diff --git a/ReleaseNotes/2.0.0-preview.1/Ru.md b/ReleaseNotes/2.0.0-preview.1/Ru.md index e8416c77..34017dd4 100644 --- a/ReleaseNotes/2.0.0-preview.1/Ru.md +++ b/ReleaseNotes/2.0.0-preview.1/Ru.md @@ -21,7 +21,7 @@ #### Socks5 прокси -Раньше боты не могли подключатся к socks5 прокси из-за ошибки в реализации протокола. Сейчас боты могу подключаться к socks5 прокси. +Раньше боты не могли подключатся к socks5 прокси из-за ошибки в реализации протокола. Сейчас боты могут подключаться к socks5 прокси. ### Производительность From 92984d9455ebd39e9e6f102394acca209e6e314e Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Mon, 25 Dec 2023 22:16:38 +0500 Subject: [PATCH 11/25] update RN --- ReleaseNotes/2.0.0-preview.1/En.md | 36 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ReleaseNotes/2.0.0-preview.1/En.md b/ReleaseNotes/2.0.0-preview.1/En.md index b789d9d9..9975ba39 100644 --- a/ReleaseNotes/2.0.0-preview.1/En.md +++ b/ReleaseNotes/2.0.0-preview.1/En.md @@ -1,3 +1,6 @@ +> [!WARNING] +> Disclaimer: This translation was generated using AI. + # What's New in Minecraft Holy Client *2.0.0-preview.1*? ## Major Fixes @@ -13,23 +16,23 @@ This section includes the following subsections: #### Bot Counter -There was a minor issue where, during stress testing, the bot count would spike inaccurately, showing more bots than actually present. The bot online counter now accurately reflects the correct value. +There was a minor issue where, during the stress test process, the bot count would spike, inaccurately portraying more bots than actually present. The bot counter now accurately reflects the current number of online bots. -#### Bot Restart +#### Bot Restarts -In previous versions, bots might fail to restart in situations like unsuccessful proxy connection attempts, bots exiting the server, or encountering internal errors during operation. Currently, bots reliably initiate the restart process in such scenarios. +In previous versions, bots might fail to restart in situations such as unsuccessful attempts to connect to a proxy, bots exiting the server, or internal errors during operation. Currently, bots correctly execute the restart process in such scenarios. #### Socks5 Proxy -Previously, bots couldn't connect to Socks5 proxies due to a protocol implementation error. Now, bots can successfully connect to Socks5 proxies. +Previously, bots were unable to connect to socks5 proxies due to a protocol implementation error. Bots can now successfully connect to socks5 proxies. ### Performance -Performance is a crucial aspect of Minecraft Holy Client, and each feature is designed with maximum efficiency in mind. Additionally, the following enhancements have been incorporated into Minecraft Holy Client to specifically boost performance: +Performance is a crucial aspect of Minecraft Holy Client, with each feature designed for maximum efficiency. Additionally, the following enhancements have been implemented in Minecraft Holy Client, specifically geared towards improving performance: -- Significantly reduced RAM usage. Previously, new instances of MinecraftPrimitiveReader and MinecraftPrimitiveWriter were created for each test bot, and memory was allocated for each new packet received from the server. Now, we actively utilize object pooling to reuse MinecraftPrimitiveReader and MinecraftPrimitiveWriter. +- Drastically reduced RAM consumption. Previously, instances of MinecraftPrimitiveReader and MinecraftPrimitiveWriter were created for each test bot, and memory was allocated for each new packet received from the server. Now, we actively use an object pool for reusing MinecraftPrimitiveReader and MinecraftPrimitiveWriter. -- Increased throughput. Play mode bots now separate the processes of reading data from the network and syntactic analysis of packets into two threads using the System.IO.Pipelines library. This has led to a 10% increase in throughput. +- Increased throughput. Bots in Play mode now separate the processes of reading data from the network and parsing packets into two threads, using the System.IO.Pipelines library. This has resulted in a 10% increase in throughput. - Optimized proxy servers. QuickProxyNet now efficiently manages memory when connecting to Socks4, Socks4a, and Socks5 proxy servers. @@ -37,26 +40,23 @@ Performance is a crucial aspect of Minecraft Holy Client, and each feature is de #### Default Proxies -Stress tests now use default proxies if the user has not added custom ones. This feature was added based on [Discord community voting](https://discord.com/channels/1166051202367246396/1166055869566419085/1172042445928812574). +Now, default proxies are used in the stress test if the user hasn't added their own proxies. This feature was added based on a [Discord poll](https://discord.com/channels/1166051202367246396/1166055869566419085/1172042445928812574). #### Default Plugins -Previously, users had the option to create behavior for stress tests using plugins, which might have seemed complex for regular users. Now, a new default plugin has been introduced to simplify the process of running stress tests and make it accessible to everyone. It's worth noting that the default plugin currently only launches simple bots that register on the server using /reg \ \ and immediately start spamming. Additional functionality will be added to the plugin in the future. +Previously, there was an option to create behavior for stress tests using plugins, which might have been challenging for regular users. Now, a new default plugin has been introduced, simplifying the process of launching stress tests and making it accessible to everyone. It's worth noting that the default plugin currently only runs simple bots that register on the server using /reg \ \ and immediately start spamming. The plugin's functionality will be expanded in the future. -#### Loading Proxies from Clipboard and URL +#### Proxy Loading from Clipboard and URL -Previously, proxies could only be loaded from a file. Now, proxies can be imported in three ways: -- File -- URL -- Manual input of the proxy list +Previously, proxies could only be loaded from a file. Now, proxies can be imported in three ways: file, URL, and manual entry of the proxy list. -#### Proxy Disable Option +#### Proxy Disabling -In the main proxy settings, an option has been added to disable the use of proxies; bots will use the user's IP. +In the main proxy settings, the option to disable the use of proxies has been added. Bots will use the user's IP. -#### Stress Test Window Design +#### Stress Test Process Window Design -The stress test window no longer includes a graph of the number of online bots and connections per second. Instead, a logger has been added. Online bot and connections per second indicators have been moved to the top, and a peak connections per second indicator has been added. +The stress test process window no longer displays a graph of the number of online bots and connections per second. Instead, a logger has been added. Online bot and connections per second indicators have been moved to the top, and a peak connections per second indicator has been added. ### Installer From 1d749bd06e1d6bc1d4b707d3de800dde7e2b3896 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Tue, 26 Dec 2023 18:30:05 +0500 Subject: [PATCH 12/25] add Version --- build/Build.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/Build.cs b/build/Build.cs index 30faed68..71558c49 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -232,8 +232,11 @@ from runtime in Runtimes .SetProperty("DebugType", "None") .SetPublishReadyToRun(true) .EnableSelfContained() + .SetAssemblyVersion(MinVer.AssemblyVersion) + .SetFileVersion(MinVer.FileVersion) + .SetProperty("AssemblyName", $"HolyClient.Desktop-{MinVer.Version}") .SetOutput(BuildDirectory) - .SetFramework("net8.0") + .SetFramework("net8.0") .SetRuntime(Runtime)); From fe1caed546a0e8d1fc47c5a7d979df866d615aae Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Tue, 26 Dec 2023 18:32:21 +0500 Subject: [PATCH 13/25] test ci cd --- .github/workflows/continuous.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 088fe16b..864c5f87 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -4,10 +4,12 @@ on: push: branches: - master + - release/** paths-ignore: - '**/*.md' - '**/*.gitignore' - '**/*.gitattributes' + @@ -15,6 +17,7 @@ jobs: Libs: name: Build and deploy NuGet runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' env: FeedzApiKey: ${{ secrets.FEEDZ_TOKEN }} DOTNET_CLI_TELEMETRY_OPTOUT: 1 @@ -108,6 +111,7 @@ jobs: name: "CreateRelease" needs: [build-desktop-app] runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v4 with: From a6c0c9b7f168b20d98ab1ab46f57b1d1bfeed464 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Tue, 26 Dec 2023 18:33:36 +0500 Subject: [PATCH 14/25] test ci cd --- .github/workflows/continuous.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 864c5f87..73cdef68 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -16,8 +16,7 @@ on: jobs: Libs: name: Build and deploy NuGet - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest env: FeedzApiKey: ${{ secrets.FEEDZ_TOKEN }} DOTNET_CLI_TELEMETRY_OPTOUT: 1 @@ -50,6 +49,7 @@ jobs: run: chmod +x ./build.sh - name: Run './build.cmd' + if: github.ref == 'refs/heads/master' run: ./build.sh LibsPush env: NuGetApiKey: ${{ secrets.NUGET_API_KEY }} @@ -111,7 +111,7 @@ jobs: name: "CreateRelease" needs: [build-desktop-app] runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' + steps: - uses: actions/checkout@v4 with: @@ -141,6 +141,7 @@ jobs: run: chmod +x ./build.sh - name: Run './build.cmd' + if: github.ref == 'refs/heads/master' run: ./build.sh CreateRelease env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6a42e5e6da15c4f57c72e797fc57f1e3ffb6ad20 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Tue, 26 Dec 2023 18:42:30 +0500 Subject: [PATCH 15/25] test veriosn --- build/Build.cs | 2 +- src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Build.cs b/build/Build.cs index 71558c49..05577244 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -234,7 +234,7 @@ from runtime in Runtimes .EnableSelfContained() .SetAssemblyVersion(MinVer.AssemblyVersion) .SetFileVersion(MinVer.FileVersion) - .SetProperty("AssemblyName", $"HolyClient.Desktop-{MinVer.Version}") + .SetOutput(BuildDirectory) .SetFramework("net8.0") .SetRuntime(Runtime)); diff --git a/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj b/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj index 5a0588b4..c7742e7b 100644 --- a/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj +++ b/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj @@ -5,6 +5,7 @@ One for Windows with net8.0-windows TFM, one for MacOS with net8.0-macos and one with net8.0 TFM for Linux.--> net8.0 enable + HolyClient.Desktop-$(MinVerVersion) win-x86;win-x64;linux-x64;linux-arm;linux-arm64;osx-x64;osx-arm64 true true From 6f491a9aa8c178df7904dc57f0b7c99559278ac3 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Tue, 26 Dec 2023 18:56:59 +0500 Subject: [PATCH 16/25] test versioning --- Directory.Build.props | 1 + .../HolyClient.Desktop/HolyClient.Desktop.csproj | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 22b1b74a..f8158243 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,5 +5,6 @@ all 3.6.133 + \ No newline at end of file diff --git a/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj b/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj index c7742e7b..b087baaf 100644 --- a/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj +++ b/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj @@ -5,12 +5,18 @@ One for Windows with net8.0-windows TFM, one for MacOS with net8.0-macos and one with net8.0 TFM for Linux.--> net8.0 enable - HolyClient.Desktop-$(MinVerVersion) + win-x86;win-x64;linux-x64;linux-arm;linux-arm64;osx-x64;osx-arm64 true true + + + HolyClient.Desktop-$(MinVerVersion) + + + Exe @@ -25,6 +31,11 @@ + + all + runtime; build; native; contentfiles; analyzers + + From 1ab363a51b0821f576525dd6bdd5ef09590a004c Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Tue, 26 Dec 2023 21:49:50 +0500 Subject: [PATCH 17/25] change icons --- .../Dialogs/ImportSourceViewModel.cs | 5 +- .../SelectImportSourceProxyViewModel.cs | 6 +- ...SelectImportSourceProxyDialogContent.axaml | 68 +++++++++++++++++-- src/HolyClient/lang/words.loc.json | 4 ++ .../HolyClient.Desktop.csproj | 12 +--- 5 files changed, 75 insertions(+), 20 deletions(-) diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs index 3475140e..41836f3b 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs @@ -4,11 +4,12 @@ namespace HolyClient.ViewModels.Pages.StressTest.Dialogs { public class ImportSourceViewModel { - public Symbol Icon { get; } + public string Icon { get; } + public string Description { get; set; } public string Name { get; } public ImportSource SourceType { get; } - public ImportSourceViewModel(Symbol icon, string name, ImportSource sourceType) + public ImportSourceViewModel(string icon, string name, ImportSource sourceType) { Name = name; SourceType = sourceType; diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs index fc29c9fa..5b84d1e1 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs @@ -10,9 +10,9 @@ public sealed class SelectImportSourceProxyViewModel : ReactiveObject public ImportSourceViewModel[] Sources { get; } = new ImportSourceViewModel[] { - new ImportSourceViewModel(Symbol.Clipboard,"Буфер обмена", ImportSource.InMemory), - new ImportSourceViewModel(Symbol.OpenFile,"Файл", ImportSource.File), - new ImportSourceViewModel(Symbol.Link,"URL", ImportSource.Url) + new ImportSourceViewModel("ManualEntry","Буфер обмена", ImportSource.InMemory), + new ImportSourceViewModel("FileSource","Файл", ImportSource.File), + new ImportSourceViewModel("UrlSource","URL", ImportSource.Url) }; [Reactive] public ImportSourceViewModel? SelectedSource { get; set; } diff --git a/src/HolyClient/Views/Pages/StressTest/Dialogs/SelectImportSourceProxyDialogContent.axaml b/src/HolyClient/Views/Pages/StressTest/Dialogs/SelectImportSourceProxyDialogContent.axaml index 27884fc4..b9923b49 100644 --- a/src/HolyClient/Views/Pages/StressTest/Dialogs/SelectImportSourceProxyDialogContent.axaml +++ b/src/HolyClient/Views/Pages/StressTest/Dialogs/SelectImportSourceProxyDialogContent.axaml @@ -5,17 +5,75 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:CompileBindings="True" xmlns:vm="using:HolyClient.ViewModels.Pages.StressTest.Dialogs" + xmlns:internal="using:Avalonia.Dialogs.Internal" x:DataType="vm:SelectImportSourceProxyViewModel" xmlns:ui="using:FluentAvalonia.UI.Controls" x:Class="HolyClient.Views.SelectImportSourceProxyDialogContent"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + diff --git a/src/HolyClient/lang/words.loc.json b/src/HolyClient/lang/words.loc.json index ae87d6bb..e870ef5b 100644 --- a/src/HolyClient/lang/words.loc.json +++ b/src/HolyClient/lang/words.loc.json @@ -252,6 +252,10 @@ "en": "Proxy type", "ru": "Тип прокси" }, + "Next": { + "en": "Next", + "ru": "Далее" + }, "PrimaryButton": { "en": "Import", "ru": "Импорт" diff --git a/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj b/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj index b087baaf..c3800dd2 100644 --- a/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj +++ b/src/Platforms/HolyClient.Desktop/HolyClient.Desktop.csproj @@ -11,13 +11,8 @@ true - - - HolyClient.Desktop-$(MinVerVersion) - - - + Exe @@ -31,10 +26,7 @@ - - all - runtime; build; native; contentfiles; analyzers - + From a2536aa9228721c8d6f441dae34414a4e1b69ce6 Mon Sep 17 00:00:00 2001 From: TitleHHHH Date: Tue, 26 Dec 2023 23:01:48 +0500 Subject: [PATCH 18/25] add localization for stress test proxy dialog --- src/HolyClient/Localization/Tr.cs | 1 + .../FileImportProxyDialogViewModel.cs | 2 +- .../Dialogs/Contents/ImportProxyViewModel.cs | 7 +- .../InMemoryImportProxyDialogViewModel.cs | 2 +- .../Contents/UrlImportProxyDialogViewModel.cs | 5 +- .../Dialogs/ImportSourceViewModel.cs | 9 +- .../SelectImportSourceProxyViewModel.cs | 6 +- .../StressTestConfigurationViewModel.cs | 6 +- .../FileImportProxyDialogContent.axaml | 2 +- .../InMemoryImportProxyDialogContent.axaml | 2 +- ...SelectImportSourceProxyDialogContent.axaml | 31 +- .../Dialogs/UrlImportProxyDialogContent.axaml | 2 +- .../StressTestConfigurationView.axaml.cs | 13 +- src/HolyClient/lang/words.loc.json | 910 +++++++++--------- 14 files changed, 529 insertions(+), 469 deletions(-) diff --git a/src/HolyClient/Localization/Tr.cs b/src/HolyClient/Localization/Tr.cs index c1219af2..f43e5fac 100644 --- a/src/HolyClient/Localization/Tr.cs +++ b/src/HolyClient/Localization/Tr.cs @@ -240,6 +240,7 @@ public object ProvideValue(IServiceProvider serviceProvider, bool InMultiTr) if (IsDynamic) { + Binding binding = new(nameof(TrData.TranslatedText)) { Source = trData diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/FileImportProxyDialogViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/FileImportProxyDialogViewModel.cs index ad08e047..d0de59bd 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/FileImportProxyDialogViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/FileImportProxyDialogViewModel.cs @@ -20,7 +20,7 @@ public string FilePath - public FileImportProxyDialogViewModel() + public FileImportProxyDialogViewModel(string title): base(title) { } diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/ImportProxyViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/ImportProxyViewModel.cs index 086c8a0c..b2ca7eae 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/ImportProxyViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/ImportProxyViewModel.cs @@ -8,10 +8,15 @@ namespace HolyClient.ViewModels; public abstract class ImportProxyViewModel { - + public string Title { get; set; } public ProxyType Type { get; set; } public ProxyType[] AvailableTypes { get; } = Enum.GetValues(); public abstract bool IsValid(); + + protected ImportProxyViewModel(string title) + { + Title = title; + } } diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/InMemoryImportProxyDialogViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/InMemoryImportProxyDialogViewModel.cs index 844d08bf..b0746290 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/InMemoryImportProxyDialogViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/InMemoryImportProxyDialogViewModel.cs @@ -18,7 +18,7 @@ public sealed class InMemoryImportProxyDialogViewModel : ImportProxyViewModel - public InMemoryImportProxyDialogViewModel() + public InMemoryImportProxyDialogViewModel(string title) : base(title) { diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/UrlImportProxyDialogViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/UrlImportProxyDialogViewModel.cs index 572a7579..c282387d 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/UrlImportProxyDialogViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/Contents/UrlImportProxyDialogViewModel.cs @@ -8,7 +8,10 @@ namespace HolyClient.ViewModels; public sealed class UrlImportProxyDialogViewModel : ImportProxyViewModel { - + public UrlImportProxyDialogViewModel(string title) : base(title) + { + } + public string URL { get; set; } public override bool IsValid() diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs index 41836f3b..04bdb641 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/ImportSourceViewModel.cs @@ -5,15 +5,18 @@ namespace HolyClient.ViewModels.Pages.StressTest.Dialogs public class ImportSourceViewModel { public string Icon { get; } - public string Description { get; set; } + public string Description { get; } public string Name { get; } public ImportSource SourceType { get; } - public ImportSourceViewModel(string icon, string name, ImportSource sourceType) + public ImportSourceViewModel(string icon, ImportSource sourceType) { - Name = name; + SourceType = sourceType; Icon = icon; + string baseTr = $"StressTest.Configuration.Proxy.Dialog.SelectSource.{icon}"; + Description = $"{baseTr}.Description"; + Name = baseTr; } } } diff --git a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs index 5b84d1e1..e6884629 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/Dialogs/SelectImportSourceProxyViewModel.cs @@ -10,9 +10,9 @@ public sealed class SelectImportSourceProxyViewModel : ReactiveObject public ImportSourceViewModel[] Sources { get; } = new ImportSourceViewModel[] { - new ImportSourceViewModel("ManualEntry","Буфер обмена", ImportSource.InMemory), - new ImportSourceViewModel("FileSource","Файл", ImportSource.File), - new ImportSourceViewModel("UrlSource","URL", ImportSource.Url) + new ImportSourceViewModel("ManualEntry", ImportSource.InMemory), + new ImportSourceViewModel("File", ImportSource.File), + new ImportSourceViewModel("Url", ImportSource.Url) }; [Reactive] public ImportSourceViewModel? SelectedSource { get; set; } diff --git a/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs b/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs index a3b22628..b502d8bc 100644 --- a/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs +++ b/src/HolyClient/ViewModels/Pages/StressTest/StressTestConfigurationViewModel.cs @@ -204,7 +204,7 @@ public StressTestConfigurationViewModel(IScreen hostScreen, IStressTest state) if (source == ImportSource.InMemory) { - InMemoryImportProxyDialogViewModel vm = new(); + InMemoryImportProxyDialogViewModel vm = new("ManualEntry"); ok = await ImportProxyDialog.Handle(vm); @@ -214,7 +214,7 @@ public StressTestConfigurationViewModel(IScreen hostScreen, IStressTest state) } else if (source == ImportSource.File) { - FileImportProxyDialogViewModel vm = new(); + FileImportProxyDialogViewModel vm = new("File"); ok = await ImportProxyDialog.Handle(vm); @@ -223,7 +223,7 @@ public StressTestConfigurationViewModel(IScreen hostScreen, IStressTest state) } else if (source == ImportSource.Url) { - UrlImportProxyDialogViewModel vm = new(); + UrlImportProxyDialogViewModel vm = new("Url"); ok = await ImportProxyDialog.Handle(vm); diff --git a/src/HolyClient/Views/Pages/StressTest/Dialogs/FileImportProxyDialogContent.axaml b/src/HolyClient/Views/Pages/StressTest/Dialogs/FileImportProxyDialogContent.axaml index ab31c951..b8ae40a6 100644 --- a/src/HolyClient/Views/Pages/StressTest/Dialogs/FileImportProxyDialogContent.axaml +++ b/src/HolyClient/Views/Pages/StressTest/Dialogs/FileImportProxyDialogContent.axaml @@ -9,7 +9,7 @@ xmlns:ui="using:FluentAvalonia.UI.Controls" x:Class="HolyClient.Views.FileImportProxyDialogContent"> - +