diff options
| author | Dhravya <[email protected]> | 2024-07-01 21:36:02 -0500 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-07-01 21:36:02 -0500 |
| commit | 5d5e44a711a0a42c43be35b669b08c644ead30b7 (patch) | |
| tree | f667801436a0e28d7bac31abfc5bc2913f62eab1 /apps | |
| parent | fix access controls (diff) | |
| download | supermemory-5d5e44a711a0a42c43be35b669b08c644ead30b7.tar.xz supermemory-5d5e44a711a0a42c43be35b669b08c644ead30b7.zip | |
mobile UI fixes
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/app/(dash)/(memories)/content.tsx | 2 | ||||
| -rw-r--r-- | apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx | 13 | ||||
| -rw-r--r-- | apps/web/app/(dash)/chat/chatWindow.tsx | 4 | ||||
| -rw-r--r-- | apps/web/app/(dash)/home/page.tsx | 2 | ||||
| -rw-r--r-- | apps/web/app/(dash)/layout.tsx | 4 | ||||
| -rw-r--r-- | apps/web/app/(dash)/menu.tsx | 11 |
6 files changed, 20 insertions, 16 deletions
diff --git a/apps/web/app/(dash)/(memories)/content.tsx b/apps/web/app/(dash)/(memories)/content.tsx index 23bff46b..a7a552c7 100644 --- a/apps/web/app/(dash)/(memories)/content.tsx +++ b/apps/web/app/(dash)/(memories)/content.tsx @@ -359,7 +359,7 @@ function Filters({ filter: string; }) { return ( - <div className="flex gap-4"> + <div className="flex gap-4 flex-wrap"> {FilterMethods.map((i) => { return ( <button diff --git a/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx b/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx index 99999f8b..0bf33896 100644 --- a/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx +++ b/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx @@ -9,18 +9,13 @@ import { auth } from "@/server/auth"; async function Page({ params: { spaceid } }: { params: { spaceid: number } }) { const user = await auth(); - const hasAccess = await db.query.spacesAccess.findMany({ - where: and( - eq(spacesAccess.spaceId, spaceid), - eq(spacesAccess.userEmail, user?.user!.email!), - ), - }); - - if (!hasAccess) return redirect("/home"); - const { success, data } = await getMemoriesInsideSpace(spaceid); if (!success ?? !data) return redirect("/home"); + const hasAccess = await db.query.spacesAccess.findMany({ + where: and(eq(spacesAccess.spaceId, spaceid)), + }); + return ( <MemoriesPage memoriesAndSpaces={{ memories: data.memories, spaces: [] }} diff --git a/apps/web/app/(dash)/chat/chatWindow.tsx b/apps/web/app/(dash)/chat/chatWindow.tsx index 32c45246..7cdf7bbb 100644 --- a/apps/web/app/(dash)/chat/chatWindow.tsx +++ b/apps/web/app/(dash)/chat/chatWindow.tsx @@ -210,7 +210,7 @@ function ChatWindow({ className="max-w-3xl z-10 mx-auto relative h-full overflow-y-auto no-scrollbar" key="chat" > - <div className="w-full pt-24 mb-40"> + <div className="w-full pt-24 mb-40 px-4 md:px-0"> {chatHistory.map((chat, idx) => ( <div key={idx} className="space-y-16"> <div @@ -407,7 +407,7 @@ function ChatWindow({ ))} </div> - <div className="fixed bottom-4 w-full max-w-3xl"> + <div className="fixed bottom-24 md:bottom-4 w-full max-w-3xl"> <QueryInput mini className="w-full shadow-md" diff --git a/apps/web/app/(dash)/home/page.tsx b/apps/web/app/(dash)/home/page.tsx index f648923c..32cb5d8d 100644 --- a/apps/web/app/(dash)/home/page.tsx +++ b/apps/web/app/(dash)/home/page.tsx @@ -75,7 +75,7 @@ function Page({ }, []); return ( - <div className="max-w-3xl h-full justify-center flex mx-auto w-full flex-col"> + <div className="max-w-3xl h-full justify-center flex mx-auto w-full flex-col px-2 md:px-0"> {/* all content goes here */} {/* <div className="">hi {firstTime ? 'first time' : ''}</div> */} diff --git a/apps/web/app/(dash)/layout.tsx b/apps/web/app/(dash)/layout.tsx index 5c7921e4..e161992f 100644 --- a/apps/web/app/(dash)/layout.tsx +++ b/apps/web/app/(dash)/layout.tsx @@ -14,7 +14,7 @@ async function Layout({ children }: { children: React.ReactNode }) { return ( <main className="h-screen flex flex-col"> - <div className="fixed top-0 left-0 w-full"> + <div className="fixed top-0 left-0 w-full z-40"> <Header /> </div> @@ -28,7 +28,7 @@ async function Layout({ children }: { children: React.ReactNode }) { <Menu /> - <div className="w-full h-full px-2 md:px-0">{children}</div> + <div className="w-full h-full">{children}</div> <Toaster /> </main> diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx index 90e114de..b72efce1 100644 --- a/apps/web/app/(dash)/menu.tsx +++ b/apps/web/app/(dash)/menu.tsx @@ -34,6 +34,7 @@ import { TooltipTrigger, } from "@repo/ui/shadcn/tooltip"; import { InformationCircleIcon } from "@heroicons/react/24/outline"; +import { HomeIcon } from "@heroicons/react/24/solid"; import { createMemory, createSpace } from "../actions/doers"; import { Input } from "@repo/ui/shadcn/input"; import ComboboxWithCreate from "@repo/ui/shadcn/combobox"; @@ -332,8 +333,16 @@ function Menu() { </DialogContent> {/* Mobile Menu */} - <div className="lg:hidden fixed bottom-0 left-0 w-full p-4 bg-secondary"> + <div className="lg:hidden fixed bottom-0 left-0 w-full p-4 bg-secondary z-50 border-t-2 border-border"> <div className="flex justify-around items-center"> + <Link + href={"/"} + className={`flex flex-col items-center text-white ${"cursor-pointer"}`} + > + <HomeIcon width={24} height={24} /> + <p className="text-xs text-foreground-menu mt-2">Home</p> + </Link> + <DialogTrigger className={`flex flex-col items-center cursor-pointer text-white`} > |