From 52a311bf366e6e99f7cf004efd3633dd93d0cba9 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Mon, 3 Nov 2025 21:44:34 -0800 Subject: [PATCH] fix colors and footer --- messages/en-US.json | 3 +- server/private/lib/config.ts | 9 ++-- src/app/auth/layout.tsx | 62 +++++++++++------------ src/components/DeviceAuthConfirmation.tsx | 6 +-- src/components/ui/alert.tsx | 2 +- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index 88f48590..f531c7f9 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -2102,5 +2102,6 @@ "deviceOrganizationsAccess": "Access to all organizations your account has access to", "deviceAuthorize": "Authorize {applicationName}", "deviceConnected": "Device Connected!", - "deviceAuthorizedMessage": "Your device is authorized to access your account." + "deviceAuthorizedMessage": "Your device is authorized to access your account.", + "pangolinCloud": "Pangolin Cloud" } diff --git a/server/private/lib/config.ts b/server/private/lib/config.ts index e4a7a98b..5337ff3f 100644 --- a/server/private/lib/config.ts +++ b/server/private/lib/config.ts @@ -45,11 +45,10 @@ export class PrivateConfig { this.rawPrivateConfig = parsedPrivateConfig; - if (this.rawPrivateConfig.branding?.hide_auth_layout_footer) { - process.env.HIDE_AUTH_LAYOUT_FOOTER = JSON.stringify( - this.rawPrivateConfig.branding?.hide_auth_layout_footer - ); - } + process.env.BRANDING_HIDE_AUTH_LAYOUT_FOOTER = + this.rawPrivateConfig.branding?.hide_auth_layout_footer === true + ? "true" + : "false"; if (this.rawPrivateConfig.branding?.colors) { process.env.BRANDING_COLORS = JSON.stringify( diff --git a/src/app/auth/layout.tsx b/src/app/auth/layout.tsx index 378b62ee..47cd7944 100644 --- a/src/app/auth/layout.tsx +++ b/src/app/auth/layout.tsx @@ -76,35 +76,37 @@ export default async function AuthLayout({ children }: AuthLayoutProps) { - - {t("terms")} - - - - {t("privacy")} - - - - {t("security")} - + + {build === "oss" + ? t("communityEdition") + : build === "enterprise" + ? t("enterpriseEdition") + : t("pangolinCloud")} + + {build === "saas" && ( + <> + + + {t("terms")} + + + + {t("privacy")} + + + )} {t("docs")} - {t("communityEdition")} -
- +

{metadata.applicationName} @@ -106,11 +106,11 @@ export function DeviceAuthConfirmation({

{t("deviceExistingAccess")}

- + {t("deviceFullAccess")}
- + {t("deviceOrganizationsAccess")} diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx index fb291022..c229b619 100644 --- a/src/components/ui/alert.tsx +++ b/src/components/ui/alert.tsx @@ -16,7 +16,7 @@ const alertVariants = cva( "border-green-500/50 border bg-green-500/10 text-green-500 dark:border-success [&>svg]:text-green-500", info: "border-blue-500/50 border bg-blue-500/10 text-blue-800 dark:border-blue-400 [&>svg]:text-blue-500", warning: - "border-yellow-500/50 border bg-yellow-500/10 text-yellow-800 dark:border-yellow-400 [&>svg]:text-yellow-500" + "border-yellow-500 border text-yellow-800 bg-yellow-500/20 dark:bg-yellow-800/20 dark:text-yellow-100 dark:border-yellow-700 [&>svg]:text-yellow-500" } }, defaultVariants: {