diff --git a/next.config.mjs b/next.config.mjs index 0646f54..2aabd79 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,6 +1,19 @@ /** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone', + async headers() { + return [ + { + source: '/:path*', + headers: [ + { + key: 'Content-Security-Policy', + value: "frame-src 'self' https://opennotebook.rnotes.online https://notebook.jeffemmett.com;", + }, + ], + }, + ]; + }, webpack: (config, { isServer, webpack }) => { // Ignore onnxruntime-node if any dependency pulls it in. // We only use the browser ONNX runtime (loaded from CDN at runtime). diff --git a/src/app/ai/page.tsx b/src/app/ai/page.tsx new file mode 100644 index 0000000..8907483 --- /dev/null +++ b/src/app/ai/page.tsx @@ -0,0 +1,48 @@ +'use client'; + +import Link from 'next/link'; +import { OpenNotebookEmbed } from '@/components/OpenNotebookEmbed'; +import { UserMenu } from '@/components/UserMenu'; +import { SearchBar } from '@/components/SearchBar'; + +export default function AIPage() { + return ( +
+ + +
+ +
+
+ ); +} diff --git a/src/app/notebooks/[id]/page.tsx b/src/app/notebooks/[id]/page.tsx index acd4b68..40e8b05 100644 --- a/src/app/notebooks/[id]/page.tsx +++ b/src/app/notebooks/[id]/page.tsx @@ -5,6 +5,7 @@ import { useParams, useRouter } from 'next/navigation'; import Link from 'next/link'; import { NoteCard } from '@/components/NoteCard'; import { CanvasEmbed } from '@/components/CanvasEmbed'; +import { OpenNotebookEmbed } from '@/components/OpenNotebookEmbed'; import { UserMenu } from '@/components/UserMenu'; import { authFetch } from '@/lib/authFetch'; import type { CanvasShapeMessage } from '@/lib/canvas-sync'; @@ -38,7 +39,7 @@ export default function NotebookDetailPage() { const [loading, setLoading] = useState(true); const [showCanvas, setShowCanvas] = useState(false); const [creatingCanvas, setCreatingCanvas] = useState(false); - const [tab, setTab] = useState<'notes' | 'pinned'>('notes'); + const [tab, setTab] = useState<'notes' | 'pinned' | 'ai'>('notes'); const fetchNotebook = useCallback(() => { fetch(`/api/notebooks/${params.id}`) @@ -207,10 +208,22 @@ export default function NotebookDetailPage() { > Pinned + - {/* Notes grid */} - {filteredNotes.length === 0 ? ( + {/* Tab content */} + {tab === 'ai' ? ( + + ) : filteredNotes.length === 0 ? (
{tab === 'pinned' ? 'No pinned notes' : 'No notes yet. Add one!'}
diff --git a/src/app/page.tsx b/src/app/page.tsx index 55a14ad..a76e0a1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -43,6 +43,12 @@ export default function HomePage() {
+ + AI + + {loading && ( +
+
+ + + + + Loading AI Notebook... +
+
+ )} +
+ + Open Full View + +
+