Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Sync from GitHub via hub-sync
Browse files
src/app/[org]/[dataset]/[episode]/episode-viewer.tsx
CHANGED
|
@@ -532,7 +532,7 @@ function EpisodeViewerInner({
|
|
| 532 |
title="Dataset quality diagnostics (powered by lerobot-doctor)"
|
| 533 |
/>
|
| 534 |
<div className="ml-auto pr-3">
|
| 535 |
-
<HfAuthButton />
|
| 536 |
</div>
|
| 537 |
</div>
|
| 538 |
|
|
|
|
| 532 |
title="Dataset quality diagnostics (powered by lerobot-doctor)"
|
| 533 |
/>
|
| 534 |
<div className="ml-auto pr-3">
|
| 535 |
+
<HfAuthButton variant="tab" />
|
| 536 |
</div>
|
| 537 |
</div>
|
| 538 |
|
src/components/hf-auth-button.tsx
CHANGED
|
@@ -11,7 +11,10 @@ const SIGNIN_BADGE_URL =
|
|
| 11 |
// `ghost` — a quiet inline cyan link, sized to the surrounding body copy.
|
| 12 |
// Use when auth is a secondary affordance next to a primary CTA
|
| 13 |
// (e.g. the home page's search bar).
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
interface HfAuthButtonProps {
|
| 17 |
variant?: Variant;
|
|
@@ -66,6 +69,19 @@ export default function HfAuthButton({ variant = "badge" }: HfAuthButtonProps) {
|
|
| 66 |
);
|
| 67 |
}
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
return (
|
| 70 |
<button
|
| 71 |
onClick={signIn}
|
|
|
|
| 11 |
// `ghost` — a quiet inline cyan link, sized to the surrounding body copy.
|
| 12 |
// Use when auth is a secondary affordance next to a primary CTA
|
| 13 |
// (e.g. the home page's search bar).
|
| 14 |
+
// `tab` — uppercase tracked text styled to match a tab strip; pairs with
|
| 15 |
+
// the episode viewer's tab bar so the auth control reads as part
|
| 16 |
+
// of the same register.
|
| 17 |
+
type Variant = "badge" | "ghost" | "tab";
|
| 18 |
|
| 19 |
interface HfAuthButtonProps {
|
| 20 |
variant?: Variant;
|
|
|
|
| 69 |
);
|
| 70 |
}
|
| 71 |
|
| 72 |
+
if (variant === "tab") {
|
| 73 |
+
return (
|
| 74 |
+
<button
|
| 75 |
+
onClick={signIn}
|
| 76 |
+
title="Sign in to access your private datasets"
|
| 77 |
+
className="cursor-pointer inline-flex items-center gap-1.5 px-3 text-[11px] font-medium tracking-wide uppercase text-slate-400 hover:text-cyan-300 transition-colors"
|
| 78 |
+
>
|
| 79 |
+
<span aria-hidden>🤗</span>
|
| 80 |
+
<span>Sign in</span>
|
| 81 |
+
</button>
|
| 82 |
+
);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
return (
|
| 86 |
<button
|
| 87 |
onClick={signIn}
|