mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 17:26:23 +02:00
feat: update Google Drive connector UI and authentication handling
This commit is contained in:
parent
75f0975674
commit
a27c10a5f5
10 changed files with 29 additions and 48 deletions
|
|
@ -5,7 +5,6 @@ import {
|
|||
AlertTriangleIcon,
|
||||
CornerDownLeftIcon,
|
||||
FileIcon,
|
||||
Loader2Icon,
|
||||
Pen,
|
||||
RefreshCwIcon,
|
||||
} from "lucide-react";
|
||||
|
|
@ -22,7 +21,7 @@ import {
|
|||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { PlateEditor } from "@/components/editor/plate-editor";
|
||||
import { Spinner } from "@/components/ui/spinner";
|
||||
import { TextShimmerLoader } from "@/components/prompt-kit/loader";
|
||||
import { authenticatedFetch } from "@/lib/auth-utils";
|
||||
import { useSetAtom } from "jotai";
|
||||
import { openHitlEditPanelAtom } from "@/atoms/chat/hitl-edit-panel.atom";
|
||||
|
|
@ -436,11 +435,7 @@ function InsufficientPermissionsCard({ result }: { result: InsufficientPermissio
|
|||
<div className="px-5 py-4 space-y-3">
|
||||
<p className="text-sm text-muted-foreground">{result.message}</p>
|
||||
<Button size="sm" className="rounded-lg" onClick={handleReauth} disabled={loading}>
|
||||
{loading ? (
|
||||
<Loader2Icon className="size-4 animate-spin" />
|
||||
) : (
|
||||
<RefreshCwIcon className="size-4" />
|
||||
)}
|
||||
<RefreshCwIcon className={`size-4 ${loading ? "animate-spin" : ""}`} />
|
||||
Re-authenticate Google Drive
|
||||
</Button>
|
||||
</div>
|
||||
|
|
@ -517,9 +512,8 @@ export const CreateGoogleDriveFileToolUI = makeAssistantToolUI<
|
|||
render: function CreateGoogleDriveFileUI({ args, result, status }) {
|
||||
if (status.type === "running") {
|
||||
return (
|
||||
<div className="my-4 flex max-w-lg items-center gap-3 rounded-2xl border bg-muted/30 px-5 py-4">
|
||||
<Spinner size="sm" className="text-muted-foreground" />
|
||||
<p className="text-sm text-muted-foreground">Preparing Google Drive file...</p>
|
||||
<div className="my-4 max-w-lg rounded-2xl border bg-muted/30 px-5 py-4">
|
||||
<TextShimmerLoader text="Preparing Google Drive file..." size="sm" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue