Jon/add tooltip for scripted execution icon (#3298)

This commit is contained in:
Jonathan Dobson
2025-08-25 15:55:39 -04:00
committed by GitHub
parent 1d492ca315
commit 064b64dd4c
2 changed files with 36 additions and 6 deletions

View File

@@ -1,5 +1,11 @@
import { getClient } from "@/api/AxiosClient";
import { Action, ActionTypes } from "@/api/types";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { ScrollArea, ScrollAreaViewport } from "@/components/ui/scroll-area";
import { Separator } from "@/components/ui/separator";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
@@ -82,9 +88,18 @@ function ScrollableActionList({
<div className="flex items-center gap-2">
<ActionTypePill actionType={action.type} />
{action.created_by === "script" && (
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
<LightningBoltIcon className="h-4 w-4 text-[gold]" />
</div>
<TooltipProvider>
<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
<LightningBoltIcon className="h-4 w-4 text-[gold]" />
</div>
</TooltipTrigger>
<TooltipContent className="max-w-[250px]">
Scripted Execution
</TooltipContent>
</Tooltip>
</TooltipProvider>
)}
{action.success ? (
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">

View File

@@ -1,4 +1,10 @@
import { ActionsApiResponse, ActionTypes, Status } from "@/api/types";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { Separator } from "@/components/ui/separator";
import { ActionTypePill } from "@/routes/tasks/detail/ActionTypePill";
import { cn } from "@/util/utils";
@@ -52,9 +58,18 @@ function ActionCard({ action, onClick, active, index }: Props) {
<div className="flex items-center gap-2">
<ActionTypePill actionType={action.action_type} />
{action.created_by === "script" && (
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
<LightningBoltIcon className="h-4 w-4 text-[gold]" />
</div>
<TooltipProvider>
<Tooltip delayDuration={300}>
<TooltipTrigger asChild>
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
<LightningBoltIcon className="h-4 w-4 text-[gold]" />
</div>
</TooltipTrigger>
<TooltipContent className="max-w-[250px]">
Scripted Execution
</TooltipContent>
</Tooltip>
</TooltipProvider>
)}
{success ? (
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">