mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 20:50:09 +01:00
Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into render
This commit is contained in:
commit
d1d29ff2e4
@ -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
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
|
31
frontend/src/components/SettingsButton/index.jsx
Normal file
31
frontend/src/components/SettingsButton/index.jsx
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
@ -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
|
||||||
|
@ -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}
|
||||||
|
@ -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>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -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]">
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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}
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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">
|
||||||
|
@ -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 />
|
||||||
|
@ -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"
|
||||||
|
@ -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"
|
||||||
|
@ -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":
|
||||||
|
@ -59,14 +59,17 @@ function adminEndpoints(app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { user: newUser, error } = await User.create(newUserParams);
|
const { user: newUser, error } = await User.create(newUserParams);
|
||||||
await EventLogs.logEvent(
|
if (!!newUser) {
|
||||||
"user_created",
|
await EventLogs.logEvent(
|
||||||
{
|
"user_created",
|
||||||
userName: newUser.username,
|
{
|
||||||
createdBy: currUser.username,
|
userName: newUser.username,
|
||||||
},
|
createdBy: currUser.username,
|
||||||
currUser.id
|
},
|
||||||
);
|
currUser.id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
response.status(200).json({ user: newUser, error });
|
response.status(200).json({ user: newUser, error });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
"@google/generative-ai": "^0.1.3",
|
"@google/generative-ai": "^0.1.3",
|
||||||
"@googleapis/youtube": "^9.0.0",
|
"@googleapis/youtube": "^9.0.0",
|
||||||
"@pinecone-database/pinecone": "^2.0.1",
|
"@pinecone-database/pinecone": "^2.0.1",
|
||||||
"@prisma/client": "5.3.0",
|
"@prisma/client": "5.3.1",
|
||||||
"@qdrant/js-client-rest": "^1.4.0",
|
"@qdrant/js-client-rest": "^1.4.0",
|
||||||
"@xenova/transformers": "^2.14.0",
|
"@xenova/transformers": "^2.14.0",
|
||||||
"@zilliz/milvus2-sdk-node": "^2.3.5",
|
"@zilliz/milvus2-sdk-node": "^2.3.5",
|
||||||
@ -52,7 +52,7 @@
|
|||||||
"openai": "^3.2.1",
|
"openai": "^3.2.1",
|
||||||
"pinecone-client": "^1.1.0",
|
"pinecone-client": "^1.1.0",
|
||||||
"posthog-node": "^3.1.1",
|
"posthog-node": "^3.1.1",
|
||||||
"prisma": "^5.3.1",
|
"prisma": "5.3.1",
|
||||||
"slugify": "^1.6.6",
|
"slugify": "^1.6.6",
|
||||||
"sqlite": "^4.2.1",
|
"sqlite": "^4.2.1",
|
||||||
"sqlite3": "^5.1.6",
|
"sqlite3": "^5.1.6",
|
||||||
@ -78,4 +78,4 @@
|
|||||||
"nodemon": "^2.0.22",
|
"nodemon": "^2.0.22",
|
||||||
"prettier": "^3.0.3"
|
"prettier": "^3.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -649,17 +649,17 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06"
|
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06"
|
||||||
integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==
|
integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==
|
||||||
|
|
||||||
"@prisma/client@5.3.0":
|
"@prisma/client@5.3.1":
|
||||||
version "5.3.0"
|
version "5.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.3.0.tgz#47f07e5639993cffcf1c740a144495410562f279"
|
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.3.1.tgz#fc7fc2d91e814cc4fe18a4bc5e78bf851c26985e"
|
||||||
integrity sha512-cduYBlwj6oBfAUx2OI5i7t3NlpVeOtkN7pAqv0cw0B6gs4y8cY1mr8ZYywja0NUCOCqEWDkcZWBTVBwm6mnRIw==
|
integrity sha512-ArOKjHwdFZIe1cGU56oIfy7wRuTn0FfZjGuU/AjgEBOQh+4rDkB6nF+AGHP8KaVpkBIiHGPQh3IpwQ3xDMdO0Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@prisma/engines-version" "5.3.0-36.e90b936d84779543cbe0e494bc8b9d7337fad8e4"
|
"@prisma/engines-version" "5.3.1-2.61e140623197a131c2a6189271ffee05a7aa9a59"
|
||||||
|
|
||||||
"@prisma/engines-version@5.3.0-36.e90b936d84779543cbe0e494bc8b9d7337fad8e4":
|
"@prisma/engines-version@5.3.1-2.61e140623197a131c2a6189271ffee05a7aa9a59":
|
||||||
version "5.3.0-36.e90b936d84779543cbe0e494bc8b9d7337fad8e4"
|
version "5.3.1-2.61e140623197a131c2a6189271ffee05a7aa9a59"
|
||||||
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.3.0-36.e90b936d84779543cbe0e494bc8b9d7337fad8e4.tgz#46ee2884e04cdba1163461ef856cec882d31c836"
|
resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.3.1-2.61e140623197a131c2a6189271ffee05a7aa9a59.tgz#7eb6f5c6b7628b8b39df55c903f411528a6f761c"
|
||||||
integrity sha512-uftIog5FQ/OUR8Vb9TzpNBJ6L+zJnBgmd1A0uPJUzuvGMU32UmeyobpdXVzST5UprKryTdWOYXQFVyiQ2OU4Nw==
|
integrity sha512-y5qbUi3ql2Xg7XraqcXEdMHh0MocBfnBzDn5GbV1xk23S3Mq8MGs+VjacTNiBh3dtEdUERCrUUG7Z3QaJ+h79w==
|
||||||
|
|
||||||
"@prisma/engines@5.3.1":
|
"@prisma/engines@5.3.1":
|
||||||
version "5.3.1"
|
version "5.3.1"
|
||||||
@ -4455,7 +4455,7 @@ prettier@^3.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
|
||||||
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==
|
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==
|
||||||
|
|
||||||
prisma@^5.3.1:
|
prisma@5.3.1:
|
||||||
version "5.3.1"
|
version "5.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.3.1.tgz#a0932c1c1a5ed4ff449d064b193d9c7e94e8bf77"
|
resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.3.1.tgz#a0932c1c1a5ed4ff449d064b193d9c7e94e8bf77"
|
||||||
integrity sha512-Wp2msQIlMPHe+5k5Od6xnsI/WNG7UJGgFUJgqv/ygc7kOECZapcSz/iU4NIEzISs3H1W9sFLjAPbg/gOqqtB7A==
|
integrity sha512-Wp2msQIlMPHe+5k5Od6xnsI/WNG7UJGgFUJgqv/ygc7kOECZapcSz/iU4NIEzISs3H1W9sFLjAPbg/gOqqtB7A==
|
||||||
|
Loading…
Reference in New Issue
Block a user