mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 02:06:41 +00:00
♻️show org page branding section only in saas
This commit is contained in:
@@ -41,6 +41,8 @@ import {
|
|||||||
CredenzaHeader,
|
CredenzaHeader,
|
||||||
CredenzaTitle
|
CredenzaTitle
|
||||||
} from "./Credenza";
|
} from "./Credenza";
|
||||||
|
import { usePaidStatus } from "@app/hooks/usePaidStatus";
|
||||||
|
import { build } from "@server/build";
|
||||||
|
|
||||||
export type AuthPageCustomizationProps = {
|
export type AuthPageCustomizationProps = {
|
||||||
orgId: string;
|
orgId: string;
|
||||||
@@ -71,7 +73,7 @@ const AuthPageFormSchema = z.object({
|
|||||||
),
|
),
|
||||||
logoWidth: z.coerce.number().min(1),
|
logoWidth: z.coerce.number().min(1),
|
||||||
logoHeight: z.coerce.number().min(1),
|
logoHeight: z.coerce.number().min(1),
|
||||||
title: z.string(),
|
title: z.string().optional(),
|
||||||
subtitle: z.string().optional(),
|
subtitle: z.string().optional(),
|
||||||
resourceTitle: z.string(),
|
resourceTitle: z.string(),
|
||||||
resourceSubtitle: z.string().optional()
|
resourceSubtitle: z.string().optional()
|
||||||
@@ -83,6 +85,7 @@ export default function AuthPageBrandingForm({
|
|||||||
}: AuthPageCustomizationProps) {
|
}: AuthPageCustomizationProps) {
|
||||||
const env = useEnvContext();
|
const env = useEnvContext();
|
||||||
const api = createApiClient(env);
|
const api = createApiClient(env);
|
||||||
|
const { hasSaasSubscription } = usePaidStatus();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -258,58 +261,66 @@ export default function AuthPageBrandingForm({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Separator />
|
{hasSaasSubscription && (
|
||||||
|
<>
|
||||||
|
<Separator />
|
||||||
|
|
||||||
<div className="flex flex-col gap-3">
|
<div className="flex flex-col gap-3">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="title"
|
name="title"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className="md:col-span-3">
|
<FormItem className="md:col-span-3">
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{t("brandingOrgTitle")}
|
{t(
|
||||||
</FormLabel>
|
"brandingOrgTitle"
|
||||||
<FormDescription>
|
)}
|
||||||
{t(
|
</FormLabel>
|
||||||
"brandingOrgDescription",
|
<FormDescription>
|
||||||
{
|
{t(
|
||||||
orgName:
|
"brandingOrgDescription",
|
||||||
"{{orgName}}"
|
{
|
||||||
}
|
orgName:
|
||||||
)}
|
"{{orgName}}"
|
||||||
</FormDescription>
|
}
|
||||||
<FormControl>
|
)}
|
||||||
<Input {...field} />
|
</FormDescription>
|
||||||
</FormControl>
|
<FormControl>
|
||||||
<FormMessage />
|
<Input {...field} />
|
||||||
</FormItem>
|
</FormControl>
|
||||||
)}
|
<FormMessage />
|
||||||
/>
|
</FormItem>
|
||||||
<FormField
|
)}
|
||||||
control={form.control}
|
/>
|
||||||
name="subtitle"
|
<FormField
|
||||||
render={({ field }) => (
|
control={form.control}
|
||||||
<FormItem className="md:col-span-3">
|
name="subtitle"
|
||||||
<FormLabel>
|
render={({ field }) => (
|
||||||
{t("brandingOrgSubtitle")}
|
<FormItem className="md:col-span-3">
|
||||||
</FormLabel>
|
<FormLabel>
|
||||||
<FormDescription>
|
{t(
|
||||||
{t(
|
"brandingOrgSubtitle"
|
||||||
"brandingOrgDescription",
|
)}
|
||||||
{
|
</FormLabel>
|
||||||
orgName:
|
<FormDescription>
|
||||||
"{{orgName}}"
|
{t(
|
||||||
}
|
"brandingOrgDescription",
|
||||||
)}
|
{
|
||||||
</FormDescription>
|
orgName:
|
||||||
<FormControl>
|
"{{orgName}}"
|
||||||
<Input {...field} />
|
}
|
||||||
</FormControl>
|
)}
|
||||||
<FormMessage />
|
</FormDescription>
|
||||||
</FormItem>
|
<FormControl>
|
||||||
)}
|
<Input {...field} />
|
||||||
/>
|
</FormControl>
|
||||||
</div>
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user