mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-28 12:39:54 +02:00
Add whitelabeled name to login page
This commit is contained in:
parent
694d20ea8f
commit
bdcfb39724
17
web/src/app/auth/login/LoginText.tsx
Normal file
17
web/src/app/auth/login/LoginText.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { useContext } from "react";
|
||||
import { SettingsContext } from "@/components/settings/SettingsProvider";
|
||||
|
||||
export const LoginText = () => {
|
||||
const settings = useContext(SettingsContext);
|
||||
|
||||
if (!settings) {
|
||||
throw new Error("SettingsContext is not available");
|
||||
}
|
||||
|
||||
return (
|
||||
<>Log In to {settings?.enterpriseSettings?.application_name || "Danswer"}</>
|
||||
);
|
||||
};
|
@ -7,12 +7,12 @@ import {
|
||||
AuthTypeMetadata,
|
||||
} from "@/lib/userSS";
|
||||
import { redirect } from "next/navigation";
|
||||
import Image from "next/image";
|
||||
import { SignInButton } from "./SignInButton";
|
||||
import { EmailPasswordForm } from "./EmailPasswordForm";
|
||||
import { Card, Title, Text } from "@tremor/react";
|
||||
import Link from "next/link";
|
||||
import { Logo } from "@/components/Logo";
|
||||
import { LoginText } from "./LoginText";
|
||||
|
||||
const Page = async ({
|
||||
searchParams,
|
||||
@ -74,7 +74,7 @@ const Page = async ({
|
||||
{authUrl && authTypeMetadata && (
|
||||
<>
|
||||
<h2 className="text-center text-xl text-strong font-bold mt-6">
|
||||
Log In to Danswer
|
||||
<LoginText />
|
||||
</h2>
|
||||
|
||||
<SignInButton
|
||||
@ -87,7 +87,7 @@ const Page = async ({
|
||||
<Card className="mt-4 w-96">
|
||||
<div className="flex">
|
||||
<Title className="mb-2 mx-auto font-bold">
|
||||
Log In to Danswer
|
||||
<LoginText />
|
||||
</Title>
|
||||
</div>
|
||||
<EmailPasswordForm />
|
||||
|
Loading…
x
Reference in New Issue
Block a user