mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-07 08:25:23 +02:00
Use custome logo if logo_url is provided in librechat.yaml else use default logo.
This commit is contained in:
parent
063d6fb721
commit
7cea11316a
1 changed files with 36 additions and 19 deletions
|
|
@ -63,14 +63,43 @@ function AuthLayout({
|
|||
<div className="relative flex min-h-screen flex-col bg-white dark:bg-gray-900">
|
||||
<Banner />
|
||||
<BlinkAnimation active={isFetching}>
|
||||
<div className="mt-6 h-10 w-full bg-cover">
|
||||
<img
|
||||
src={logo_url}
|
||||
className="h-full w-full object-contain"
|
||||
alt={localize('com_ui_logo', { 0: startupConfig?.appTitle ?? 'LibreChat' })}
|
||||
/>
|
||||
</div>
|
||||
{logo_url ? (
|
||||
<div className="mt-6 flex w-full justify-center">
|
||||
<img
|
||||
src={logo_url}
|
||||
className="max-h-64 w-auto object-contain"
|
||||
alt={localize('com_ui_logo', { 0: startupConfig?.appTitle ?? 'LibreChat' })}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="mt-6 flex w-full justify-center">
|
||||
<img
|
||||
src="assets/logo.svg"
|
||||
className="max-h-10 w-auto object-contain"
|
||||
alt={localize('com_ui_logo', { 0: startupConfig?.appTitle ?? 'LibreChat' })}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</BlinkAnimation>
|
||||
|
||||
{/* Welcome back header and login buttons below logo */}
|
||||
{!hasStartupConfigError && !isFetching && header && (
|
||||
<div className="mt-6 text-center">
|
||||
<h1
|
||||
className="mb-4 text-3xl font-semibold text-black dark:text-white"
|
||||
style={{ userSelect: 'none' }}
|
||||
>
|
||||
{header}
|
||||
</h1>
|
||||
{!pathname.includes('2fa') &&
|
||||
(pathname.includes('login') || pathname.includes('register')) && (
|
||||
<div className="mx-auto max-w-md">
|
||||
<SocialLoginRender startupConfig={startupConfig} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* ——— WELCOME SECTIONS ——— */}
|
||||
<main className="mx-auto w-full max-w-2xl space-y-8 p-6 text-black dark:text-white">
|
||||
<section>
|
||||
|
|
@ -87,19 +116,7 @@ function AuthLayout({
|
|||
|
||||
<main className="flex flex-grow items-center justify-center">
|
||||
<div className="w-authPageWidth overflow-hidden bg-white px-6 py-4 dark:bg-gray-900 sm:max-w-md sm:rounded-lg">
|
||||
{!hasStartupConfigError && !isFetching && header && (
|
||||
<h1
|
||||
className="mb-4 text-center text-3xl font-semibold text-black dark:text-white"
|
||||
style={{ userSelect: 'none' }}
|
||||
>
|
||||
{header}
|
||||
</h1>
|
||||
)}
|
||||
{children}
|
||||
{!pathname.includes('2fa') &&
|
||||
(pathname.includes('login') || pathname.includes('register')) && (
|
||||
<SocialLoginRender startupConfig={startupConfig} />
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
<Footer startupConfig={startupConfig} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue