Add job agent (#1672)

Co-authored-by: Muhammed Salih Altun <muhammedsalihaltun@gmail.com>
This commit is contained in:
Shuchang Zheng
2025-01-29 06:38:15 +08:00
committed by GitHub
parent c7f56f30b3
commit f7cd429558
7 changed files with 72 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
import { getClient } from "@/api/AxiosClient";
import { useCredentialGetter } from "@/hooks/useCredentialGetter";
import { cn } from "@/util/utils";
import { ReloadIcon } from "@radix-ui/react-icons";
import { Cross2Icon, FileIcon, ReloadIcon } from "@radix-ui/react-icons";
import { useMutation } from "@tanstack/react-query";
import { useId, useState } from "react";
import { Button } from "./ui/button";
@@ -113,11 +113,16 @@ function FileUpload({ value, onChange }: Props) {
</TabsList>
<TabsContent value="upload">
{isManualUpload && ( // redundant check for ts compiler
<div className="flex h-full items-center gap-4">
<div className="flex h-full items-center gap-4 p-4">
<a href={value.presignedUrl} className="underline">
<span>{file.name}</span>
<div className="flex gap-2">
<FileIcon className="size-6" />
<span>{file.name}</span>
</div>
</a>
<Button onClick={() => reset()}>Change</Button>
<Button onClick={() => reset()} size="icon" variant="secondary">
<Cross2Icon />
</Button>
</div>
)}
{value === null && (