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.

Shorts and Mixed Media: a phone's header keeps the title and the tabs

Adarsh2542335b7f63
diff --git a/src/components/mixed-media/mixed-studio.tsx b/src/components/mixed-media/mixed-studio.tsx
index 3e1838f8..70767fc2 100644
--- a/src/components/mixed-media/mixed-studio.tsx
+++ b/src/components/mixed-media/mixed-studio.tsx
@@ -106,7 +106,8 @@ export function MixedStudio({ models, frameModels }: { models: Record<Engine, Re
))}
</div>
<div className="ml-auto shrink-0">
- <EngineSwitch value={engine} onChange={setEngine} />
+ {/* A phone's header has room for the tabs, not "Add key" too. */}
+ <EngineSwitch value={engine} onChange={setEngine} wordless />
</div>
</header>
<div className="mx-auto w-full max-w-[1240px] min-w-0 flex-1 px-3 pb-28 sm:px-6 lg:pb-16">
diff --git a/src/components/shorts/shorts-studio.tsx b/src/components/shorts/shorts-studio.tsx
index 7b0f6a50..a7d6fc2f 100644
--- a/src/components/shorts/shorts-studio.tsx
+++ b/src/components/shorts/shorts-studio.tsx
@@ -78,7 +78,7 @@ export function ShortsStudio({ models }: { models: Record<Engine, ModelChoice[]>
<div className="flex min-h-svh min-w-0 flex-col">
<header className="sticky top-0 z-20 flex h-14 items-center gap-2 bg-background/85 px-3 backdrop-blur sm:px-6">
<SidebarTrigger className="md:hidden" />
- <h1 className="truncate font-heading text-[22px] leading-none">Shorts Studio</h1>
+ <h1 className="shrink-0 truncate font-heading text-[22px] leading-none">Shorts Studio</h1>
<div role="tablist" aria-label="Shorts Studio" onKeyDown={tabKeys} className="ml-2 flex h-8 items-center rounded-full bg-muted p-0.5 sm:ml-4">
{(["presets", "history"] as const).map((t) => (
<button
@@ -95,7 +95,8 @@ export function ShortsStudio({ models }: { models: Record<Engine, ModelChoice[]>
))}
</div>
<div className="ml-auto">
- <EngineSwitch value={engine} onChange={setEngine} />
+ {/* A phone's header has room for the title and the tabs, not "Add key" too. */}
+ <EngineSwitch value={engine} onChange={setEngine} wordless />
</div>
</header>
<div className="mx-auto w-full max-w-[1240px] min-w-0 flex-1 px-3 pb-28 sm:px-6 lg:pb-16">
diff --git a/src/components/studio/engine-switch.tsx b/src/components/studio/engine-switch.tsx
index d5927adb..d24f6efa 100644
--- a/src/components/studio/engine-switch.tsx
+++ b/src/components/studio/engine-switch.tsx
@@ -19,17 +19,20 @@ const OPTIONS: { value: Engine; label: string; icon: typeof Cloud; tip: string }
* Segmented control with a sliding white thumb (Liner-style). `md` (page headers) turns
* icon-only below the sm breakpoint so titles keep their line on phones (`compact` does the same
* for `sm`, e.g. in Assist's one-row footer); the tooltips and aria labels still name each engine.
+ * `wordless`: no "Add key" on a phone either, in a header that has no room for it (the lock and the label still say it).
*/
export function EngineSwitch({
value,
onChange,
size = "md",
compact = size === "md",
+ wordless,
}: {
value: Engine;
onChange: (e: Engine) => void;
size?: "sm" | "md";
compact?: boolean;
+ wordless?: boolean;
}) {
const mode = useEngineMode();
// Until hydrated, the server's switch (as useEngineMode): a viewer or status that lands mid-hydration must not change it.
@@ -54,7 +57,7 @@ export function EngineSwitch({
<o.icon className="size-3.5" />
<span className={cn(compact && "hidden sm:inline")}>{text}</span>
{/* A phone has room for two words: what to do about the lock. */}
- {compact && locked?.addKey && <span className="sm:hidden">Add key</span>}
+ {compact && !wordless && locked?.addKey && <span className="sm:hidden">Add key</span>}
</>
);
// An account opens "Add your key" right here (a plain click; Settings → Your keys in a new tab), or Your GPU when