From 24afe8bde48404b1d6ed97778d333c15ba03f141 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Mon, 14 Oct 2024 19:29:15 +0800 Subject: [PATCH] Fix https://github.com/2dust/v2rayN/pull/5829 --- v2rayN/ServiceLib/Models/ConfigItems.cs | 3 +-- v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 12 +++++------- v2rayN/ServiceLib/Resx/ResUI.resx | 2 +- v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 3 +++ v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 3 +++ v2rayN/ServiceLib/Services/UpdateService.cs | 4 +++- .../ServiceLib/ViewModels/OptionSettingViewModel.cs | 4 ++-- .../v2rayN.Desktop/Views/OptionSettingWindow.axaml | 2 +- v2rayN/v2rayN/Views/OptionSettingWindow.xaml | 5 ++--- 9 files changed, 21 insertions(+), 17 deletions(-) diff --git a/v2rayN/ServiceLib/Models/ConfigItems.cs b/v2rayN/ServiceLib/Models/ConfigItems.cs index 06e6788ab1e..e4bbe112bd3 100644 --- a/v2rayN/ServiceLib/Models/ConfigItems.cs +++ b/v2rayN/ServiceLib/Models/ConfigItems.cs @@ -103,8 +103,6 @@ public class GUIItem public int trayMenuServersLimit { get; set; } = 20; public bool enableHWA { get; set; } = false; - - public string geoSourceUrl { get; set; } } [Serializable] @@ -142,6 +140,7 @@ public class ConstItem { public string defIEProxyExceptions { get; set; } public string subConvertUrl { get; set; } = string.Empty; + public string? geoSourceUrl { get; set; } } [Serializable] diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index 3dd9543d712..598eb574590 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -3003,18 +3003,16 @@ public static string TbSettingsFontSize { return ResourceManager.GetString("TbSettingsFontSize", resourceCulture); } } - + /// - /// Get Geo files source. + /// 查找类似 Geo files source (optional) 的本地化字符串。 /// - public static string TbSettingsGeoFilesSource - { - get - { + public static string TbSettingsGeoFilesSource { + get { return ResourceManager.GetString("TbSettingsGeoFilesSource", resourceCulture); } } - + /// /// 查找类似 HTTP Port 的本地化字符串。 /// diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index 65cb3cf1759..725481df303 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -1328,6 +1328,6 @@ Save Interface Layout - Geo files source + Geo files source (optional) \ No newline at end of file diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index f1557ed9603..e2355650266 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -1324,4 +1324,7 @@ 保存界面布局 + + Geo文件来源(可选) + \ No newline at end of file diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index 870dca42c61..b85c239d6ab 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -1204,4 +1204,7 @@ 儲存介面佈局 + + Geo文件來源(可選) + \ No newline at end of file diff --git a/v2rayN/ServiceLib/Services/UpdateService.cs b/v2rayN/ServiceLib/Services/UpdateService.cs index 21e1aa2bfbe..d821d1db9f2 100644 --- a/v2rayN/ServiceLib/Services/UpdateService.cs +++ b/v2rayN/ServiceLib/Services/UpdateService.cs @@ -451,7 +451,9 @@ private async Task UpdateGeoFile(string geoName, Config config, Action>? updateView EnableHWA = _config.guiItem.enableHWA; SubConvertUrl = _config.constItem.subConvertUrl; MainGirdOrientation = (int)_config.uiItem.mainGirdOrientation; - GeoFileSourceUrl = _config.guiItem.geoSourceUrl; + GeoFileSourceUrl = _config.constItem.geoSourceUrl; #endregion UI @@ -318,7 +318,7 @@ private async Task SaveSettingAsync() _config.guiItem.enableHWA = EnableHWA; _config.constItem.subConvertUrl = SubConvertUrl; _config.uiItem.mainGirdOrientation = (EGirdOrientation)MainGirdOrientation; - _config.guiItem.geoSourceUrl = GeoFileSourceUrl; + _config.constItem.geoSourceUrl = GeoFileSourceUrl; //systemProxy _config.systemProxyItem.systemProxyExceptions = systemProxyExceptions; diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml index aa9ec15b93a..a183fdf58c9 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml @@ -32,7 +32,7 @@ Cursor="Hand" /> - + diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml index 692df5212c1..e17543261d2 100644 --- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml +++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml @@ -847,11 +847,10 @@ Margin="{StaticResource Margin8}" Style="{StaticResource DefComboBox}" /> - @@ -860,7 +859,7 @@ Grid.Row="22" Grid.Column="1" Width="300" - Margin="{StaticResource SettingItemMargin}" + Margin="{StaticResource Margin8}" IsEditable="True" Style="{StaticResource DefComboBox}" />