mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-18 21:14:06 +00:00
improvements in dash + chatUI
This commit is contained in:
parent
4478a4e248
commit
5fe0caabf8
11 changed files with 64 additions and 60 deletions
14
apps/web/app/(dash)/chat/page.tsx
Normal file
14
apps/web/app/(dash)/chat/page.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { chatSearchParamsCache } from "../../helpers/lib/searchParams";
|
||||
import ChatWindow from "./chatWindow";
|
||||
|
||||
function Page({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Record<string, string | string[] | undefined>;
|
||||
}) {
|
||||
const { firstTime, q, spaces } = chatSearchParamsCache.parse(searchParams);
|
||||
|
||||
return <ChatWindow q={q} spaces={spaces ?? []} />;
|
||||
}
|
||||
|
||||
export default Page;
|
||||
27
apps/web/app/(dash)/home/page.tsx
Normal file
27
apps/web/app/(dash)/home/page.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import React from "react";
|
||||
import Menu from "../menu";
|
||||
import Header from "../header";
|
||||
import QueryInput from "./queryinput";
|
||||
import { homeSearchParamsCache } from "@/app/helpers/lib/searchParams";
|
||||
|
||||
function Page({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Record<string, string | string[] | undefined>;
|
||||
}) {
|
||||
// TODO: use this to show a welcome page/modal
|
||||
const { firstTime } = homeSearchParamsCache.parse(searchParams);
|
||||
|
||||
return (
|
||||
<div className="max-w-3xl flex mx-auto w-full flex-col">
|
||||
{/* all content goes here */}
|
||||
{/* <div className="">hi {firstTime ? 'first time' : ''}</div> */}
|
||||
|
||||
<div className="w-full h-96">
|
||||
<QueryInput />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Page;
|
||||
|
|
@ -2,10 +2,9 @@
|
|||
|
||||
import { ArrowRightIcon } from "@repo/ui/icons";
|
||||
import Image from "next/image";
|
||||
import React, { useCallback, useState } from "react";
|
||||
import React, { useState } from "react";
|
||||
import Divider from "@repo/ui/shadcn/divider";
|
||||
import { MultipleSelector, Option } from "@repo/ui/shadcn/combobox";
|
||||
import { AnimatePresence } from "framer-motion";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
const OPTIONS: Option[] = [
|
||||
17
apps/web/app/(dash)/layout.tsx
Normal file
17
apps/web/app/(dash)/layout.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import React from "react";
|
||||
import Header from "./header";
|
||||
import Menu from "./menu";
|
||||
|
||||
function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<main className="h-screen flex flex-col p-4 relative">
|
||||
<Header />
|
||||
|
||||
<Menu />
|
||||
|
||||
{children}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default Layout;
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import React from "react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { MemoriesIcon, ExploreIcon, HistoryIcon } from "@repo/ui/icons";
|
||||
|
||||
function Menu() {
|
||||
5
apps/web/app/(landing)/package.json
Normal file
5
apps/web/app/(landing)/package.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"scripts": {
|
||||
"vercel-build": "next build"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
import { chatSearchParamsCache } from "../helpers/lib/searchParams";
|
||||
import Menu from "../home/menu";
|
||||
import Header from "../home/header";
|
||||
import ChatWindow from "./chatWindow";
|
||||
|
||||
function Page({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Record<string, string | string[] | undefined>;
|
||||
}) {
|
||||
const { firstTime, q, spaces } = chatSearchParamsCache.parse(searchParams);
|
||||
|
||||
return (
|
||||
<main className="h-screen flex flex-col p-4 relative">
|
||||
<Menu />
|
||||
|
||||
<Header />
|
||||
|
||||
<ChatWindow q={q} spaces={spaces ?? []} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default Page;
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import React from "react";
|
||||
import Menu from "./menu";
|
||||
import Header from "./header";
|
||||
import QueryInput from "./queryinput";
|
||||
import { homeSearchParamsCache } from "@/app/helpers/lib/searchParams";
|
||||
|
||||
function Page({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Record<string, string | string[] | undefined>;
|
||||
}) {
|
||||
// TODO: use this to show a welcome page/modal
|
||||
const { firstTime } = homeSearchParamsCache.parse(searchParams);
|
||||
|
||||
return (
|
||||
<main className="h-screen flex flex-col p-4 relative">
|
||||
<Menu />
|
||||
|
||||
<Header />
|
||||
|
||||
<div className="max-w-3xl flex mx-auto w-full flex-col">
|
||||
{/* all content goes here */}
|
||||
{/* <div className="">hi {firstTime ? 'first time' : ''}</div> */}
|
||||
|
||||
<div className="w-full h-96">
|
||||
<QueryInput />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default Page;
|
||||
Loading…
Add table
Add a link
Reference in a new issue