standardize and fix branding on new resources auth pages

This commit is contained in:
miloschwartz
2026-06-04 17:23:49 -07:00
parent 567ef23ac4
commit b2f1115ef8
11 changed files with 181 additions and 160 deletions

View File

@@ -22,7 +22,8 @@ import {
CardTitle,
CardDescription
} from "@app/components/ui/card";
import Link from "next/link";
import BrandedAuthSurface from "@app/components/BrandedAuthSurface";
import PoweredByPangolin from "@app/components/PoweredByPangolin";
declare module "react" {
namespace JSX {
@@ -60,10 +61,12 @@ const isIronError = (error: unknown): error is IronError => {
export default function RdpClient({
target,
error
error,
primaryColor
}: {
target: GetBrowserTargetResponse | null;
error: string | null;
primaryColor?: string | null;
}) {
const STORAGE_KEY = "pangolin_rdp_credentials";
@@ -315,20 +318,8 @@ export default function RdpClient({
if (error) {
return (
<div>
<div className="text-center mb-2">
<span className="text-sm text-muted-foreground">
Powered by{" "}
<Link
href="https://pangolin.net/"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
Pangolin
</Link>
</span>
</div>
<BrandedAuthSurface primaryColor={primaryColor}>
<PoweredByPangolin />
<Card className="w-full">
<CardHeader>
<CardTitle>RDP</CardTitle>
@@ -337,27 +328,15 @@ export default function RdpClient({
<p className="text-destructive text-sm">{error}</p>
</CardContent>
</Card>
</div>
</BrandedAuthSurface>
);
}
return (
<>
{showLogin && (
<div>
<div className="text-center mb-2">
<span className="text-sm text-muted-foreground">
Powered by{" "}
<Link
href="https://pangolin.net/"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
Pangolin
</Link>
</span>
</div>
<BrandedAuthSurface primaryColor={primaryColor}>
<PoweredByPangolin />
<Card className="w-full">
<CardHeader>
<CardTitle>Sign in to Remote Desktop</CardTitle>
@@ -441,7 +420,7 @@ export default function RdpClient({
</div>
</CardContent>
</Card>
</div>
</BrandedAuthSurface>
)}
<div