Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfung committed Jan 20, 2025
1 parent 7c18d5d commit 3201d64
Showing 1 changed file with 29 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger
} from '@/components/ui/dropdown-menu'
import { IconMore, IconSpinner } from '@/components/ui/icons'
import { IconInfoCircled, IconMore, IconSpinner } from '@/components/ui/icons'
import {
Pagination,
PaginationContent,
Expand All @@ -48,6 +48,11 @@ import {
TableHeader,
TableRow
} from '@/components/ui/table'
import {
Tooltip,
TooltipContent,
TooltipTrigger
} from '@/components/ui/tooltip'
import LoadingWrapper from '@/components/loading-wrapper'

import { UpdateUserRoleDialog } from './user-role-dialog'
Expand Down Expand Up @@ -311,14 +316,30 @@ function OperationView({
<span className="ml-2">Activate</span>
</DropdownMenuItem>
)}
{!user.node.isSsoUser && (
<DropdownMenuItem
onSelect={() => setOpen(true)}
className="cursor-pointer gap-1"
<Tooltip>
<TooltipTrigger asChild>
<span>
<DropdownMenuItem
disabled={user.node.isSsoUser}
onSelect={() => setOpen(true)}
className="cursor-pointer gap-1"
>
<span className="flex items-center gap-1">
<span className="ml-2">Reset password</span>
{user.node.isSsoUser && <IconInfoCircled />}
</span>
</DropdownMenuItem>
</span>
</TooltipTrigger>
<TooltipContent
side="left"
sideOffset={8}
align="center"
hidden={!user.node.isSsoUser}
>
<span className="ml-2">Reset password</span>
</DropdownMenuItem>
)}
<p>Cannot request password reset for SSO users</p>
</TooltipContent>
</Tooltip>
</DropdownMenuContent>
</DropdownMenu>
<AlertDialog open={open} onOpenChange={onOpenChange}>
Expand Down

0 comments on commit 3201d64

Please sign in to comment.