feat: unify TUN mode availability checks across components

This commit is contained in:
wonfen
2025-09-26 14:00:57 +08:00
parent c8c79d9baa
commit 7a14e90802
3 changed files with 14 additions and 10 deletions
@@ -189,11 +189,11 @@ const ProxyControlSwitches = ({
onInfoClick={() => tunRef.current?.open()}
onToggle={handleTunToggle}
onError={onError}
disabled={!isServiceMode}
disabled={!isTunModeAvailable}
highlight={!!enable_tun_mode}
extraIcons={
<>
{!isServiceMode && (
{!isTunModeAvailable && (
<TooltipIcon
title={t("TUN requires Service Mode or Admin Mode")}
icon={WarningRounded}