[STYLE] Implement new side bar menus (#815)

* WIP main sidebar designs

* hover states and active states for main sidebar

* main and settings sidebar UI updates & improve performance using Link instead of <a>

* update borders to match rest of UI in all pages

* update borders of all containers to match rest of UI

* remove unneeded conditional

* small changes to UI to conform to designs
Fix conditional hook render

* add check for roles to SettingsButton component and hide button from footer when in mobile

* typo

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
This commit is contained in:
Sean Hatfield 2024-03-06 17:22:36 -08:00 committed by GitHub
parent 31d9268ed4
commit 3cb8a80e8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 168 additions and 148 deletions

View File

@ -335,7 +335,7 @@ export default function DefaultChatContainer() {
return ( return (
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
{isMobile && <SidebarMobileHeader />} {isMobile && <SidebarMobileHeader />}
{fetchedMessages.length === 0 {fetchedMessages.length === 0

View File

@ -1,6 +1,5 @@
import System from "@/models/system"; import System from "@/models/system";
import paths from "@/utils/paths"; import paths from "@/utils/paths";
import { safeJsonParse } from "@/utils/request";
import { import {
BookOpen, BookOpen,
DiscordLogo, DiscordLogo,
@ -13,6 +12,8 @@ import {
LinkSimple, LinkSimple,
} from "@phosphor-icons/react"; } from "@phosphor-icons/react";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import SettingsButton from "../SettingsButton";
import { isMobile } from "react-device-detect";
export const MAX_ICONS = 3; export const MAX_ICONS = 3;
export const ICON_COMPONENTS = { export const ICON_COMPONENTS = {
@ -44,11 +45,12 @@ export default function Footer() {
if (!Array.isArray(footerData) || footerData.length === 0) { if (!Array.isArray(footerData) || footerData.length === 0) {
return ( return (
<div className="flex justify-center mt-2"> <div className="flex justify-center mb-2">
<div className="flex space-x-4"> <div className="flex space-x-4">
<a <a
href={paths.github()} href={paths.github()}
target="_blank" target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border" className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
> >
<GithubLogo weight="fill" className="h-5 w-5 " /> <GithubLogo weight="fill" className="h-5 w-5 " />
@ -56,6 +58,7 @@ export default function Footer() {
<a <a
href={paths.docs()} href={paths.docs()}
target="_blank" target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border" className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
> >
<BookOpen weight="fill" className="h-5 w-5 " /> <BookOpen weight="fill" className="h-5 w-5 " />
@ -63,6 +66,7 @@ export default function Footer() {
<a <a
href={paths.discord()} href={paths.discord()}
target="_blank" target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border" className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
> >
<DiscordLogo <DiscordLogo
@ -70,19 +74,21 @@ export default function Footer() {
className="h-5 w-5 stroke-slate-200 group-hover:stroke-slate-200" className="h-5 w-5 stroke-slate-200 group-hover:stroke-slate-200"
/> />
</a> </a>
{!isMobile && <SettingsButton />}
</div> </div>
</div> </div>
); );
} }
return ( return (
<div className="flex justify-center mt-2"> <div className="flex justify-center mb-2">
<div className="flex space-x-4"> <div className="flex space-x-4">
{footerData.map((item, index) => ( {footerData.map((item, index) => (
<a <a
key={index} key={index}
href={item.url} href={item.url}
target="_blank" target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border" className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
> >
{React.createElement(ICON_COMPONENTS[item.icon], { {React.createElement(ICON_COMPONENTS[item.icon], {
@ -91,6 +97,7 @@ export default function Footer() {
})} })}
</a> </a>
))} ))}
{!isMobile && <SettingsButton />}
</div> </div>
</div> </div>
); );

View File

@ -0,0 +1,31 @@
import useUser from "@/hooks/useUser";
import paths from "@/utils/paths";
import { ArrowUUpLeft, Wrench } from "@phosphor-icons/react";
import { Link } from "react-router-dom";
import { useMatch } from "react-router-dom";
export default function SettingsButton() {
const isInSettings = !!useMatch("/settings/*");
const { user } = useUser();
if (user && user?.role === "default") return null;
if (isInSettings)
return (
<Link
to={paths.home()}
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
>
<ArrowUUpLeft className="h-5 w-5" weight="fill" />
</Link>
);
return (
<Link
to={!!user?.role ? paths.settings.system() : paths.settings.appearance()}
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
>
<Wrench className="h-5 w-5" weight="fill" />
</Link>
);
}

View File

@ -13,7 +13,6 @@ import {
Database, Database,
Lock, Lock,
House, House,
X,
List, List,
FileCode, FileCode,
Plugs, Plugs,
@ -25,6 +24,7 @@ import useUser from "@/hooks/useUser";
import { USER_BACKGROUND_COLOR } from "@/utils/constants"; import { USER_BACKGROUND_COLOR } from "@/utils/constants";
import { isMobile } from "react-device-detect"; import { isMobile } from "react-device-detect";
import Footer from "../Footer"; import Footer from "../Footer";
import { Link } from "react-router-dom";
export default function SettingsSidebar() { export default function SettingsSidebar() {
const { logo } = useLogo(); const { logo } = useLogo();
@ -112,9 +112,7 @@ export default function SettingsSidebar() {
<SidebarOptions user={user} /> <SidebarOptions user={user} />
</div> </div>
</div> </div>
<div> <Footer />
<Footer />
</div>
</div> </div>
</div> </div>
</div> </div>
@ -124,50 +122,38 @@ export default function SettingsSidebar() {
} }
return ( return (
<> <div>
<Link
to={paths.home()}
className="flex shrink-0 max-w-[55%] items-center justify-start mx-[38px] my-[18px]"
>
<img
src={logo}
alt="Logo"
className="rounded max-h-[24px]"
style={{ objectFit: "contain" }}
/>
</Link>
<div <div
ref={sidebarRef} ref={sidebarRef}
style={{ height: "calc(100% - 32px)" }} style={{ height: "calc(100% - 76px)" }}
className="transition-all duration-500 relative m-[16px] rounded-[26px] bg-sidebar border-4 border-accent min-w-[250px] p-[18px]" className="transition-all duration-500 relative m-[16px] rounded-[16px] bg-sidebar border-2 border-outline min-w-[250px] p-[10px]"
> >
<div className="w-full h-full flex flex-col overflow-x-hidden items-between"> <div className="w-full h-full flex flex-col overflow-x-hidden items-between min-w-[235px]">
{/* Header Information */} <div className="text-white text-opacity-60 text-sm font-medium uppercase mt-[4px] mb-0 ml-2">
<div className="flex w-full items-center justify-between"> Instance Settings
<div className="flex shrink-0 max-w-[65%] items-center justify-start ml-2">
<img
src={logo}
alt="Logo"
className="rounded max-h-[40px]"
style={{ objectFit: "contain" }}
/>
</div>
<div className="flex gap-x-2 items-center text-slate-500">
<a
href={paths.home()}
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
>
<X className="h-4 w-4" />
</a>
</div>
</div> </div>
<div className="text-white text-opacity-60 text-sm font-medium uppercase mt-4 mb-0 ml-2"> <div className="relative h-full flex flex-col w-full justify-between pt-[10px] overflow-y-scroll no-scroll">
Settings
</div>
{/* Primary Body */}
<div className="h-full flex flex-col w-full justify-between pt-4 overflow-y-scroll no-scroll">
<div className="h-auto sidebar-items"> <div className="h-auto sidebar-items">
{/* Options */}
<div className="flex flex-col gap-y-2 h-full pb-8 overflow-y-scroll no-scroll"> <div className="flex flex-col gap-y-2 h-full pb-8 overflow-y-scroll no-scroll">
<SidebarOptions user={user} /> <SidebarOptions user={user} />
</div> </div>
</div> </div>
<div> <Footer />
<Footer />
</div>
</div> </div>
</div> </div>
</div> </div>
</> </div>
); );
} }
@ -195,24 +181,25 @@ const Option = ({
return ( return (
<> <>
<div className="flex gap-x-2 items-center justify-between text-white"> <div className="flex gap-x-2 items-center justify-between">
<a <Link
href={href} to={href}
className={` className={`
transition-all duration-[200ms] transition-all duration-[200ms]
flex flex-grow w-[75%] h-[36px] gap-x-2 py-[5px] px-4 rounded justify-start items-center border flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-[4px] justify-start items-center
hover:bg-workspace-item-selected-gradient hover:text-white hover:font-medium
${ ${
isActive isActive
? "bg-menu-item-selected-gradient border-slate-100 border-opacity-50 font-medium" ? "bg-menu-item-selected-gradient font-medium border-outline text-white"
: "hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent" : "hover:bg-menu-item-selected-gradient text-zinc-200"
} }
`} `}
> >
{React.cloneElement(icon, { weight: isActive ? "fill" : "regular" })} {React.cloneElement(icon, { weight: isActive ? "fill" : "regular" })}
<p className="text-sm leading-loose text-opacity-60 whitespace-nowrap overflow-hidden "> <p className="text-sm leading-loose whitespace-nowrap overflow-hidden ">
{btnText} {btnText}
</p> </p>
</a> </Link>
</div> </div>
{!!subOptions && (isActive || hasActiveChild) && ( {!!subOptions && (isActive || hasActiveChild) && (
<div <div

View File

@ -11,7 +11,7 @@ import { GearSix, SquaresFour, UploadSimple } from "@phosphor-icons/react";
import truncate from "truncate"; import truncate from "truncate";
import useUser from "@/hooks/useUser"; import useUser from "@/hooks/useUser";
import ThreadContainer from "./ThreadContainer"; import ThreadContainer from "./ThreadContainer";
import { Link } from "react-router-dom"; import { Link, useMatch } from "react-router-dom";
export default function ActiveWorkspaces() { export default function ActiveWorkspaces() {
const { slug } = useParams(); const { slug } = useParams();
@ -23,6 +23,7 @@ export default function ActiveWorkspaces() {
const [uploadHover, setUploadHover] = useState({}); const [uploadHover, setUploadHover] = useState({});
const { showing, showModal, hideModal } = useManageWorkspaceModal(); const { showing, showModal, hideModal } = useManageWorkspaceModal();
const { user } = useUser(); const { user } = useUser();
const isInWorkspaceSettings = !!useMatch("/workspace/:slug/settings/:tab");
useEffect(() => { useEffect(() => {
async function getWorkspaces() { async function getWorkspaces() {
@ -90,55 +91,60 @@ export default function ActiveWorkspaces() {
href={isActive ? null : paths.workspace.chat(workspace.slug)} href={isActive ? null : paths.workspace.chat(workspace.slug)}
className={` className={`
transition-all duration-[200ms] transition-all duration-[200ms]
flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-lg text-slate-200 justify-start items-center flex flex-grow w-[75%] gap-x-2 py-[6px] px-[12px] rounded-[4px] text-white justify-start items-center
hover:bg-workspace-item-selected-gradient hover:bg-workspace-item-selected-gradient border-outline
${ ${
isActive isActive
? "border-2 bg-workspace-item-selected-gradient border-white" ? "bg-workspace-item-selected-gradient font-medium border-none"
: "border bg-workspace-item-gradient bg-opacity-60 border-transparent hover:border-slate-100 hover:border-opacity-50" : "border-[1px]"
}`} }`}
> >
<div className="flex flex-row justify-between w-full"> <div className="flex flex-row justify-between w-full">
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<SquaresFour <SquaresFour
weight={isActive ? "fill" : "regular"} weight={isActive ? "fill" : "regular"}
className="h-5 w-5 flex-shrink-0" className="flex-shrink-0"
size={24}
/> />
<p <p
className={`text-white text-sm leading-loose font-medium whitespace-nowrap overflow-hidden ${ className={`text-[14px] leading-loose whitespace-nowrap overflow-hidden ${
isActive ? "" : "text-opacity-80" isActive ? "text-white " : "text-zinc-200"
}`} }`}
> >
{isActive || isHovered {isActive || isHovered
? truncate(workspace.name, 17) ? truncate(workspace.name, 15)
: truncate(workspace.name, 20)} : truncate(workspace.name, 20)}
</p> </p>
</div> </div>
{(isActive || isHovered || gearHover[workspace.id]) && {(isActive || isHovered || gearHover[workspace.id]) &&
user?.role !== "default" ? ( user?.role !== "default" ? (
<div className="flex items-center gap-x-2"> <div className="flex items-center gap-x-[2px]">
<button <div
type="button" className={`flex hover:bg-[#646768] p-[2px] rounded-[4px] text-[#A7A8A9] hover:text-white ${
onClick={(e) => { uploadHover[workspace.id] ? "bg-[#646768]" : ""
e.preventDefault(); }`}
setSelectedWs(workspace);
showModal();
}}
onMouseEnter={() =>
handleUploadMouseEnter(workspace.id)
}
onMouseLeave={() =>
handleUploadMouseLeave(workspace.id)
}
className="rounded-md flex items-center justify-center text-white ml-auto"
> >
<UploadSimple <button
weight={ type="button"
uploadHover[workspace.id] ? "fill" : "regular" onClick={(e) => {
e.preventDefault();
setSelectedWs(workspace);
showModal();
}}
onMouseEnter={() =>
handleUploadMouseEnter(workspace.id)
} }
className="h-[20px] w-[20px] transition-all duration-300" onMouseLeave={() =>
/> handleUploadMouseLeave(workspace.id)
</button> }
className="rounded-md flex items-center justify-center ml-auto"
>
<UploadSimple
className="h-[20px] w-[20px]"
weight="bold"
/>
</button>
</div>
<Link <Link
type="button" type="button"
@ -147,12 +153,21 @@ export default function ActiveWorkspaces() {
)} )}
onMouseEnter={() => handleGearMouseEnter(workspace.id)} onMouseEnter={() => handleGearMouseEnter(workspace.id)}
onMouseLeave={() => handleGearMouseLeave(workspace.id)} onMouseLeave={() => handleGearMouseLeave(workspace.id)}
className="rounded-md flex items-center justify-center text-white ml-auto" className="rounded-md flex items-center justify-center text-[#A7A8A9] hover:text-white ml-auto"
> >
<GearSix <div className="flex hover:bg-[#646768] p-[2px] rounded-[4px]">
weight={gearHover[workspace.id] ? "fill" : "regular"} <GearSix
className="h-[20px] w-[20px] transition-all duration-300" color={
/> isInWorkspaceSettings && workspace.slug === slug
? "#46C8FF"
: gearHover[workspace.id]
? "#FFFFFF"
: "#A7A8A9"
}
weight="bold"
className="h-[20px] w-[20px]"
/>
</div>
</Link> </Link>
</div> </div>
) : null} ) : null}

View File

@ -1,14 +1,16 @@
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { Wrench, Plus, List } from "@phosphor-icons/react"; import { Plus, List } from "@phosphor-icons/react";
import NewWorkspaceModal, { import NewWorkspaceModal, {
useNewWorkspaceModal, useNewWorkspaceModal,
} from "../Modals/NewWorkspace"; } from "../Modals/NewWorkspace";
import ActiveWorkspaces from "./ActiveWorkspaces"; import ActiveWorkspaces from "./ActiveWorkspaces";
import paths from "@/utils/paths";
import { USER_BACKGROUND_COLOR } from "@/utils/constants"; import { USER_BACKGROUND_COLOR } from "@/utils/constants";
import useLogo from "@/hooks/useLogo"; import useLogo from "@/hooks/useLogo";
import useUser from "@/hooks/useUser"; import useUser from "@/hooks/useUser";
import Footer from "../Footer"; import Footer from "../Footer";
import SettingsButton from "../SettingsButton";
import { Link } from "react-router-dom";
import paths from "@/utils/paths";
export default function Sidebar() { export default function Sidebar() {
const { user } = useUser(); const { user } = useUser();
@ -21,40 +23,33 @@ export default function Sidebar() {
} = useNewWorkspaceModal(); } = useNewWorkspaceModal();
return ( return (
<> <div>
<Link
to={paths.home()}
className="flex shrink-0 max-w-[55%] items-center justify-start mx-[38px] my-[18px]"
>
<img
src={logo}
alt="Logo"
className="rounded max-h-[24px]"
style={{ objectFit: "contain" }}
/>
</Link>
<div <div
ref={sidebarRef} ref={sidebarRef}
style={{ height: "calc(100% - 32px)" }} style={{ height: "calc(100% - 76px)" }}
className="transition-all duration-500 relative m-[16px] rounded-[26px] bg-sidebar border-4 border-accent min-w-[250px] p-[18px]" className="transition-all pt-[11px] px-[10px] duration-500 relative m-[16px] rounded-[16px] bg-sidebar border-2 border-outline min-w-[250px]"
> >
<div className="flex flex-col h-full overflow-x-hidden"> <div className="flex flex-col h-full overflow-x-hidden">
{/* Header Information */} <div className="flex-grow flex flex-col w-[235px]">
<div className="flex items-center justify-between mb-4">
<div className="flex shrink-0 max-w-[65%] items-center justify-start">
<img
src={logo}
alt="Logo"
className="rounded max-h-[40px]"
style={{ objectFit: "contain" }}
/>
</div>
{(!user || user?.role !== "default") && (
<div className="flex gap-x-2 items-center text-slate-200">
<SettingsButton />
</div>
)}
</div>
{/* Primary Body */}
<div className="flex-grow flex flex-col">
<div className="flex flex-col gap-y-2 pb-8 overflow-y-scroll no-scroll"> <div className="flex flex-col gap-y-2 pb-8 overflow-y-scroll no-scroll">
<div className="flex gap-x-2 items-center justify-between"> <div className="flex gap-x-2 items-center justify-between">
{(!user || user?.role !== "default") && ( {(!user || user?.role !== "default") && (
<button <button
onClick={showNewWsModal} onClick={showNewWsModal}
className="flex flex-grow w-[75%] h-[44px] gap-x-2 py-[5px] px-4 mb-2 bg-white rounded-lg text-sidebar justify-center items-center hover:bg-opacity-80 transition-all duration-300" className="flex flex-grow w-[75%] h-[44px] gap-x-2 py-[5px] px-2.5 mb-2 bg-white rounded-[8px] text-sidebar justify-center items-center hover:bg-opacity-80 transition-all duration-300"
> >
<Plus className="h-5 w-5" /> <Plus size={18} weight="bold" />
<p className="text-sidebar text-sm font-semibold"> <p className="text-sidebar text-sm font-semibold">
New Workspace New Workspace
</p> </p>
@ -70,7 +65,7 @@ export default function Sidebar() {
</div> </div>
</div> </div>
{showingNewWsModal && <NewWorkspaceModal hideModal={hideNewWsModal} />} {showingNewWsModal && <NewWorkspaceModal hideModal={hideNewWsModal} />}
</> </div>
); );
} }
@ -149,11 +144,9 @@ export function SidebarMobileHeader() {
style={{ objectFit: "contain" }} style={{ objectFit: "contain" }}
/> />
</div> </div>
{(!user || user?.role !== "default") && ( <div className="flex gap-x-2 items-center text-slate-500 shrink-0">
<div className="flex gap-x-2 items-center text-slate-500 shink-0"> <SettingsButton />
<SettingsButton /> </div>
</div>
)}
</div> </div>
{/* Primary Body */} {/* Primary Body */}
@ -190,17 +183,3 @@ export function SidebarMobileHeader() {
</> </>
); );
} }
function SettingsButton() {
const { user } = useUser();
return (
<a
href={
!!user?.role ? paths.settings.system() : paths.settings.appearance()
}
className="transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border"
>
<Wrench className="h-4 w-4" weight="fill" />
</a>
);
}

View File

@ -61,7 +61,7 @@ export default function UserButton() {
type="button" type="button"
className="uppercase transition-all duration-300 w-[35px] h-[35px] text-base font-semibold rounded-full flex items-center bg-sidebar-button hover:bg-menu-item-selected-gradient justify-center text-white p-2 hover:border-slate-100 hover:border-opacity-50 border-transparent border" className="uppercase transition-all duration-300 w-[35px] h-[35px] text-base font-semibold rounded-full flex items-center bg-sidebar-button hover:bg-menu-item-selected-gradient justify-center text-white p-2 hover:border-slate-100 hover:border-opacity-50 border-transparent border"
> >
{mode === "multi" ? userDisplay() : <Person size={14} />} {mode === "multi" ? <UserDisplay /> : <Person size={14} />}
</button> </button>
{showMenu && ( {showMenu && (
@ -109,7 +109,7 @@ export default function UserButton() {
); );
} }
function userDisplay() { function UserDisplay() {
const { pfp } = usePfp(); const { pfp } = usePfp();
const user = userFromStorage(); const user = userFromStorage();

View File

@ -108,7 +108,7 @@ export default function ChatContainer({ workspace, knownHistory = [] }) {
return ( return (
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
{isMobile && <SidebarMobileHeader />} {isMobile && <SidebarMobileHeader />}
<div className="flex flex-col h-full w-full md:mt-0 mt-[40px]"> <div className="flex flex-col h-full w-full md:mt-0 mt-[40px]">

View File

@ -18,7 +18,7 @@ export default function AdminInvites() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -30,7 +30,7 @@ export default function AdminLogs() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -43,7 +43,7 @@ export default function AdminSystem() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<form <form
onSubmit={handleSubmit} onSubmit={handleSubmit}

View File

@ -18,7 +18,7 @@ export default function AdminUsers() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -18,7 +18,7 @@ export default function AdminWorkspaces() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -20,7 +20,7 @@ export default function AdminApiKeys() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -11,7 +11,7 @@ export default function Appearance() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -90,7 +90,7 @@ export default function WorkspaceChats() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -14,7 +14,7 @@ export default function EmbedChats() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -17,7 +17,7 @@ export default function EmbedConfigs() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16"> <div className="flex flex-col w-full px-1 md:px-20 md:py-12 py-16">
<div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10"> <div className="w-full flex flex-col gap-y-1 pb-6 border-white border-b-2 border-opacity-10">

View File

@ -13,7 +13,7 @@ export default function GeneralSecurity() {
<Sidebar /> <Sidebar />
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<MultiUserMode /> <MultiUserMode />
<PasswordProtection /> <PasswordProtection />

View File

@ -165,7 +165,7 @@ export default function GeneralVectorDatabase() {
{loading ? ( {loading ? (
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent animate-pulse" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline animate-pulse"
> >
<div className="w-full h-full flex justify-center items-center"> <div className="w-full h-full flex justify-center items-center">
<PreLoader /> <PreLoader />
@ -174,7 +174,7 @@ export default function GeneralVectorDatabase() {
) : ( ) : (
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<form <form
id="vectordb-form" id="vectordb-form"

View File

@ -67,14 +67,14 @@ function ShowWorkspaceChat() {
{!isMobile && <Sidebar />} {!isMobile && <Sidebar />}
<div <div
style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }} style={{ height: isMobile ? "100%" : "calc(100% - 32px)" }}
className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[26px] bg-main-gradient w-full h-full overflow-y-scroll border-4 border-accent" className="transition-all duration-500 relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] bg-main-gradient w-full h-full overflow-y-scroll border-2 border-outline"
> >
<div className="flex gap-x-10 pt-6 pb-4 ml-16 mr-8 border-b-2 border-white border-opacity-10"> <div className="flex gap-x-10 pt-6 pb-4 ml-16 mr-8 border-b-2 border-white border-opacity-10">
<Link <Link
to={paths.workspace.chat(slug)} to={paths.workspace.chat(slug)}
className="absolute top-2 left-2 md:top-4 md:left-4 transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border z-10" className="absolute top-2 left-2 md:top-4 md:left-4 transition-all duration-300 p-2 rounded-full text-white bg-sidebar-button hover:bg-menu-item-selected-gradient hover:border-slate-100 hover:border-opacity-50 border-transparent border z-10"
> >
<ArrowUUpLeft className="h-4 w-4" /> <ArrowUUpLeft className="h-5 w-5" weight="fill" />
</Link> </Link>
<TabItem <TabItem
title="General Settings" title="General Settings"

View File

@ -24,7 +24,8 @@ export default {
"sidebar-button": "#31353A", "sidebar-button": "#31353A",
sidebar: "#25272C", sidebar: "#25272C",
"historical-msg-system": "rgba(255, 255, 255, 0.05);", "historical-msg-system": "rgba(255, 255, 255, 0.05);",
"historical-msg-user": "#2C2F35" "historical-msg-user": "#2C2F35",
outline: "#4E5153"
}, },
backgroundImage: { backgroundImage: {
"preference-gradient": "preference-gradient":