mirror of
https://github.com/beilunyang/moemail.git
synced 2026-09-05 15:26:38 +08:00
feat: Init
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
"use client"
|
||||
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Mail, Github } from "lucide-react"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { signIn } from "next-auth/react"
|
||||
|
||||
interface ActionButtonProps {
|
||||
isLoggedIn?: boolean
|
||||
}
|
||||
|
||||
export function ActionButton({ isLoggedIn }: ActionButtonProps) {
|
||||
const router = useRouter()
|
||||
|
||||
if (isLoggedIn) {
|
||||
return (
|
||||
<Button
|
||||
size="lg"
|
||||
onClick={() => router.push("/moe")}
|
||||
className="gap-2 bg-primary hover:bg-primary/90 text-white px-8"
|
||||
>
|
||||
<Mail className="w-5 h-5" />
|
||||
进入邮箱
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
size="lg"
|
||||
onClick={() => signIn("github", { callbackUrl: "/moe" })}
|
||||
className="gap-2 bg-primary hover:bg-primary/90 text-white px-8"
|
||||
>
|
||||
<Github className="w-5 h-5" />
|
||||
使用 GitHub 登录
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
interface FeatureCardProps {
|
||||
icon: React.ReactNode
|
||||
title: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export function FeatureCard({ icon, title, description }: FeatureCardProps) {
|
||||
return (
|
||||
<div className="p-4 rounded border-2 border-primary/20 hover:border-primary/40 transition-colors bg-white/5 backdrop-blur">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="rounded-lg bg-primary/10 text-primary p-2">
|
||||
{icon}
|
||||
</div>
|
||||
<div className="text-left">
|
||||
<h3 className="font-bold">{title}</h3>
|
||||
<p className="text-sm text-gray-600 dark:text-gray-400">{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user