mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-02 11:09:20 +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,
|
AuthTypeMetadata,
|
||||||
} from "@/lib/userSS";
|
} from "@/lib/userSS";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
import Image from "next/image";
|
|
||||||
import { SignInButton } from "./SignInButton";
|
import { SignInButton } from "./SignInButton";
|
||||||
import { EmailPasswordForm } from "./EmailPasswordForm";
|
import { EmailPasswordForm } from "./EmailPasswordForm";
|
||||||
import { Card, Title, Text } from "@tremor/react";
|
import { Card, Title, Text } from "@tremor/react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Logo } from "@/components/Logo";
|
import { Logo } from "@/components/Logo";
|
||||||
|
import { LoginText } from "./LoginText";
|
||||||
|
|
||||||
const Page = async ({
|
const Page = async ({
|
||||||
searchParams,
|
searchParams,
|
||||||
@ -74,7 +74,7 @@ const Page = async ({
|
|||||||
{authUrl && authTypeMetadata && (
|
{authUrl && authTypeMetadata && (
|
||||||
<>
|
<>
|
||||||
<h2 className="text-center text-xl text-strong font-bold mt-6">
|
<h2 className="text-center text-xl text-strong font-bold mt-6">
|
||||||
Log In to Danswer
|
<LoginText />
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<SignInButton
|
<SignInButton
|
||||||
@ -87,7 +87,7 @@ const Page = async ({
|
|||||||
<Card className="mt-4 w-96">
|
<Card className="mt-4 w-96">
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<Title className="mb-2 mx-auto font-bold">
|
<Title className="mb-2 mx-auto font-bold">
|
||||||
Log In to Danswer
|
<LoginText />
|
||||||
</Title>
|
</Title>
|
||||||
</div>
|
</div>
|
||||||
<EmailPasswordForm />
|
<EmailPasswordForm />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user