Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Library: the upload copy counts an account's own fal.ai or Replicate key

Adarshe2b28c476da2
diff --git a/src/components/library-view.tsx b/src/components/library-view.tsx
index ba8c9769..5ac7f994 100644
--- a/src/components/library-view.tsx
+++ b/src/components/library-view.tsx
@@ -39,7 +39,7 @@ import {
} from "@/components/ui/dropdown-menu";
import { Kbd } from "@/components/ui/kbd";
import { Skeleton } from "@/components/ui/skeleton";
-import { BULK_MAX, useCreateGeneration, useFolders, useGenerationActions, useIsOwner, useIsVisitor, useLibrary, useLibraryFacets, useShares, useStatus, useUploads, type Asset, type FeedFilter } from "@/lib/api";
+import { BULK_MAX, useCreateGeneration, useFolders, useGenerationActions, useIsAccount, useIsOwner, useIsVisitor, useLibrary, useLibraryFacets, useShares, useStatus, useUploads, type Asset, type FeedFilter } from "@/lib/api";
import type { Generation, MediaKind, ReviewStatus } from "@/lib/catalog/types";
import { keyCombo, useModKey } from "@/lib/keys";
import { buildEntries, folderAndDescendants, reviewInfo, splitByDate, toggleAll, TRASH_DAYS, type LibraryEntry } from "@/lib/library";
@@ -230,10 +230,11 @@ function Inner() {
const folderId = sp.get("folder") ?? undefined;
const trash = tab.id === "trash";
const uploadsTab = tab.id === "uploads";
- // A guest or an account sees its own runs only; an account without a GPU can't add files yet.
+ // A guest or an account sees its own runs only; an account with neither its own GPU nor its own key can't add files yet.
const visitor = useIsVisitor();
+ const account = useIsAccount();
const seen = useStatus().data?.viewer;
- const noGpu = seen?.kind === "account" && !seen.gpu.connected;
+ const cantUpload = seen?.kind === "account" && !seen.gpu.connected && !seen.keys?.length;
// Library → Shared: the share links, not results (no search, selection or filters there).
const sharedTab = tab.id === "shared";
const [q, setQ] = useState("");
@@ -505,12 +506,16 @@ function Inner() {
}
if (folder) return <Empty title="This folder is empty">Drag cards onto it, or select some and choose Move to folder.</Empty>;
if (tab.id === "favorites") return <Empty title="Nothing liked yet">Mark the ones you like with the heart to keep them here.</Empty>;
- if (uploadsTab && noGpu)
+ if (uploadsTab && cantUpload)
return (
<Empty title="No uploads yet">
<Link href="/connect" className="text-brand-text underline underline-offset-2">
Connect your GPU
</Link>{" "}
+ or{" "}
+ <Link href="/settings#your-keys" className="text-brand-text underline underline-offset-2">
+ add a key
+ </Link>{" "}
to add your own files.
</Empty>
);
@@ -538,7 +543,7 @@ function Inner() {
) : (
<div className="min-w-0">
<h1 className="font-heading text-[34px] leading-tight">Library</h1>
- <p className="mt-1 max-w-2xl text-[15px] text-muted-foreground">{visitor ? "What you make on your own GPU." : "Everything you make, across cloud and open-source runs."}</p>
+ <p className="mt-1 max-w-2xl text-[15px] text-muted-foreground">{visitor ? (account ? "What you make on your own GPU or with your own key." : "What you make on your own GPU.") : "Everything you make, across cloud and open-source runs."}</p>
</div>
)}
<div className={cn("flex w-full items-center gap-2 sm:w-auto", sharedTab && "hidden")}>
diff --git a/src/lib/guest-access.ts b/src/lib/guest-access.ts
index 733a2d01..de02d5af 100644
--- a/src/lib/guest-access.ts
+++ b/src/lib/guest-access.ts
@@ -241,7 +241,7 @@ export const OWN_GPU_TOOL_MESSAGE = "This tool doesn't run on your own GPU yet.
export const CONNECT_GPU_HEADER = "x-fuobe-connect-gpu";
export const CONNECT_GPU_MESSAGE = "Connect your GPU to run this. Free accounts run on their own ComfyUI.";
/** An account's upload with neither a GPU nor a key of its own: its files are kept for runs on its own ComfyUI or key. */
-export const CONNECT_GPU_UPLOAD_MESSAGE = "Connect your GPU to add your own files. A free account uses them on its own ComfyUI.";
+export const CONNECT_GPU_UPLOAD_MESSAGE = "Connect your GPU, or add your own fal.ai or Replicate key, to add your own files.";
/** An account with neither its own GPU nor its own key (the proxy's answer to a run). */
export const CONNECT_GPU_OR_KEY_MESSAGE = "Connect your GPU, or add your own fal.ai or Replicate key, to run this.";