diff --git a/src/app/favicon.ico b/public/favicon.ico similarity index 100% rename from src/app/favicon.ico rename to public/favicon.ico diff --git a/server/private/lib/config.ts b/server/private/lib/config.ts index 5337ff3f..97baf1e0 100644 --- a/server/private/lib/config.ts +++ b/server/private/lib/config.ts @@ -83,9 +83,6 @@ export class PrivateConfig { ? this.rawPrivateConfig.branding?.logo?.navbar?.height.toString() : undefined; - process.env.BRANDING_FAVICON_PATH = - this.rawPrivateConfig.branding?.favicon_path; - process.env.BRANDING_APP_NAME = this.rawPrivateConfig.branding?.app_name || "Pangolin"; @@ -95,13 +92,9 @@ export class PrivateConfig { ); } - process.env.LOGIN_PAGE_TITLE_TEXT = - this.rawPrivateConfig.branding?.login_page?.title_text || ""; process.env.LOGIN_PAGE_SUBTITLE_TEXT = this.rawPrivateConfig.branding?.login_page?.subtitle_text || ""; - process.env.SIGNUP_PAGE_TITLE_TEXT = - this.rawPrivateConfig.branding?.signup_page?.title_text || ""; process.env.SIGNUP_PAGE_SUBTITLE_TEXT = this.rawPrivateConfig.branding?.signup_page?.subtitle_text || ""; diff --git a/server/private/lib/readConfigFile.ts b/server/private/lib/readConfigFile.ts index 754a5c53..c986e62d 100644 --- a/server/private/lib/readConfigFile.ts +++ b/server/private/lib/readConfigFile.ts @@ -115,7 +115,6 @@ export const privateConfigSchema = z.object({ .optional() }) .optional(), - favicon_path: z.string().optional(), footer: z .array( z.object({ @@ -127,14 +126,12 @@ export const privateConfigSchema = z.object({ hide_auth_layout_footer: z.boolean().optional().default(false), login_page: z .object({ - subtitle_text: z.string().optional(), - title_text: z.string().optional() + subtitle_text: z.string().optional() }) .optional(), signup_page: z .object({ - subtitle_text: z.string().optional(), - title_text: z.string().optional() + subtitle_text: z.string().optional() }) .optional(), resource_auth_page: z diff --git a/server/setup/ensureSetupToken.ts b/server/setup/ensureSetupToken.ts index 1734b5e6..46a62ca5 100644 --- a/server/setup/ensureSetupToken.ts +++ b/server/setup/ensureSetupToken.ts @@ -31,7 +31,7 @@ export async function ensureSetupToken() { // If admin exists, no need for setup token if (existingAdmin) { - logger.warn("Server admin exists. Setup token generation skipped."); + logger.debug("Server admin exists. Setup token generation skipped."); return; } @@ -70,4 +70,4 @@ export async function ensureSetupToken() { console.error("Failed to ensure setup token:", error); throw error; } -} \ No newline at end of file +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 022a4d7b..36d5d2ce 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -25,19 +25,7 @@ import { TailwindIndicator } from "@app/components/TailwindIndicator"; export const metadata: Metadata = { title: `Dashboard - ${process.env.BRANDING_APP_NAME || "Pangolin"}`, - description: "", - - ...(process.env.BRANDING_FAVICON_PATH - ? { - icons: { - icon: [ - { - url: process.env.BRANDING_FAVICON_PATH as string - } - ] - } - } - : {}) + description: "" }; export const dynamic = "force-dynamic"; diff --git a/src/components/DashboardLoginForm.tsx b/src/components/DashboardLoginForm.tsx index 3274adcc..ccb5c497 100644 --- a/src/components/DashboardLoginForm.tsx +++ b/src/components/DashboardLoginForm.tsx @@ -35,6 +35,9 @@ export default function DashboardLoginForm({ const { isUnlocked } = useLicenseStatusContext(); function getSubtitle() { + if (isUnlocked() && env.branding?.loginPage?.subtitleText) { + return env.branding.loginPage.subtitleText; + } return t("loginStart"); } diff --git a/src/components/SignupForm.tsx b/src/components/SignupForm.tsx index 2eb1eeaf..42364b06 100644 --- a/src/components/SignupForm.tsx +++ b/src/components/SignupForm.tsx @@ -15,11 +15,7 @@ import { FormLabel, FormMessage } from "@/components/ui/form"; -import { - Card, - CardContent, - CardHeader, -} from "@/components/ui/card"; +import { Card, CardContent, CardHeader } from "@/components/ui/card"; import { Alert, AlertDescription } from "@/components/ui/alert"; import { Progress } from "@/components/ui/progress"; import { SignUpResponse } from "@server/routers/auth"; @@ -147,7 +143,8 @@ export default function SignupForm({ inviteId, inviteToken, termsAcceptedTimestamp: termsAgreedAt, - marketingEmailConsent: build === "saas" ? marketingEmailConsent : undefined + marketingEmailConsent: + build === "saas" ? marketingEmailConsent : undefined }) .catch((e) => { console.error(e); @@ -179,6 +176,9 @@ export default function SignupForm({ } function getSubtitle() { + if (isUnlocked() && env.branding?.signupPage?.subtitleText) { + return env.branding.signupPage.subtitleText; + } return t("authCreateAccount"); } @@ -501,7 +501,9 @@ export default function SignupForm({ { + onCheckedChange={( + checked + ) => { field.onChange(checked); handleTermsChange( checked as boolean @@ -551,12 +553,16 @@ export default function SignupForm({
- {t("signUpMarketing.keepMeInTheLoop")} + {t( + "signUpMarketing.keepMeInTheLoop" + )}
diff --git a/src/lib/pullEnv.ts b/src/lib/pullEnv.ts index c989f4bb..4e7e2981 100644 --- a/src/lib/pullEnv.ts +++ b/src/lib/pullEnv.ts @@ -89,11 +89,9 @@ export function pullEnv(): Env { } }, loginPage: { - titleText: process.env.LOGIN_PAGE_TITLE_TEXT as string, subtitleText: process.env.LOGIN_PAGE_SUBTITLE_TEXT as string }, signupPage: { - titleText: process.env.SIGNUP_PAGE_TITLE_TEXT as string, subtitleText: process.env.SIGNUP_PAGE_SUBTITLE_TEXT as string }, resourceAuthPage: { diff --git a/src/lib/types/env.ts b/src/lib/types/env.ts index 7105edb8..d4b62d10 100644 --- a/src/lib/types/env.ts +++ b/src/lib/types/env.ts @@ -50,11 +50,9 @@ export type Env = { }; }; loginPage: { - titleText?: string; subtitleText?: string; }; signupPage: { - titleText?: string; subtitleText?: string; }; resourceAuthPage: {