mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-02 02:30:07 +00:00
UI improvements (#296)
This commit is contained in:
parent
25a7a3ad8e
commit
6feddbde6a
4 changed files with 8 additions and 12 deletions
|
@ -23,7 +23,7 @@ const CardHeader = React.forwardRef<
|
||||||
>(({ className, ...props }, ref) => (
|
>(({ className, ...props }, ref) => (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn("flex flex-col space-y-1.5 p-4", className)}
|
className={cn("flex flex-col space-y-1.5 p-4 bg-muted/40", className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
|
@ -86,7 +86,7 @@ const DropdownMenuItem = React.forwardRef<
|
||||||
<DropdownMenuPrimitive.Item
|
<DropdownMenuPrimitive.Item
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
inset && "pl-8",
|
inset && "pl-8",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { getClient } from "@/api/AxiosClient";
|
import { getClient } from "@/api/AxiosClient";
|
||||||
import { Status, TaskApiResponse } from "@/api/types";
|
import { TaskApiResponse } from "@/api/types";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { basicTimeFormat } from "@/util/timeFormat";
|
import { basicTimeFormat } from "@/util/timeFormat";
|
||||||
import {
|
import {
|
||||||
|
@ -32,11 +32,7 @@ function QueuedTasks() {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const queuedTasks = tasks
|
if (tasks?.length === 0) {
|
||||||
?.filter((task) => task.status === Status.Queued)
|
|
||||||
.slice(0, 10);
|
|
||||||
|
|
||||||
if (queuedTasks?.length === 0) {
|
|
||||||
return <div>No queued tasks</div>;
|
return <div>No queued tasks</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,16 +46,16 @@ function QueuedTasks() {
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{queuedTasks?.length === 0 ? (
|
{tasks?.length === 0 ? (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell colSpan={3}>No queued tasks</TableCell>
|
<TableCell colSpan={3}>No queued tasks</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
) : (
|
) : (
|
||||||
queuedTasks?.map((task) => {
|
tasks?.map((task) => {
|
||||||
return (
|
return (
|
||||||
<TableRow
|
<TableRow
|
||||||
key={task.task_id}
|
key={task.task_id}
|
||||||
className="cursor-pointer w-4"
|
className="cursor-pointer w-4 hover:bg-muted/50"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(task.task_id);
|
navigate(task.task_id);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -40,7 +40,7 @@ function RunningTasks() {
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={task.task_id}
|
key={task.task_id}
|
||||||
className="hover:bg-primary-foreground cursor-pointer"
|
className="hover:bg-muted/50 cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(`/tasks/${task.task_id}`);
|
navigate(`/tasks/${task.task_id}`);
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue