Skip to content

Commit

Permalink
Left align navigation pills in task details (Skyvern-AI#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Oct 28, 2024
1 parent 9d93280 commit 3fbd183
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 62 deletions.
108 changes: 53 additions & 55 deletions skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,61 +274,59 @@ function TaskDetails() {
{failureReason}
</>
)}
<div className="flex items-center justify-center">
<div className="inline-flex rounded border bg-muted p-1">
<NavLink
to="actions"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-md px-2 py-1 text-muted-foreground",
{
"bg-primary-foreground text-foreground": isActive,
},
);
}}
>
Actions
</NavLink>
<NavLink
to="recording"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-md px-2 py-1 text-muted-foreground",
{
"bg-primary-foreground text-foreground": isActive,
},
);
}}
>
Recording
</NavLink>
<NavLink
to="parameters"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-md px-2 py-1 text-muted-foreground",
{
"bg-primary-foreground text-foreground": isActive,
},
);
}}
>
Parameters
</NavLink>
<NavLink
to="diagnostics"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-md px-2 py-1 text-muted-foreground",
{
"bg-primary-foreground text-foreground": isActive,
},
);
}}
>
Diagnostics
</NavLink>
</div>
<div className="flex w-fit gap-2 rounded-sm border border-slate-700 p-2">
<NavLink
to="actions"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-sm px-3 py-2 hover:bg-slate-700",
{
"bg-slate-700": isActive,
},
);
}}
>
Actions
</NavLink>
<NavLink
to="recording"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-sm px-3 py-2 hover:bg-slate-700",
{
"bg-slate-700": isActive,
},
);
}}
>
Recording
</NavLink>
<NavLink
to="parameters"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-sm px-3 py-2 hover:bg-slate-700",
{
"bg-slate-700": isActive,
},
);
}}
>
Parameters
</NavLink>
<NavLink
to="diagnostics"
className={({ isActive }) => {
return cn(
"cursor-pointer rounded-sm px-3 py-2 hover:bg-slate-700",
{
"bg-slate-700": isActive,
},
);
}}
>
Diagnostics
</NavLink>
</div>
<Outlet />
</div>
Expand Down
10 changes: 3 additions & 7 deletions skyvern-frontend/src/routes/tasks/detail/TaskRecording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ function TaskRecording() {

if (taskIsLoading) {
return (
<div className="mx-auto flex">
<div className="h-[450px] w-[800px]">
<Skeleton className="h-full" />
</div>
<div className="h-[450px] w-[800px]">
<Skeleton className="h-full" />
</div>
);
}
Expand All @@ -41,9 +39,7 @@ function TaskRecording() {
}

return recordingURL ? (
<div className="mx-auto flex">
<video width={800} height={450} src={recordingURL} controls />
</div>
<video width={800} height={450} src={recordingURL} controls />
) : (
<div>No recording available for this task</div>
);
Expand Down

0 comments on commit 3fbd183

Please sign in to comment.