Replace custom CSS tooltips with shadcn Tooltip component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 14:50:27 -05:00
co-authored by Claude Opus 4.6
parent e89397386c
commit 3455ff9c51
2 changed files with 34 additions and 18 deletions
+23 -12
View File
@@ -31,6 +31,11 @@ import {
} from "@/components/ui/collapsible"; } from "@/components/ui/collapsible";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import { Switch } from "@/components/ui/switch"; import { Switch } from "@/components/ui/switch";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { signOut, useSession } from "@/lib/auth/client"; import { signOut, useSession } from "@/lib/auth/client";
const sectionVariants = { const sectionVariants = {
@@ -206,18 +211,24 @@ function WebhookCard({
value={webhookUrl} value={webhookUrl}
className="font-mono text-[10px] text-muted-foreground" className="font-mono text-[10px] text-muted-foreground"
/> />
<Button <Tooltip>
variant="outline" <TooltipTrigger
size="icon-lg" render={
onClick={handleCopy} <Button
title="Copy URL" variant="outline"
> size="icon-lg"
{copied ? ( onClick={handleCopy}
<IconCheck size={14} className="text-green-400" /> />
) : ( }
<IconCopy size={14} /> >
)} {copied ? (
</Button> <IconCheck size={14} className="text-green-400" />
) : (
<IconCopy size={14} />
)}
</TooltipTrigger>
<TooltipContent>Copy URL</TooltipContent>
</Tooltip>
</div> </div>
</div> </div>
+11 -6
View File
@@ -17,6 +17,11 @@ import { StatusButton } from "@/components/status-button";
import { TitleCard } from "@/components/title-card"; import { TitleCard } from "@/components/title-card";
import { TmdbLogo } from "@/components/tmdb-logo"; import { TmdbLogo } from "@/components/tmdb-logo";
import { Progress } from "@/components/ui/progress"; import { Progress } from "@/components/ui/progress";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { useRegisterShortcut } from "@/hooks/use-register-shortcut"; import { useRegisterShortcut } from "@/hooks/use-register-shortcut";
interface Episode { interface Episode {
@@ -855,8 +860,8 @@ function ProviderBadge({
logoPath: string | null; logoPath: string | null;
}) { }) {
return ( return (
<div className="group relative"> <Tooltip>
<div className="flex h-10 w-10 items-center justify-center overflow-hidden rounded-lg border border-border/30 bg-card transition-transform hover:scale-105"> <TooltipTrigger className="flex h-10 w-10 items-center justify-center overflow-hidden rounded-lg border border-border/30 bg-card transition-transform hover:scale-105">
{logoPath ? ( {logoPath ? (
<Image <Image
src={logoPath} src={logoPath}
@@ -870,10 +875,10 @@ function ProviderBadge({
{name.slice(0, 2)} {name.slice(0, 2)}
</span> </span>
)} )}
</div> </TooltipTrigger>
<div className="pointer-events-none absolute -top-8 left-1/2 z-20 -translate-x-1/2 whitespace-nowrap rounded-md bg-popover px-2 py-1 text-[10px] font-medium text-popover-foreground opacity-0 shadow-md transition-opacity group-hover:opacity-100"> <TooltipContent className="bg-popover px-2 py-1 text-[10px] font-medium text-popover-foreground shadow-md [&>:last-child]:bg-popover [&>:last-child]:fill-popover">
{name} {name}
</div> </TooltipContent>
</div> </Tooltip>
); );
} }