Add a prompt for not setting a password when open Tun on macos

pull/6510/head
2dust 2025-01-15 11:02:49 +08:00
parent a6479fe0d0
commit 77b15cd530
1 changed files with 6 additions and 4 deletions

View File

@ -423,10 +423,12 @@ namespace ServiceLib.ViewModels
Locator.Current.GetService<MainWindowViewModel>()?.RebootAsAdmin();
return;
}
//else if (Utils.IsLinux())
//{
// NoticeHandler.Instance.SendMessageAndEnqueue(ResUI.TbSettingsLinuxSudoPasswordIsEmpty);
//}
else if (Utils.IsOSX())
{
_config.TunModeItem.EnableTun = false;
NoticeHandler.Instance.SendMessageAndEnqueue(ResUI.TbSettingsLinuxSudoPasswordIsEmpty);
return;
}
}
await ConfigHandler.SaveConfig(_config);
Locator.Current.GetService<MainWindowViewModel>()?.Reload();