mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
fix branding favicon and subtitle texts
This commit is contained in:
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -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 || "";
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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({
|
||||
<FormControl>
|
||||
<Checkbox
|
||||
checked={field.value}
|
||||
onCheckedChange={(checked) => {
|
||||
onCheckedChange={(
|
||||
checked
|
||||
) => {
|
||||
field.onChange(checked);
|
||||
handleTermsChange(
|
||||
checked as boolean
|
||||
@@ -551,12 +553,16 @@ export default function SignupForm({
|
||||
<FormControl>
|
||||
<Checkbox
|
||||
checked={field.value}
|
||||
onCheckedChange={field.onChange}
|
||||
onCheckedChange={
|
||||
field.onChange
|
||||
}
|
||||
/>
|
||||
</FormControl>
|
||||
<div className="leading-none">
|
||||
<FormLabel className="text-sm font-normal">
|
||||
{t("signUpMarketing.keepMeInTheLoop")}
|
||||
{t(
|
||||
"signUpMarketing.keepMeInTheLoop"
|
||||
)}
|
||||
</FormLabel>
|
||||
<FormMessage />
|
||||
</div>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -50,11 +50,9 @@ export type Env = {
|
||||
};
|
||||
};
|
||||
loginPage: {
|
||||
titleText?: string;
|
||||
subtitleText?: string;
|
||||
};
|
||||
signupPage: {
|
||||
titleText?: string;
|
||||
subtitleText?: string;
|
||||
};
|
||||
resourceAuthPage: {
|
||||
|
||||
Reference in New Issue
Block a user