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
ebe287ab8d
@ -19,6 +19,7 @@ import GeneralAppearance from "./GeneralAppearance";
|
|||||||
import ChatSettings from "./ChatSettings";
|
import ChatSettings from "./ChatSettings";
|
||||||
import VectorDatabase from "./VectorDatabase";
|
import VectorDatabase from "./VectorDatabase";
|
||||||
import Members from "./Members";
|
import Members from "./Members";
|
||||||
|
import useUser from "@/hooks/useUser";
|
||||||
|
|
||||||
const TABS = {
|
const TABS = {
|
||||||
"general-appearance": GeneralAppearance,
|
"general-appearance": GeneralAppearance,
|
||||||
@ -40,6 +41,7 @@ export default function WorkspaceSettings() {
|
|||||||
|
|
||||||
function ShowWorkspaceChat() {
|
function ShowWorkspaceChat() {
|
||||||
const { slug, tab } = useParams();
|
const { slug, tab } = useParams();
|
||||||
|
const { user } = useUser();
|
||||||
const [workspace, setWorkspace] = useState(null);
|
const [workspace, setWorkspace] = useState(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
@ -98,6 +100,7 @@ function ShowWorkspaceChat() {
|
|||||||
title="Members"
|
title="Members"
|
||||||
icon={<User className="h-6 w-6" />}
|
icon={<User className="h-6 w-6" />}
|
||||||
to={paths.workspace.settings.members(slug)}
|
to={paths.workspace.settings.members(slug)}
|
||||||
|
visible={["admin", "manager"].includes(user?.role)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="px-16 py-6">
|
<div className="px-16 py-6">
|
||||||
@ -108,7 +111,8 @@ function ShowWorkspaceChat() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function TabItem({ title, icon, to }) {
|
function TabItem({ title, icon, to, visible = true }) {
|
||||||
|
if (!visible) return null;
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
to={to}
|
to={to}
|
||||||
|
Loading…
Reference in New Issue
Block a user