Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement: add auth header and sign up button to login page

Scott Wilsonfd054ff9bb59
diff --git a/frontend/src/components/auth/AuthPageHeader.tsx b/frontend/src/components/auth/AuthPageHeader.tsx
new file mode 100644
index 0000000000..a07e0afdb7
--- /dev/null
+++ b/frontend/src/components/auth/AuthPageHeader.tsx
@@ -0,0 +1,13 @@
+import { ReactNode } from "react";
+import { Link } from "@tanstack/react-router";
+
+type Props = { children?: ReactNode };
+
+export const AuthPageHeader = ({ children }: Props) => (
+ <header className="relative z-10 flex w-full items-center justify-between pt-4">
+ <Link to="/">
+ <img alt="Infisical" src="/images/logotransparent.png" className="h-5" />
+ </Link>
+ {children && <div className="flex items-center gap-2">{children}</div>}
+ </header>
+);
diff --git a/frontend/src/pages/auth/LoginPage/LoginPage.tsx b/frontend/src/pages/auth/LoginPage/LoginPage.tsx
index 09abb22a1d..d499573345 100644
--- a/frontend/src/pages/auth/LoginPage/LoginPage.tsx
+++ b/frontend/src/pages/auth/LoginPage/LoginPage.tsx
@@ -5,6 +5,8 @@ import { Link } from "@tanstack/react-router";
import { AuthPageBackground } from "@app/components/auth/AuthPageBackground";
import { AuthPageFooter } from "@app/components/auth/AuthPageFooter";
+import { AuthPageHeader } from "@app/components/auth/AuthPageHeader";
+import { Button } from "@app/components/v3";
import { isLoggedIn } from "@app/hooks/api/reactQuery";
import { InitialStep, SSOStep } from "./components";
@@ -66,7 +68,7 @@ export const LoginPage = ({ isAdmin }: { isAdmin?: boolean }) => {
};
return (
- <div className="relative flex max-h-screen min-h-screen flex-col overflow-y-auto bg-linear-to-tr from-card via-bunker-900 to-card px-6">
+ <div className="relative flex max-h-screen min-h-screen flex-col overflow-y-auto bg-linear-to-tr from-card via-bunker-900 to-card px-4">
<AuthPageBackground />
<Helmet>
<title>{t("common.head-title", { title: t("login.title") })}</title>
@@ -75,21 +77,12 @@ export const LoginPage = ({ isAdmin }: { isAdmin?: boolean }) => {
<meta property="og:title" content={t("login.og-title") ?? ""} />
<meta name="og:description" content={t("login.og-description") ?? ""} />
</Helmet>
- <div className="relative z-10 my-auto flex flex-col items-center py-10">
- <Link to="/">
- <div className="mb-4 flex justify-center">
- <img
- src="/images/gradientLogo.svg"
- style={{
- height: "90px",
- width: "120px"
- }}
- alt="Infisical logo"
- />
- </div>
- </Link>
- {renderView()}
- </div>
+ <AuthPageHeader>
+ <Button asChild>
+ <Link to="/signup">Sign Up</Link>
+ </Button>
+ </AuthPageHeader>
+ <div className="relative z-10 my-auto flex flex-col items-center py-10">{renderView()}</div>
<AuthPageFooter />
</div>
);