feat: costs UI on tool detail + tier badge in sidebar

This commit is contained in:
root
2026-07-29 23:18:19 +02:00
parent ba413f5ee9
commit 45f0b80055
2 changed files with 191 additions and 10 deletions
+10 -9
View File
@@ -6,7 +6,7 @@ import { Skeleton } from "@/components/ui/skeleton";
export function Layout({ children }: { children: React.ReactNode }) {
const [location] = useLocation();
const { user, isLoading, isAuthenticated, isAdmin, isLocalMode, login, logout } = useAuth();
const { user, isLoading, isAuthenticated, isAdmin, isLocalMode, tier, login, logout } = useAuth();
const links = [
{ href: "/", label: "Dashboard", icon: LayoutDashboard },
@@ -55,14 +55,15 @@ export function Layout({ children }: { children: React.ReactNode }) {
<div className="w-8 h-8 rounded-full bg-primary/15 flex items-center justify-center shrink-0">
<User className="w-4 h-4 text-primary" />
</div>
<div className="min-w-0">
<p className="text-sm font-medium truncate text-foreground">
{user.name || user.preferredUsername || "User"}
</p>
{user.email && (
<p className="text-xs text-muted-foreground truncate">{user.email}</p>
)}
</div>
<div className="min-w-0">
<p className="text-sm font-medium truncate text-foreground">
{user.name || user.preferredUsername || "User"}
</p>
<div className="flex items-center gap-1.5 mt-0.5">
<span className="text-[10px] uppercase tracking-wider font-semibold px-1.5 py-0.5 rounded-sm bg-primary/10 text-primary">{tier}</span>
{user.email && <span className="text-xs text-muted-foreground truncate">{user.email}</span>}
</div>
</div>
</div>
<Button
variant="ghost"