mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
client/web: disable the "disable" button when disabled
We currently disable the exit-node drop down selector when the user is in read-only mode, but we missed disabling the "Disable" button also. Previously, it would display an error when clicked. Updates tailscale/corp#14335 Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
parent
9b537f7c97
commit
03e780e9af
@ -115,15 +115,17 @@ export default function ExitNodeSelector({
|
||||
</button>
|
||||
{(advertising || using) && (
|
||||
<button
|
||||
className={cx("px-3 py-2 rounded-sm text-white cursor-pointer", {
|
||||
className={cx("px-3 py-2 rounded-sm text-white", {
|
||||
"bg-orange-400": advertising,
|
||||
"bg-indigo-400": using,
|
||||
"cursor-not-allowed": disabled,
|
||||
})}
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
handleSelect(noExitNode)
|
||||
}}
|
||||
disabled={disabled}
|
||||
>
|
||||
Disable
|
||||
</button>
|
||||
|
Loading…
Reference in New Issue
Block a user