Skip to content

Commit

Permalink
Ensure consistency in button severity between workflow and task runs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ykeremy authored Oct 9, 2024
1 parent e6d6843 commit 68448fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
13 changes: 8 additions & 5 deletions skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Textarea } from "@/components/ui/textarea";
import { toast } from "@/components/ui/use-toast";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { cn } from "@/util/utils";
import { CopyIcon, ReloadIcon } from "@radix-ui/react-icons";
import { CopyIcon, PlayIcon, ReloadIcon } from "@radix-ui/react-icons";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { Link, NavLink, Outlet, useParams } from "react-router-dom";
import { TaskInfo } from "./TaskInfo";
Expand Down Expand Up @@ -129,7 +129,7 @@ function TaskDetails() {
</div>
<div className="flex items-center gap-2">
<Button
variant="outline"
variant="secondary"
onClick={() => {
if (!task) {
return;
Expand All @@ -154,7 +154,7 @@ function TaskDetails() {
}}
>
<CopyIcon className="mr-2 h-4 w-4" />
Copy as cURL
Copy cURL
</Button>
{taskIsRunningOrQueued && (
<Dialog>
Expand Down Expand Up @@ -189,8 +189,11 @@ function TaskDetails() {
</Dialog>
)}
{taskHasTerminalState && (
<Button variant="secondary" asChild>
<Link to={`/create/retry/${task.task_id}`}>Rerun Task</Link>
<Button asChild>
<Link to={`/create/retry/${task.task_id}`}>
<PlayIcon className="mr-2 h-4 w-4" />
Rerun
</Link>
</Button>
)}
</div>
Expand Down
6 changes: 3 additions & 3 deletions skyvern-frontend/src/routes/workflows/WorkflowRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ function WorkflowRun() {
}}
>
<CopyIcon className="mr-2 h-4 w-4" />
Copy as cURL
Copy cURL
</Button>
<Button asChild variant="secondary">
<Link to={`/workflows/${workflowPermanentId}/edit`}>
<Pencil2Icon className="mr-2 h-4 w-4" />
Edit Workflow
Edit
</Link>
</Button>
<Button asChild>
Expand All @@ -302,7 +302,7 @@ function WorkflowRun() {
}}
>
<PlayIcon className="mr-2 h-4 w-4" />
Rerun Workflow
Rerun
</Link>
</Button>
</div>
Expand Down

0 comments on commit 68448fc

Please sign in to comment.