mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Fleet UI: Do not allow clicking a button that doesn't work (#27364)
This commit is contained in:
parent
ea37ad6df3
commit
0271390b4e
1 changed files with 20 additions and 4 deletions
|
|
@ -394,7 +394,7 @@ const SoftwarePage = ({ children, router, location }: ISoftwarePageProps) => {
|
|||
underline={false}
|
||||
tipContent={
|
||||
<div className={`${baseClass}__header__tooltip`}>
|
||||
To manage automations select “All teams”.
|
||||
Select “All teams” to manage automations.
|
||||
</div>
|
||||
}
|
||||
disableTooltip={isAllTeamsSelected}
|
||||
|
|
@ -412,9 +412,25 @@ const SoftwarePage = ({ children, router, location }: ISoftwarePageProps) => {
|
|||
</TooltipWrapper>
|
||||
)}
|
||||
{canAddSoftware && (
|
||||
<Button onClick={onAddSoftware} variant="brand">
|
||||
<span>Add software</span>
|
||||
</Button>
|
||||
<TooltipWrapper
|
||||
underline={false}
|
||||
tipContent={
|
||||
<div className={`${baseClass}__header__tooltip`}>
|
||||
Select a team to add software.
|
||||
</div>
|
||||
}
|
||||
disableTooltip={!isAllTeamsSelected}
|
||||
position="top"
|
||||
showArrow
|
||||
>
|
||||
<Button
|
||||
onClick={onAddSoftware}
|
||||
variant="brand"
|
||||
disabled={isAllTeamsSelected}
|
||||
>
|
||||
<span>Add software</span>
|
||||
</Button>
|
||||
</TooltipWrapper>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue