Compare commits
5 Commits
383ce4c33a
...
5fd72fc3bb
| Author | SHA1 | Date | |
|---|---|---|---|
| 5fd72fc3bb | |||
| 112ab01445 | |||
| 6818046d58 | |||
| ef035e2b7d | |||
| 1a30b729e6 |
@@ -3,7 +3,7 @@ import { Geist } from "next/font/google";
|
|||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
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 AuthSessionProvider from "@/components/SessionProvider";
|
import AuthSessionProvider from "@/components/SessionProvider";
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
|
|
||||||
|
|||||||
@@ -225,13 +225,11 @@ export default function HomePage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div onDragOver={handleDragOver} onDragLeave={handleDragLeave} onDrop={handleDrop}
|
<div onDragOver={handleDragOver} onDragLeave={handleDragLeave} onDrop={handleDrop}
|
||||||
className={`p-4 min-h-[80vh] relative rounded border-2 border-dashed transition ${isDragOver ? 'border-blue-500 bg-blue-50' : 'border-gray-300'
|
className={`p-4 min-h-[80vh] rounded border-2 border-dashed transition ${isDragOver ? 'border-blue-500 bg-blue-50' : 'border-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className='absolute bottom-0 w-full pb-4 text-gray-400'>
|
|
||||||
<div className='max-w-fit m-auto'> Drag & Drop *.ics here</div>
|
|
||||||
</div>
|
|
||||||
{/* AI Toolbar */}
|
{/* AI Toolbar */}
|
||||||
|
{status === "loading" ? <div className='mb-4 p-4 text-center animate-pulse bg-muted'>Loading...</div> : <div>
|
||||||
{session?.user ? (
|
{session?.user ? (
|
||||||
<div className="flex flex-row gap-4 mb-4 items-start">
|
<div className="flex flex-row gap-4 mb-4 items-start">
|
||||||
<div className='w-full'>
|
<div className='w-full'>
|
||||||
@@ -250,14 +248,13 @@ export default function HomePage() {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="mb-4 p-4 border border-dashed rounded-lg text-center">
|
<div className="mb-4 p-4 border border-dashed rounded-lg text-center">
|
||||||
<div className="text-sm text-muted-foreground mb-2">
|
<div className="text-sm text-muted-foreground">
|
||||||
Sign in to unlock AI-powered calendar features
|
Sign in to unlock AI natural language event creation
|
||||||
</div>
|
</div>
|
||||||
<Button variant="outline" size="sm" asChild>
|
|
||||||
<a href="/auth/signin">Sign In</a>
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
{/* Summary Panel */}
|
{/* Summary Panel */}
|
||||||
{
|
{
|
||||||
@@ -271,7 +268,16 @@ export default function HomePage() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{/* AI Actions Toolbar */}
|
||||||
|
<p className='text-muted-foreground text-sm pb-2 pl-1'>AI actions</p>
|
||||||
|
<div className="gap-2 mb-4">
|
||||||
|
<Button variant="secondary" onClick={handleAiSummarize} disabled={aiLoading}>
|
||||||
|
{aiLoading ? 'Summarizing...' : 'AI Summarize'}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Control Toolbar */}
|
{/* Control Toolbar */}
|
||||||
|
<p className='text-muted-foreground text-sm pb-2 pl-1'>Event Actions</p>
|
||||||
<div className="flex flex-wrap gap-2 mb-4">
|
<div className="flex flex-wrap gap-2 mb-4">
|
||||||
<Button onClick={() => setDialogOpen(true)}>Add Event</Button>
|
<Button onClick={() => setDialogOpen(true)}>Add Event</Button>
|
||||||
<IcsFilePicker onFileSelect={handleImport} variant='secondary'>Import .ics</IcsFilePicker>
|
<IcsFilePicker onFileSelect={handleImport} variant='secondary'>Import .ics</IcsFilePicker>
|
||||||
@@ -281,9 +287,6 @@ export default function HomePage() {
|
|||||||
<Button variant="destructive" onClick={handleClearAll}>Clear All</Button>
|
<Button variant="destructive" onClick={handleClearAll}>Clear All</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Button variant="secondary" onClick={handleAiSummarize} disabled={aiLoading}>
|
|
||||||
{aiLoading ? 'Summarizing...' : 'AI Summarize'}
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Event List */}
|
{/* Event List */}
|
||||||
@@ -322,6 +325,7 @@ export default function HomePage() {
|
|||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
{/* Add/Edit Dialog */}
|
{/* Add/Edit Dialog */}
|
||||||
<Dialog open={dialogOpen} onOpenChange={val => { if (!val) resetForm(); setDialogOpen(val) }}>
|
<Dialog open={dialogOpen} onOpenChange={val => { if (!val) resetForm(); setDialogOpen(val) }}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
@@ -355,6 +359,9 @@ export default function HomePage() {
|
|||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
<div className='mt-auto w-full pb-4 text-gray-400'>
|
||||||
|
<div className='max-w-fit m-auto'> Drag & Drop *.ics here</div>
|
||||||
|
</div>
|
||||||
</div >
|
</div >
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,14 +73,9 @@ export function RecurrencePicker({ value, onChange }: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="w-full">
|
<div className="">
|
||||||
|
<Label htmlFor="frequency" className="pt-4 pb-2 pl-1">Repeats</Label>
|
||||||
{/* <CardHeader className="pb-4">
|
|
||||||
<CardTitle className="text-base">Recurrence Settings</CardTitle>
|
|
||||||
</CardHeader> */}
|
|
||||||
<CardContent className="space-y-4">
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="frequency">Repeats</Label>
|
|
||||||
<Select value={rec.freq} onValueChange={(value) => update({ freq: value as Recurrence["freq"] })}>
|
<Select value={rec.freq} onValueChange={(value) => update({ freq: value as Recurrence["freq"] })}>
|
||||||
<SelectTrigger id="frequency">
|
<SelectTrigger id="frequency">
|
||||||
<SelectValue />
|
<SelectValue />
|
||||||
@@ -154,7 +149,6 @@ export function RecurrencePicker({ value, onChange }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</CardContent>
|
</div>
|
||||||
</Card>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,7 @@ export default function SignIn() {
|
|||||||
if (session?.user) {
|
if (session?.user) {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<span className="text-sm text-muted-foreground hidden sm:inline">
|
<Button onClick={handleSignOut} variant="ghost" size="default">
|
||||||
{session.user.name || session.user.email}
|
|
||||||
</span>
|
|
||||||
<Button onClick={handleSignOut} variant="ghost" size="sm">
|
|
||||||
Sign Out
|
Sign Out
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +32,7 @@ export default function SignIn() {
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => router.push("/auth/signin")}
|
onClick={() => router.push("/auth/signin")}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="default"
|
||||||
>
|
>
|
||||||
Sign In
|
Sign In
|
||||||
</Button>
|
</Button>
|
||||||
Reference in New Issue
Block a user