add initial complete webui, more ai commands for moderation, add api
This commit is contained in:
parent
19e794e34c
commit
173d4e7a52
112 changed files with 8176 additions and 780 deletions
29
webui/components/header-auth.tsx
Executable file
29
webui/components/header-auth.tsx
Executable file
|
@ -0,0 +1,29 @@
|
|||
"use client";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { RiTelegram2Line } from "react-icons/ri";
|
||||
import Link from "next/link";
|
||||
import { useAuth } from "@/contexts/auth-context";
|
||||
|
||||
export function HeaderAuth() {
|
||||
const { isAuthenticated, loading } = useAuth();
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="w-8 h-8 animate-pulse bg-muted rounded-md" />
|
||||
);
|
||||
}
|
||||
|
||||
if (isAuthenticated) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Button variant="ghost" size="sm" asChild>
|
||||
<Link href="/login">
|
||||
<RiTelegram2Line />
|
||||
Sign in with Telegram
|
||||
</Link>
|
||||
</Button>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue