Update button
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import { auth } from "@/lib/auth"
|
||||
import { toNextJsHandler } from "better-auth/next-js"
|
||||
|
||||
const handler = toNextJsHandler(auth)
|
||||
|
||||
export { handler as GET, handler as POST }
|
||||
export const { GET, POST } = toNextJsHandler(auth)
|
||||
@@ -9,5 +9,5 @@ export async function POST(req: Request) {
|
||||
messages,
|
||||
})
|
||||
|
||||
return result.toDataStreamResponse()
|
||||
return result.toTextStreamResponse()
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { useChat } from "ai/react"
|
||||
import { useChat } from "@ai-sdk/react"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { UserProfile } from "@/components/auth/user-profile"
|
||||
import { useSession } from "@/lib/auth-client"
|
||||
|
||||
@@ -45,24 +45,25 @@
|
||||
|
||||
:root {
|
||||
--radius: 0.625rem;
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.145 0 0);
|
||||
/* light theme (unused by default since we force dark) */
|
||||
--background: oklch(0.99 0 0);
|
||||
--foreground: oklch(0.14 0 0);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.145 0 0);
|
||||
--card-foreground: oklch(0.14 0 0);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.145 0 0);
|
||||
--primary: oklch(0.205 0 0);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--popover-foreground: oklch(0.14 0 0);
|
||||
--primary: oklch(0.55 0.16 150); /* emerald-ish */
|
||||
--primary-foreground: oklch(0.99 0 0);
|
||||
--secondary: oklch(0.97 0 0);
|
||||
--secondary-foreground: oklch(0.205 0 0);
|
||||
--muted: oklch(0.97 0 0);
|
||||
--muted-foreground: oklch(0.556 0 0);
|
||||
--accent: oklch(0.97 0 0);
|
||||
--accent-foreground: oklch(0.205 0 0);
|
||||
--secondary-foreground: oklch(0.2 0 0);
|
||||
--muted: oklch(0.95 0 0);
|
||||
--muted-foreground: oklch(0.56 0 0);
|
||||
--accent: oklch(0.9 0.08 150);
|
||||
--accent-foreground: oklch(0.2 0 0);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.922 0 0);
|
||||
--input: oklch(0.922 0 0);
|
||||
--ring: oklch(0.708 0 0);
|
||||
--border: oklch(0.9 0 0);
|
||||
--input: oklch(0.9 0 0);
|
||||
--ring: oklch(0.7 0 0);
|
||||
--chart-1: oklch(0.646 0.222 41.116);
|
||||
--chart-2: oklch(0.6 0.118 184.704);
|
||||
--chart-3: oklch(0.398 0.07 227.392);
|
||||
@@ -79,37 +80,37 @@
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: oklch(0.145 0 0);
|
||||
--foreground: oklch(0.985 0 0);
|
||||
--card: oklch(0.205 0 0);
|
||||
--card-foreground: oklch(0.985 0 0);
|
||||
--popover: oklch(0.205 0 0);
|
||||
--popover-foreground: oklch(0.985 0 0);
|
||||
--primary: oklch(0.922 0 0);
|
||||
--primary-foreground: oklch(0.205 0 0);
|
||||
--secondary: oklch(0.269 0 0);
|
||||
--secondary-foreground: oklch(0.985 0 0);
|
||||
--muted: oklch(0.269 0 0);
|
||||
--muted-foreground: oklch(0.708 0 0);
|
||||
--accent: oklch(0.269 0 0);
|
||||
--accent-foreground: oklch(0.985 0 0);
|
||||
--background: oklch(0.16 0 0);
|
||||
--foreground: oklch(0.97 0 0);
|
||||
--card: oklch(0.2 0 0);
|
||||
--card-foreground: oklch(0.98 0 0);
|
||||
--popover: oklch(0.18 0 0);
|
||||
--popover-foreground: oklch(0.98 0 0);
|
||||
--primary: oklch(0.7 0.2 150); /* vibrant emerald */
|
||||
--primary-foreground: oklch(0.13 0 0);
|
||||
--secondary: oklch(0.26 0 0);
|
||||
--secondary-foreground: oklch(0.98 0 0);
|
||||
--muted: oklch(0.26 0 0);
|
||||
--muted-foreground: oklch(0.72 0 0);
|
||||
--accent: oklch(0.32 0.03 150);
|
||||
--accent-foreground: oklch(0.98 0 0);
|
||||
--destructive: oklch(0.704 0.191 22.216);
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 15%);
|
||||
--ring: oklch(0.556 0 0);
|
||||
--chart-1: oklch(0.488 0.243 264.376);
|
||||
--chart-2: oklch(0.696 0.17 162.48);
|
||||
--chart-3: oklch(0.769 0.188 70.08);
|
||||
--chart-4: oklch(0.627 0.265 303.9);
|
||||
--chart-5: oklch(0.645 0.246 16.439);
|
||||
--sidebar: oklch(0.205 0 0);
|
||||
--sidebar-foreground: oklch(0.985 0 0);
|
||||
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.269 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.985 0 0);
|
||||
--sidebar-border: oklch(1 0 0 / 10%);
|
||||
--sidebar-ring: oklch(0.556 0 0);
|
||||
--border: color-mix(in oklab, white 12%, transparent);
|
||||
--input: color-mix(in oklab, white 16%, transparent);
|
||||
--ring: oklch(0.72 0.15 150);
|
||||
--chart-1: oklch(0.7 0.2 150);
|
||||
--chart-2: oklch(0.66 0.18 170);
|
||||
--chart-3: oklch(0.62 0.14 190);
|
||||
--chart-4: oklch(0.75 0.22 130);
|
||||
--chart-5: oklch(0.68 0.2 110);
|
||||
--sidebar: oklch(0.18 0 0);
|
||||
--sidebar-foreground: oklch(0.98 0 0);
|
||||
--sidebar-primary: oklch(0.7 0.2 150);
|
||||
--sidebar-primary-foreground: oklch(0.12 0 0);
|
||||
--sidebar-accent: oklch(0.24 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.98 0 0);
|
||||
--sidebar-border: color-mix(in oklab, white 10%, transparent);
|
||||
--sidebar-ring: oklch(0.72 0.15 150);
|
||||
}
|
||||
|
||||
@layer base {
|
||||
@@ -118,5 +119,22 @@
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
background-image:
|
||||
radial-gradient(1200px 600px at 80% -20%, color-mix(in oklab, var(--primary) 10%, transparent) 0%, transparent 60%),
|
||||
radial-gradient(800px 400px at -10% 20%, color-mix(in oklab, var(--primary) 8%, transparent) 0%, transparent 60%);
|
||||
background-attachment: fixed;
|
||||
}
|
||||
}
|
||||
|
||||
/* Subtle glow/bloom utilities for accent elements */
|
||||
@utility glow {
|
||||
box-shadow:
|
||||
0 0 0.5rem color-mix(in oklab, var(--primary) 55%, transparent),
|
||||
0 0 1.25rem color-mix(in oklab, var(--primary) 35%, transparent),
|
||||
inset 0 0 0.25rem color-mix(in oklab, var(--primary) 25%, transparent);
|
||||
}
|
||||
|
||||
@utility grain {
|
||||
background-image: linear-gradient(transparent, transparent),
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function RootLayout({
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<html lang="en" className="dark">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
|
||||
@@ -4,10 +4,14 @@ import { UserProfile } from "@/components/auth/user-profile"
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="min-h-screen flex flex-col">
|
||||
<div className="min-h-screen flex flex-col grain">
|
||||
<header className="border-b">
|
||||
<div className="container mx-auto px-4 py-4 flex justify-between items-center">
|
||||
<h1 className="text-2xl font-bold">Next.js Starter Kit</h1>
|
||||
<h1 className="text-2xl font-bold">
|
||||
<span className="bg-clip-text text-transparent [background-image:linear-gradient(90deg,color-mix(in_oklab,var(--primary)_85%,white_0%),color-mix(in_oklab,var(--primary)_50%,white_0%))]">
|
||||
Next.js Starter Kit
|
||||
</span>
|
||||
</h1>
|
||||
<UserProfile />
|
||||
</div>
|
||||
</header>
|
||||
@@ -77,7 +81,7 @@ export default function Home() {
|
||||
<div className="p-4 border rounded-lg">
|
||||
<h4 className="font-medium mb-2">3. Try the features</h4>
|
||||
<div className="space-y-2">
|
||||
<Button asChild size="sm" className="w-full">
|
||||
<Button asChild size="sm" className="w-full glow">
|
||||
<Link href="/dashboard">View Dashboard</Link>
|
||||
</Button>
|
||||
<Button asChild variant="outline" size="sm" className="w-full">
|
||||
|
||||
@@ -10,7 +10,7 @@ const buttonVariants = cva(
|
||||
variants: {
|
||||
variant: {
|
||||
default:
|
||||
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
||||
"relative bg-primary text-primary-foreground shadow-xs hover:bg-primary/90 hover:brightness-110 before:absolute before:inset-0 before:rounded-[inherit] before:opacity-0 hover:before:opacity-100 before:transition-opacity before:duration-300 before:[box-shadow:0_0_1rem_color-mix(in_oklab,var(--primary)_40%,transparent),0_0_2.2rem_color-mix(in_oklab,var(--primary)_25%,transparent)]",
|
||||
destructive:
|
||||
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
||||
outline:
|
||||
|
||||
Reference in New Issue
Block a user