feat: multimodal AI event creation with image support #1
@@ -1,6 +1,6 @@
|
|||||||
|
import { headers } from "next/headers";
|
||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import { auth } from "@/auth";
|
import { auth } from "@/auth";
|
||||||
import { headers } from "next/headers";
|
|
||||||
import { openRouterClient } from "@/lib/openrouter-client";
|
import { openRouterClient } from "@/lib/openrouter-client";
|
||||||
|
|
||||||
export async function POST(request: Request) {
|
export async function POST(request: Request) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { auth } from "@/auth";
|
|
||||||
import { toNextJsHandler } from "better-auth/next-js";
|
import { toNextJsHandler } from "better-auth/next-js";
|
||||||
|
import { auth } from "@/auth";
|
||||||
|
|
||||||
export const { GET, POST } = toNextJsHandler(auth);
|
export const { GET, POST } = toNextJsHandler(auth);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
import { Suspense } from "react";
|
import { Suspense } from "react";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
|
|
||||||
function Search() {
|
function Search() {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { signIn, useSession } from "@/lib/auth-client";
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { toast } from "sonner";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
@@ -9,10 +12,7 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import Link from "next/link";
|
import { signIn, useSession } from "@/lib/auth-client";
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import { toast } from "sonner";
|
|
||||||
|
|
||||||
export default function SignInPage() {
|
export default function SignInPage() {
|
||||||
const { data: session, isPending } = useSession();
|
const { data: session, isPending } = useSession();
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { signOut, useSession } from "@/lib/auth-client";
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useEffect } from "react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
@@ -9,9 +11,7 @@ import {
|
|||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import Link from "next/link";
|
import { signOut, useSession } from "@/lib/auth-client";
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useEffect } from "react";
|
|
||||||
|
|
||||||
export default function SignOutPage() {
|
export default function SignOutPage() {
|
||||||
const { data: session, isPending } = useSession();
|
const { data: session, isPending } = useSession();
|
||||||
|
|||||||
@@ -5,36 +5,36 @@
|
|||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: oklch(0.9232 0.0026 48.7171);
|
--background: oklch(0.9232 0.0026 48.7171);
|
||||||
--foreground: oklch(0.2795 0.0368 260.0310);
|
--foreground: oklch(0.2795 0.0368 260.031);
|
||||||
--card: oklch(0.9699 0.0013 106.4238);
|
--card: oklch(0.9699 0.0013 106.4238);
|
||||||
--card-foreground: oklch(0.2795 0.0368 260.0310);
|
--card-foreground: oklch(0.2795 0.0368 260.031);
|
||||||
--popover: oklch(0.9699 0.0013 106.4238);
|
--popover: oklch(0.9699 0.0013 106.4238);
|
||||||
--popover-foreground: oklch(0.2795 0.0368 260.0310);
|
--popover-foreground: oklch(0.2795 0.0368 260.031);
|
||||||
--primary: oklch(0.5854 0.2041 277.1173);
|
--primary: oklch(0.5854 0.2041 277.1173);
|
||||||
--primary-foreground: oklch(1.0000 0 0);
|
--primary-foreground: oklch(1 0 0);
|
||||||
--secondary: oklch(0.8687 0.0043 56.3660);
|
--secondary: oklch(0.8687 0.0043 56.366);
|
||||||
--secondary-foreground: oklch(0.4461 0.0263 256.8018);
|
--secondary-foreground: oklch(0.4461 0.0263 256.8018);
|
||||||
--muted: oklch(0.9232 0.0026 48.7171);
|
--muted: oklch(0.9232 0.0026 48.7171);
|
||||||
--muted-foreground: oklch(0.5510 0.0234 264.3637);
|
--muted-foreground: oklch(0.551 0.0234 264.3637);
|
||||||
--accent: oklch(0.9376 0.0260 321.9388);
|
--accent: oklch(0.9376 0.026 321.9388);
|
||||||
--accent-foreground: oklch(0.3729 0.0306 259.7328);
|
--accent-foreground: oklch(0.3729 0.0306 259.7328);
|
||||||
--destructive: oklch(0.6368 0.2078 25.3313);
|
--destructive: oklch(0.6368 0.2078 25.3313);
|
||||||
--destructive-foreground: oklch(1.0000 0 0);
|
--destructive-foreground: oklch(1 0 0);
|
||||||
--border: oklch(0.8687 0.0043 56.3660);
|
--border: oklch(0.8687 0.0043 56.366);
|
||||||
--input: oklch(0.8687 0.0043 56.3660);
|
--input: oklch(0.8687 0.0043 56.366);
|
||||||
--ring: oklch(0.5854 0.2041 277.1173);
|
--ring: oklch(0.5854 0.2041 277.1173);
|
||||||
--chart-1: oklch(0.5854 0.2041 277.1173);
|
--chart-1: oklch(0.5854 0.2041 277.1173);
|
||||||
--chart-2: oklch(0.5106 0.2301 276.9656);
|
--chart-2: oklch(0.5106 0.2301 276.9656);
|
||||||
--chart-3: oklch(0.4568 0.2146 277.0229);
|
--chart-3: oklch(0.4568 0.2146 277.0229);
|
||||||
--chart-4: oklch(0.3984 0.1773 277.3662);
|
--chart-4: oklch(0.3984 0.1773 277.3662);
|
||||||
--chart-5: oklch(0.3588 0.1354 278.6973);
|
--chart-5: oklch(0.3588 0.1354 278.6973);
|
||||||
--sidebar: oklch(0.8687 0.0043 56.3660);
|
--sidebar: oklch(0.8687 0.0043 56.366);
|
||||||
--sidebar-foreground: oklch(0.2795 0.0368 260.0310);
|
--sidebar-foreground: oklch(0.2795 0.0368 260.031);
|
||||||
--sidebar-primary: oklch(0.5854 0.2041 277.1173);
|
--sidebar-primary: oklch(0.5854 0.2041 277.1173);
|
||||||
--sidebar-primary-foreground: oklch(1.0000 0 0);
|
--sidebar-primary-foreground: oklch(1 0 0);
|
||||||
--sidebar-accent: oklch(0.9376 0.0260 321.9388);
|
--sidebar-accent: oklch(0.9376 0.026 321.9388);
|
||||||
--sidebar-accent-foreground: oklch(0.3729 0.0306 259.7328);
|
--sidebar-accent-foreground: oklch(0.3729 0.0306 259.7328);
|
||||||
--sidebar-border: oklch(0.8687 0.0043 56.3660);
|
--sidebar-border: oklch(0.8687 0.0043 56.366);
|
||||||
--sidebar-ring: oklch(0.5854 0.2041 277.1173);
|
--sidebar-ring: oklch(0.5854 0.2041 277.1173);
|
||||||
--font-sans: Plus Jakarta Sans, sans-serif;
|
--font-sans: Plus Jakarta Sans, sans-serif;
|
||||||
--font-serif: Lora, serif;
|
--font-serif: Lora, serif;
|
||||||
@@ -42,33 +42,43 @@
|
|||||||
--radius: 1.25rem;
|
--radius: 1.25rem;
|
||||||
--shadow-2xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
|
--shadow-2xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
|
||||||
--shadow-xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
|
--shadow-xs: 2px 2px 10px 4px hsl(240 4% 60% / 0.09);
|
||||||
--shadow-sm: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 1px 2px 3px hsl(240 4% 60% / 0.18);
|
--shadow-sm:
|
||||||
--shadow: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 1px 2px 3px hsl(240 4% 60% / 0.18);
|
2px 2px 10px 4px hsl(240 4% 60% / 0.18),
|
||||||
--shadow-md: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 2px 4px 3px hsl(240 4% 60% / 0.18);
|
2px 1px 2px 3px hsl(240 4% 60% / 0.18);
|
||||||
--shadow-lg: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 4px 6px 3px hsl(240 4% 60% / 0.18);
|
--shadow:
|
||||||
--shadow-xl: 2px 2px 10px 4px hsl(240 4% 60% / 0.18), 2px 8px 10px 3px hsl(240 4% 60% / 0.18);
|
2px 2px 10px 4px hsl(240 4% 60% / 0.18),
|
||||||
|
2px 1px 2px 3px hsl(240 4% 60% / 0.18);
|
||||||
|
--shadow-md:
|
||||||
|
2px 2px 10px 4px hsl(240 4% 60% / 0.18),
|
||||||
|
2px 2px 4px 3px hsl(240 4% 60% / 0.18);
|
||||||
|
--shadow-lg:
|
||||||
|
2px 2px 10px 4px hsl(240 4% 60% / 0.18),
|
||||||
|
2px 4px 6px 3px hsl(240 4% 60% / 0.18);
|
||||||
|
--shadow-xl:
|
||||||
|
2px 2px 10px 4px hsl(240 4% 60% / 0.18),
|
||||||
|
2px 8px 10px 3px hsl(240 4% 60% / 0.18);
|
||||||
--shadow-2xl: 2px 2px 10px 4px hsl(240 4% 60% / 0.45);
|
--shadow-2xl: 2px 2px 10px 4px hsl(240 4% 60% / 0.45);
|
||||||
--tracking-normal: 0em;
|
--tracking-normal: 0em;
|
||||||
--spacing: 0.25rem;
|
--spacing: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark {
|
.dark {
|
||||||
--background: oklch(0.2244 0.0074 67.4370);
|
--background: oklch(0.2244 0.0074 67.437);
|
||||||
--foreground: oklch(0.9288 0.0126 255.5078);
|
--foreground: oklch(0.9288 0.0126 255.5078);
|
||||||
--card: oklch(0.2801 0.0080 59.3379);
|
--card: oklch(0.2801 0.008 59.3379);
|
||||||
--card-foreground: oklch(0.9288 0.0126 255.5078);
|
--card-foreground: oklch(0.9288 0.0126 255.5078);
|
||||||
--popover: oklch(0.2801 0.0080 59.3379);
|
--popover: oklch(0.2801 0.008 59.3379);
|
||||||
--popover-foreground: oklch(0.9288 0.0126 255.5078);
|
--popover-foreground: oklch(0.9288 0.0126 255.5078);
|
||||||
--primary: oklch(0.5994 0.1568 47.5224);
|
--primary: oklch(0.5994 0.1568 47.5224);
|
||||||
--primary-foreground: oklch(0.2244 0.0074 67.4370);
|
--primary-foreground: oklch(0.2244 0.0074 67.437);
|
||||||
--secondary: oklch(0.3359 0.0077 59.4197);
|
--secondary: oklch(0.3359 0.0077 59.4197);
|
||||||
--secondary-foreground: oklch(0.8717 0.0093 258.3382);
|
--secondary-foreground: oklch(0.8717 0.0093 258.3382);
|
||||||
--muted: oklch(0.2801 0.0080 59.3379);
|
--muted: oklch(0.2801 0.008 59.3379);
|
||||||
--muted-foreground: oklch(0.7137 0.0192 261.3246);
|
--muted-foreground: oklch(0.7137 0.0192 261.3246);
|
||||||
--accent: oklch(0.3896 0.0074 59.4734);
|
--accent: oklch(0.3896 0.0074 59.4734);
|
||||||
--accent-foreground: oklch(0.8717 0.0093 258.3382);
|
--accent-foreground: oklch(0.8717 0.0093 258.3382);
|
||||||
--destructive: oklch(0.6368 0.2078 25.3313);
|
--destructive: oklch(0.6368 0.2078 25.3313);
|
||||||
--destructive-foreground: oklch(0.2244 0.0074 67.4370);
|
--destructive-foreground: oklch(0.2244 0.0074 67.437);
|
||||||
--border: oklch(0.3359 0.0077 59.4197);
|
--border: oklch(0.3359 0.0077 59.4197);
|
||||||
--input: oklch(0.3359 0.0077 59.4197);
|
--input: oklch(0.3359 0.0077 59.4197);
|
||||||
--ring: oklch(0.6801 0.1583 276.9349);
|
--ring: oklch(0.6801 0.1583 276.9349);
|
||||||
@@ -80,7 +90,7 @@
|
|||||||
--sidebar: oklch(0.3359 0.0077 59.4197);
|
--sidebar: oklch(0.3359 0.0077 59.4197);
|
||||||
--sidebar-foreground: oklch(0.9288 0.0126 255.5078);
|
--sidebar-foreground: oklch(0.9288 0.0126 255.5078);
|
||||||
--sidebar-primary: oklch(0.6801 0.1583 276.9349);
|
--sidebar-primary: oklch(0.6801 0.1583 276.9349);
|
||||||
--sidebar-primary-foreground: oklch(0.2244 0.0074 67.4370);
|
--sidebar-primary-foreground: oklch(0.2244 0.0074 67.437);
|
||||||
--sidebar-accent: oklch(0.3896 0.0074 59.4734);
|
--sidebar-accent: oklch(0.3896 0.0074 59.4734);
|
||||||
--sidebar-accent-foreground: oklch(0.8717 0.0093 258.3382);
|
--sidebar-accent-foreground: oklch(0.8717 0.0093 258.3382);
|
||||||
--sidebar-border: oklch(0.3359 0.0077 59.4197);
|
--sidebar-border: oklch(0.3359 0.0077 59.4197);
|
||||||
@@ -91,11 +101,16 @@
|
|||||||
--radius: 1.25rem;
|
--radius: 1.25rem;
|
||||||
--shadow-2xs: 2px 2px 10px 4px hsl(0 0% 0% / 0.09);
|
--shadow-2xs: 2px 2px 10px 4px hsl(0 0% 0% / 0.09);
|
||||||
--shadow-xs: 2px 2px 10px 4px hsl(0 0% 0% / 0.09);
|
--shadow-xs: 2px 2px 10px 4px hsl(0 0% 0% / 0.09);
|
||||||
--shadow-sm: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 1px 2px 3px hsl(0 0% 0% / 0.18);
|
--shadow-sm:
|
||||||
--shadow: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 1px 2px 3px hsl(0 0% 0% / 0.18);
|
2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 1px 2px 3px hsl(0 0% 0% / 0.18);
|
||||||
--shadow-md: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 2px 4px 3px hsl(0 0% 0% / 0.18);
|
--shadow:
|
||||||
--shadow-lg: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 4px 6px 3px hsl(0 0% 0% / 0.18);
|
2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 1px 2px 3px hsl(0 0% 0% / 0.18);
|
||||||
--shadow-xl: 2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 8px 10px 3px hsl(0 0% 0% / 0.18);
|
--shadow-md:
|
||||||
|
2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 2px 4px 3px hsl(0 0% 0% / 0.18);
|
||||||
|
--shadow-lg:
|
||||||
|
2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 4px 6px 3px hsl(0 0% 0% / 0.18);
|
||||||
|
--shadow-xl:
|
||||||
|
2px 2px 10px 4px hsl(0 0% 0% / 0.18), 2px 8px 10px 3px hsl(0 0% 0% / 0.18);
|
||||||
--shadow-2xl: 2px 2px 10px 4px hsl(0 0% 0% / 0.45);
|
--shadow-2xl: 2px 2px 10px 4px hsl(0 0% 0% / 0.45);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
import { Geist, Magra } from "next/font/google";
|
import { Geist, Magra } from "next/font/google";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
import Link from "next/link";
|
||||||
import { ThemeProvider } from "next-themes";
|
import { ThemeProvider } from "next-themes";
|
||||||
import { ModeToggle } from "@/components/mode-toggle";
|
import { ModeToggle } from "@/components/mode-toggle";
|
||||||
import SignIn from "@/components/sign-in";
|
import SignIn from "@/components/sign-in";
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
const geist = Geist({
|
const geist = Geist({
|
||||||
subsets: ["latin", "cyrillic"],
|
subsets: ["latin", "cyrillic"],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { IcsFilePicker } from "@/components/ics-file-picker";
|
import { IcsFilePicker } from "@/components/ics-file-picker";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
import type { CalendarEvent } from "@/lib/types";
|
import type { CalendarEvent } from "@/lib/types";
|
||||||
|
|
||||||
interface EventActionsToolbarProps {
|
interface EventActionsToolbarProps {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
|
import { Clock, LucideMapPin, MoreHorizontal } from "lucide-react";
|
||||||
|
import { RRuleDisplay } from "@/components/rrule-display";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Card, CardHeader, CardContent } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
||||||
import { LucideMapPin, Clock, MoreHorizontal } from "lucide-react";
|
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuTrigger,
|
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
|
DropdownMenuTrigger,
|
||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { RRuleDisplay } from "@/components/rrule-display";
|
|
||||||
import type { CalendarEvent } from "@/lib/types";
|
import type { CalendarEvent } from "@/lib/types";
|
||||||
|
|
||||||
interface EventCardProps {
|
interface EventCardProps {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { RecurrencePicker } from "@/components/recurrence-picker";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
@@ -7,7 +8,6 @@ import {
|
|||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { RecurrencePicker } from "@/components/recurrence-picker";
|
|
||||||
|
|
||||||
interface EventDialogProps {
|
interface EventDialogProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Calendar1Icon } from "lucide-react";
|
import { Calendar1Icon } from "lucide-react";
|
||||||
import { EventCard } from "./event-card";
|
|
||||||
import type { CalendarEvent } from "@/lib/types";
|
import type { CalendarEvent } from "@/lib/types";
|
||||||
|
import { EventCard } from "./event-card";
|
||||||
|
|
||||||
interface EventsListProps {
|
interface EventsListProps {
|
||||||
events: CalendarEvent[];
|
events: CalendarEvent[];
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
|
import { Calendar } from "lucide-react";
|
||||||
import type React from "react";
|
import type React from "react";
|
||||||
|
|
||||||
import { useRef } from "react";
|
import { useRef } from "react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Calendar } from "lucide-react";
|
|
||||||
|
|
||||||
interface IcsFilePickerProps {
|
interface IcsFilePickerProps {
|
||||||
onFileSelect?: (file: File) => void;
|
onFileSelect?: (file: File) => void;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
import { Monitor, Moon, Sun } from "lucide-react";
|
||||||
import { Moon, Sun, Monitor } from "lucide-react";
|
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
|
import * as React from "react";
|
||||||
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import { Checkbox } from "@/components/ui/checkbox";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import {
|
import {
|
||||||
@@ -10,7 +11,6 @@ import {
|
|||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
import { Checkbox } from "@/components/ui/checkbox";
|
|
||||||
|
|
||||||
type Recurrence = {
|
type Recurrence = {
|
||||||
freq: "NONE" | "DAILY" | "WEEKLY" | "MONTHLY";
|
freq: "NONE" | "DAILY" | "WEEKLY" | "MONTHLY";
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { signOut, useSession } from "@/lib/auth-client";
|
|
||||||
import { Button } from "@/components/ui/button";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import { signOut, useSession } from "@/lib/auth-client";
|
||||||
|
|
||||||
export default function SignIn() {
|
export default function SignIn() {
|
||||||
const { data: session, isPending } = useSession();
|
const { data: session, isPending } = useSession();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
export function ThemeProvider({
|
export function ThemeProvider({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from "react";
|
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import { cva, type VariantProps } from "class-variance-authority";
|
import { cva, type VariantProps } from "class-variance-authority";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from "react";
|
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import { cva, type VariantProps } from "class-variance-authority";
|
import { cva, type VariantProps } from "class-variance-authority";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import {
|
import {
|
||||||
ChevronDownIcon,
|
ChevronDownIcon,
|
||||||
ChevronLeftIcon,
|
ChevronLeftIcon,
|
||||||
ChevronRightIcon,
|
ChevronRightIcon,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker";
|
import * as React from "react";
|
||||||
|
import {
|
||||||
import { cn } from "@/lib/utils";
|
type DayButton,
|
||||||
|
DayPicker,
|
||||||
|
getDefaultClassNames,
|
||||||
|
} from "react-day-picker";
|
||||||
import { Button, buttonVariants } from "@/components/ui/button";
|
import { Button, buttonVariants } from "@/components/ui/button";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
function Calendar({
|
function Calendar({
|
||||||
className,
|
className,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -83,10 +83,10 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
Card,
|
Card,
|
||||||
CardHeader,
|
|
||||||
CardFooter,
|
|
||||||
CardTitle,
|
|
||||||
CardAction,
|
CardAction,
|
||||||
CardDescription,
|
|
||||||
CardContent,
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
||||||
import { CheckIcon } from "lucide-react";
|
import { CheckIcon } from "lucide-react";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||||
import { XIcon } from "lucide-react";
|
import { XIcon } from "lucide-react";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
||||||
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -240,18 +240,18 @@ function DropdownMenuSubContent({
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuPortal,
|
DropdownMenuCheckboxItem,
|
||||||
DropdownMenuTrigger,
|
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuGroup,
|
DropdownMenuGroup,
|
||||||
DropdownMenuLabel,
|
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
DropdownMenuCheckboxItem,
|
DropdownMenuLabel,
|
||||||
|
DropdownMenuPortal,
|
||||||
DropdownMenuRadioGroup,
|
DropdownMenuRadioGroup,
|
||||||
DropdownMenuRadioItem,
|
DropdownMenuRadioItem,
|
||||||
DropdownMenuSeparator,
|
DropdownMenuSeparator,
|
||||||
DropdownMenuShortcut,
|
DropdownMenuShortcut,
|
||||||
DropdownMenuSub,
|
DropdownMenuSub,
|
||||||
DropdownMenuSubTrigger,
|
|
||||||
DropdownMenuSubContent,
|
DropdownMenuSubContent,
|
||||||
|
DropdownMenuSubTrigger,
|
||||||
|
DropdownMenuTrigger,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import * as LabelPrimitive from "@radix-ui/react-label";
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import * as SelectPrimitive from "@radix-ui/react-select";
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
||||||
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
||||||
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import { Toaster as Sonner, ToasterProps } from "sonner";
|
import { Toaster as Sonner, type ToasterProps } from "sonner";
|
||||||
|
|
||||||
const Toaster = ({ ...props }: ToasterProps) => {
|
const Toaster = ({ ...props }: ToasterProps) => {
|
||||||
const { theme = "system" } = useTheme();
|
const { theme = "system" } = useTheme();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import * as React from "react";
|
import type * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { pgTable, text, timestamp, boolean } from "drizzle-orm/pg-core";
|
import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
||||||
|
|
||||||
export const user = pgTable("user", {
|
export const user = pgTable("user", {
|
||||||
id: text("id").primaryKey(),
|
id: text("id").primaryKey(),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createAuthClient } from "better-auth/react";
|
|
||||||
import { genericOAuthClient } from "better-auth/client/plugins";
|
import { genericOAuthClient } from "better-auth/client/plugins";
|
||||||
|
import { createAuthClient } from "better-auth/react";
|
||||||
|
|
||||||
export const authClient = createAuthClient({
|
export const authClient = createAuthClient({
|
||||||
plugins: [genericOAuthClient()],
|
plugins: [genericOAuthClient()],
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { openDB, type IDBPDatabase } from "idb";
|
import { type IDBPDatabase, openDB } from "idb";
|
||||||
import type { CalendarEvent } from "@/lib/types";
|
import type { CalendarEvent } from "@/lib/types";
|
||||||
|
|
||||||
const DB_NAME = "LocalCalEvents";
|
const DB_NAME = "LocalCalEvents";
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import ICAL from "ical.js";
|
import ICAL from "ical.js";
|
||||||
import type { CalendarEvent } from "@/lib/types";
|
import type { CalendarEvent } from "@/lib/types";
|
||||||
import {
|
import {
|
||||||
isRecur,
|
|
||||||
isTime,
|
|
||||||
isUtcOffset,
|
|
||||||
isBinary,
|
isBinary,
|
||||||
isDuration,
|
isDuration,
|
||||||
isPeriod,
|
isPeriod,
|
||||||
|
isRecur,
|
||||||
|
isTime,
|
||||||
|
isUtcOffset,
|
||||||
} from "./ical-helpers";
|
} from "./ical-helpers";
|
||||||
|
|
||||||
function safeValueToString(
|
function safeValueToString(
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { clsx, type ClassValue } from "clsx";
|
import { type ClassValue, clsx } from "clsx";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export function cn(...inputs: ClassValue[]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user