Refactor UI platform visibility to use ViewModel properties

This commit is contained in:
2dust
2025-11-09 11:11:23 +08:00
parent 4da59cd767
commit e6cb146671
6 changed files with 30 additions and 45 deletions
@@ -69,6 +69,15 @@ public class OptionSettingViewModel : MyReactiveObject
#endregion UI
#region UI visibility
[Reactive] public bool BlIsWindows { get; set; }
[Reactive] public bool BlIsLinux { get; set; }
[Reactive] public bool BlIsIsMacOS { get; set; }
[Reactive] public bool BlIsNonWindows { get; set; }
#endregion UI visibility
#region System proxy
[Reactive] public bool notProxyLocalAddress { get; set; }
@@ -108,6 +117,10 @@ public class OptionSettingViewModel : MyReactiveObject
{
_config = AppManager.Instance.Config;
_updateView = updateView;
BlIsWindows = Utils.IsWindows();
BlIsLinux = Utils.IsLinux();
BlIsIsMacOS = Utils.IsMacOS();
BlIsNonWindows = Utils.IsNonWindows();
SaveCmd = ReactiveCommand.CreateFromTask(async () =>
{