mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-28 12:58:41 +02:00
Whitelabelling consistency (#2058)
* add white labelling to admin sidebar * even more consistency
This commit is contained in:
@@ -11,15 +11,18 @@ import { AIMessage, HumanMessage } from "../../message/Messages";
|
|||||||
import { Button, Callout, Divider } from "@tremor/react";
|
import { Button, Callout, Divider } from "@tremor/react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Persona } from "@/app/admin/assistants/interfaces";
|
import { Persona } from "@/app/admin/assistants/interfaces";
|
||||||
|
import { useContext } from "react";
|
||||||
|
import { SettingsContext } from "@/components/settings/SettingsProvider";
|
||||||
|
|
||||||
function BackToDanswerButton() {
|
function BackToDanswerButton() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const enterpriseSettings = useContext(SettingsContext)?.enterpriseSettings;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="absolute bottom-4 w-full flex border-t border-border pt-4">
|
<div className="absolute bottom-4 w-full flex border-t border-border pt-4">
|
||||||
<div className="mx-auto">
|
<div className="mx-auto">
|
||||||
<Button onClick={() => router.push("/chat")}>
|
<Button onClick={() => router.push("/chat")}>
|
||||||
Back to Danswer Chat
|
Back to {enterpriseSettings?.application_name || "Danswer Chat"}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -67,7 +67,11 @@ export function AdminSidebar({ collections }: { collections: Collection[] }) {
|
|||||||
<Link href={"/chat"}>
|
<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">
|
<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" />
|
<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>
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user