chore(format): run prettier

This commit is contained in:
zetaloop
2026-02-25 05:37:27 +08:00
parent c301dbd3c2
commit 807c329e87
8 changed files with 210 additions and 157 deletions
+9 -2
View File
@@ -56,8 +56,15 @@ export default function LoginPage() {
</div>
<div className="space-y-2">
<Label htmlFor="password"></Label>
<Input id="password" type="password" placeholder="请输入密码" {...register("password")} />
{errors.password && <p className="text-xs text-destructive">{errors.password.message}</p>}
<Input
id="password"
type="password"
placeholder="请输入密码"
{...register("password")}
/>
{errors.password && (
<p className="text-xs text-destructive">{errors.password.message}</p>
)}
</div>
<Button type="submit" className="w-full" disabled={isSubmitting}>
{isSubmitting ? "登录中..." : "登录"}
+12 -3
View File
@@ -59,7 +59,9 @@ export default function RegisterPage() {
<div className="space-y-2">
<Label htmlFor="nickname"></Label>
<Input id="nickname" placeholder="请输入昵称" {...register("nickname")} />
{errors.nickname && <p className="text-xs text-destructive">{errors.nickname.message}</p>}
{errors.nickname && (
<p className="text-xs text-destructive">{errors.nickname.message}</p>
)}
</div>
<div className="space-y-2">
<Label htmlFor="phone"></Label>
@@ -68,8 +70,15 @@ export default function RegisterPage() {
</div>
<div className="space-y-2">
<Label htmlFor="password"></Label>
<Input id="password" type="password" placeholder="请输入密码" {...register("password")} />
{errors.password && <p className="text-xs text-destructive">{errors.password.message}</p>}
<Input
id="password"
type="password"
placeholder="请输入密码"
{...register("password")}
/>
{errors.password && (
<p className="text-xs text-destructive">{errors.password.message}</p>
)}
</div>
<div className="space-y-2">
<Label htmlFor="confirmPassword"></Label>
+30 -6
View File
@@ -22,7 +22,9 @@ export default function HomePage() {
</div>
<div className="relative z-10 space-y-8 max-w-3xl mx-auto">
<div className="space-y-4">
<h1 className="text-4xl md:text-6xl font-bold tracking-tighter leading-tight"></h1>
<h1 className="text-4xl md:text-6xl font-bold tracking-tighter leading-tight">
</h1>
<p className="text-lg md:text-xl text-muted-foreground leading-relaxed">
</p>
@@ -72,15 +74,37 @@ export default function HomePage() {
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
<h2 className="text-xl font-semibold"></h2>
<div className="flex flex-wrap items-center gap-2 text-sm">
<Link href="/search?sort=composite" className="text-primary font-medium"></Link>
<Link href="/search?sort=composite" className="text-primary font-medium">
</Link>
<span className="text-muted-foreground/30">|</span>
<Link href="/search?sort=rating" className="text-muted-foreground hover:text-foreground transition-colors"></Link>
<Link
href="/search?sort=rating"
className="text-muted-foreground hover:text-foreground transition-colors"
>
</Link>
<span className="text-muted-foreground/30">|</span>
<Link href="/search?sort=orders" className="text-muted-foreground hover:text-foreground transition-colors"></Link>
<Link
href="/search?sort=orders"
className="text-muted-foreground hover:text-foreground transition-colors"
>
</Link>
<span className="text-muted-foreground/30">|</span>
<Link href="/search?sort=price_asc" className="text-muted-foreground hover:text-foreground transition-colors"></Link>
<Link
href="/search?sort=price_asc"
className="text-muted-foreground hover:text-foreground transition-colors"
>
</Link>
<span className="text-muted-foreground/30">|</span>
<Link href="/search?sort=price_desc" className="text-muted-foreground hover:text-foreground transition-colors"></Link>
<Link
href="/search?sort=price_desc"
className="text-muted-foreground hover:text-foreground transition-colors"
>
</Link>
</div>
</div>
+1 -4
View File
@@ -110,10 +110,7 @@ export default async function PlayerDetailPage({ params }: { params: Promise<{ i
<TabsContent value="services" className="mt-6">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{playerServices.map((service) => (
<Card
key={service.id}
className="flex flex-col h-full"
>
<Card key={service.id} className="flex flex-col h-full">
<CardHeader>
<div className="flex justify-between items-start">
<Badge variant="outline">{service.gameName}</Badge>
-1
View File
@@ -404,7 +404,6 @@ function SearchPageContent() {
[router, searchParams],
)
useEffect(() => {
const timer = setTimeout(() => {
const urlQ = searchParams.get("q") ?? ""
+18 -18
View File
@@ -63,13 +63,13 @@
--muted-foreground: oklch(0.45 0.02 45);
--accent: oklch(0.94 0.02 45);
--accent-foreground: oklch(0.25 0.02 45);
--destructive: oklch(0.60 0.20 25);
--destructive: oklch(0.6 0.2 25);
--destructive-foreground: oklch(0.98 0.01 45);
--border: oklch(0.90 0.02 45);
--input: oklch(0.90 0.02 45);
--border: oklch(0.9 0.02 45);
--input: oklch(0.9 0.02 45);
--ring: oklch(0.65 0.22 45);
--chart-1: oklch(0.65 0.22 45);
--chart-2: oklch(0.60 0.15 180);
--chart-2: oklch(0.6 0.15 180);
--chart-3: oklch(0.55 0.15 300);
--chart-4: oklch(0.75 0.18 85);
--chart-5: oklch(0.65 0.18 15);
@@ -79,10 +79,10 @@
--sidebar-primary-foreground: oklch(0.98 0.01 45);
--sidebar-accent: oklch(0.93 0.02 45);
--sidebar-accent-foreground: oklch(0.14 0.01 45);
--sidebar-border: oklch(0.90 0.02 45);
--sidebar-border: oklch(0.9 0.02 45);
--sidebar-ring: oklch(0.65 0.22 45);
--shadow-card: 0 2px 8px -2px rgba(0,0,0,0.04), 0 4px 16px -4px rgba(0,0,0,0.02);
--shadow-card-hover: 0 8px 24px -4px rgba(0,0,0,0.08), 0 12px 32px -8px rgba(0,0,0,0.04);
--shadow-card: 0 2px 8px -2px rgba(0, 0, 0, 0.04), 0 4px 16px -4px rgba(0, 0, 0, 0.02);
--shadow-card-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 12px 32px -8px rgba(0, 0, 0, 0.04);
}
.dark {
@@ -92,34 +92,34 @@
--card-foreground: oklch(0.98 0.01 45);
--popover: oklch(0.18 0.01 45);
--popover-foreground: oklch(0.98 0.01 45);
--primary: oklch(0.70 0.22 45);
--primary: oklch(0.7 0.22 45);
--primary-foreground: oklch(0.14 0.01 45);
--secondary: oklch(0.25 0.02 45);
--secondary-foreground: oklch(0.98 0.01 45);
--muted: oklch(0.25 0.02 45);
--muted-foreground: oklch(0.70 0.02 45);
--muted-foreground: oklch(0.7 0.02 45);
--accent: oklch(0.25 0.02 45);
--accent-foreground: oklch(0.98 0.01 45);
--destructive: oklch(0.65 0.20 25);
--destructive: oklch(0.65 0.2 25);
--destructive-foreground: oklch(0.98 0.01 45);
--border: oklch(0.25 0.02 45);
--input: oklch(0.25 0.02 45);
--ring: oklch(0.70 0.22 45);
--chart-1: oklch(0.70 0.22 45);
--ring: oklch(0.7 0.22 45);
--chart-1: oklch(0.7 0.22 45);
--chart-2: oklch(0.65 0.15 180);
--chart-3: oklch(0.65 0.15 300);
--chart-4: oklch(0.80 0.18 85);
--chart-5: oklch(0.70 0.18 15);
--chart-4: oklch(0.8 0.18 85);
--chart-5: oklch(0.7 0.18 15);
--sidebar: oklch(0.18 0.01 45);
--sidebar-foreground: oklch(0.85 0.02 45);
--sidebar-primary: oklch(0.70 0.22 45);
--sidebar-primary: oklch(0.7 0.22 45);
--sidebar-primary-foreground: oklch(0.14 0.01 45);
--sidebar-accent: oklch(0.25 0.02 45);
--sidebar-accent-foreground: oklch(0.98 0.01 45);
--sidebar-border: oklch(0.25 0.02 45);
--sidebar-ring: oklch(0.70 0.22 45);
--shadow-card: 0 2px 8px -2px rgba(0,0,0,0.04), 0 4px 16px -4px rgba(0,0,0,0.02);
--shadow-card-hover: 0 8px 24px -4px rgba(0,0,0,0.08), 0 12px 32px -8px rgba(0,0,0,0.04);
--sidebar-ring: oklch(0.7 0.22 45);
--shadow-card: 0 2px 8px -2px rgba(0, 0, 0, 0.04), 0 4px 16px -4px rgba(0, 0, 0, 0.02);
--shadow-card-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 12px 32px -8px rgba(0, 0, 0, 0.04);
}
@layer base {
+21 -4
View File
@@ -121,7 +121,11 @@ export function Header() {
<>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="sm" className="hidden md:flex text-xs h-8 text-muted-foreground hover:text-foreground">
<Button
variant="ghost"
size="sm"
className="hidden md:flex text-xs h-8 text-muted-foreground hover:text-foreground"
>
{roleLabels[currentRole]}
</Button>
</DropdownMenuTrigger>
@@ -140,7 +144,12 @@ export function Header() {
</DropdownMenuContent>
</DropdownMenu>
<Button variant="ghost" size="icon" className="relative h-9 w-9 text-muted-foreground hover:text-foreground" asChild>
<Button
variant="ghost"
size="icon"
className="relative h-9 w-9 text-muted-foreground hover:text-foreground"
asChild
>
<Link href="/notifications">
<Bell className="h-4 w-4" />
{unreadCount > 0 && (
@@ -153,7 +162,11 @@ export function Header() {
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="icon" className="rounded-full h-9 w-9 text-muted-foreground hover:text-foreground">
<Button
variant="ghost"
size="icon"
className="rounded-full h-9 w-9 text-muted-foreground hover:text-foreground"
>
<Avatar className="h-7 w-7">
<AvatarImage src={user?.avatar} />
<AvatarFallback>{user?.nickname?.[0] ?? "?"}</AvatarFallback>
@@ -224,7 +237,11 @@ export function Header() {
<Sheet open={mobileOpen} onOpenChange={setMobileOpen}>
<SheetTrigger asChild>
<Button variant="ghost" size="icon" className="md:hidden h-9 w-9 text-muted-foreground hover:text-foreground">
<Button
variant="ghost"
size="icon"
className="md:hidden h-9 w-9 text-muted-foreground hover:text-foreground"
>
<Menu className="h-5 w-5" />
</Button>
</SheetTrigger>