put it back the way it was (#3297)
This commit is contained in:
@@ -4,7 +4,12 @@ import { ScrollArea, ScrollAreaViewport } from "@/components/ui/scroll-area";
|
|||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
|
||||||
import { cn } from "@/util/utils";
|
import { cn } from "@/util/utils";
|
||||||
import { DotFilledIcon, CodeIcon } from "@radix-ui/react-icons";
|
import {
|
||||||
|
CheckCircledIcon,
|
||||||
|
CrossCircledIcon,
|
||||||
|
DotFilledIcon,
|
||||||
|
LightningBoltIcon,
|
||||||
|
} from "@radix-ui/react-icons";
|
||||||
import { useQueryClient } from "@tanstack/react-query";
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
import { ReactNode, useRef } from "react";
|
import { ReactNode, useRef } from "react";
|
||||||
import { ActionTypePill } from "./ActionTypePill";
|
import { ActionTypePill } from "./ActionTypePill";
|
||||||
@@ -70,7 +75,7 @@ function ScrollableActionList({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex-1 space-y-2 p-4 pl-5">
|
<div className="flex-1 space-y-2 p-4 pl-5">
|
||||||
<div className="flex justify-start gap-2">
|
<div className="flex justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span>#{i + 1}</span>
|
<span>#{i + 1}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -78,7 +83,16 @@ function ScrollableActionList({
|
|||||||
<ActionTypePill actionType={action.type} />
|
<ActionTypePill actionType={action.type} />
|
||||||
{action.created_by === "script" && (
|
{action.created_by === "script" && (
|
||||||
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
||||||
<CodeIcon className="h-4 w-4" />
|
<LightningBoltIcon className="h-4 w-4 text-[gold]" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{action.success ? (
|
||||||
|
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
||||||
|
<CheckCircledIcon className="h-4 w-4 text-success" />
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
||||||
|
<CrossCircledIcon className="h-4 w-4 text-destructive" />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ import { ActionsApiResponse, ActionTypes, Status } from "@/api/types";
|
|||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { ActionTypePill } from "@/routes/tasks/detail/ActionTypePill";
|
import { ActionTypePill } from "@/routes/tasks/detail/ActionTypePill";
|
||||||
import { cn } from "@/util/utils";
|
import { cn } from "@/util/utils";
|
||||||
import { CodeIcon } from "@radix-ui/react-icons";
|
import {
|
||||||
|
CheckCircledIcon,
|
||||||
|
CrossCircledIcon,
|
||||||
|
LightningBoltIcon,
|
||||||
|
} from "@radix-ui/react-icons";
|
||||||
import { useCallback } from "react";
|
import { useCallback } from "react";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -41,15 +45,24 @@ function ActionCard({ action, onClick, active, index }: Props) {
|
|||||||
ref={refCallback}
|
ref={refCallback}
|
||||||
>
|
>
|
||||||
<div className="flex-1 space-y-2 p-4 pl-5">
|
<div className="flex-1 space-y-2 p-4 pl-5">
|
||||||
<div className="flex justify-start gap-2">
|
<div className="flex justify-between">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span>#{index}</span>
|
<span>#{index}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<ActionTypePill actionType={action.action_type} />
|
<ActionTypePill actionType={action.action_type} />
|
||||||
{action.created_by !== "script" && (
|
{action.created_by === "script" && (
|
||||||
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
||||||
<CodeIcon className="h-4 w-4" />
|
<LightningBoltIcon className="h-4 w-4 text-[gold]" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{success ? (
|
||||||
|
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
||||||
|
<CheckCircledIcon className="h-4 w-4 text-success" />
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="flex gap-1 rounded-sm bg-slate-elevation5 px-2 py-1">
|
||||||
|
<CrossCircledIcon className="h-4 w-4 text-destructive" />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user