Whitelabelling consistency (#2058)

* add white labelling to admin sidebar

* even more consistency
This commit is contained in:
pablodanswer
2024-08-06 12:45:38 -07:00
committed by GitHub
parent dc2a50034d
commit 7f7452dc98
2 changed files with 9 additions and 2 deletions

View File

@@ -11,15 +11,18 @@ import { AIMessage, HumanMessage } from "../../message/Messages";
import { Button, Callout, Divider } from "@tremor/react";
import { useRouter } from "next/navigation";
import { Persona } from "@/app/admin/assistants/interfaces";
import { useContext } from "react";
import { SettingsContext } from "@/components/settings/SettingsProvider";
function BackToDanswerButton() {
const router = useRouter();
const enterpriseSettings = useContext(SettingsContext)?.enterpriseSettings;
return (
<div className="absolute bottom-4 w-full flex border-t border-border pt-4">
<div className="mx-auto">
<Button onClick={() => router.push("/chat")}>
Back to Danswer Chat
Back to {enterpriseSettings?.application_name || "Danswer Chat"}
</Button>
</div>
</div>

View File

@@ -67,7 +67,11 @@ export function AdminSidebar({ collections }: { collections: Collection[] }) {
<Link href={"/chat"}>
<button className="text-sm block w-52 py-2.5 flex px-2 text-left bg-background-200 hover:bg-background-200/80 cursor-pointer rounded">
<BackIcon size={20} className="text-neutral" />
<p className="ml-1">Back to Danswer</p>
<p className="ml-1">
Back to{" "}
{combinedSettings.enterpriseSettings?.application_name ||
"Danswer"}
</p>
</button>
</Link>
</div>