branding only works when licensed

This commit is contained in:
miloschwartz
2025-10-15 22:07:33 -07:00
parent 003f0cfa6d
commit 2e0ad8d262
13 changed files with 145 additions and 129 deletions

View File

@@ -16,6 +16,7 @@ import Image from "next/image";
import { cleanRedirect } from "@app/lib/cleanRedirect";
import BrandingLogo from "@app/components/BrandingLogo";
import { useTranslations } from "next-intl";
import { useLicenseStatusContext } from "@app/hooks/useLicenseStatusContext";
type DashboardLoginFormProps = {
redirect?: string;
@@ -29,18 +30,22 @@ export default function DashboardLoginForm({
const router = useRouter();
const { env } = useEnvContext();
const t = useTranslations();
const { isUnlocked } = useLicenseStatusContext();
function getSubtitle() {
return t("loginStart");
}
const logoWidth = isUnlocked() ? env.branding.logo?.authPage?.width || 175 : 175;
const logoHeight = isUnlocked() ? env.branding.logo?.authPage?.height || 58 : 58;
return (
<Card className="shadow-md w-full max-w-md">
<CardHeader className="border-b">
<div className="flex flex-row items-center justify-center">
<BrandingLogo
height={env.branding.logo?.authPage?.height || 58}
width={env.branding.logo?.authPage?.width || 175}
height={logoHeight}
width={logoWidth}
/>
</div>
<div className="text-center space-y-1 pt-3">