mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
Hide cname and ns if not using dns
This commit is contained in:
@@ -119,6 +119,7 @@ export default function CreateDomainForm({
|
||||
const t = useTranslations();
|
||||
const { toast } = useToast();
|
||||
const { org } = useOrgContext();
|
||||
const { env } = useEnvContext();
|
||||
|
||||
const form = useForm<FormValues>({
|
||||
resolver: zodResolver(formSchema),
|
||||
@@ -169,7 +170,7 @@ export default function CreateDomainForm({
|
||||
}, [domainInputValue]);
|
||||
|
||||
let domainOptions: any = [];
|
||||
if (build == "enterprise" || build == "saas") {
|
||||
if (build != "oss" && env.flags.usePangolinDns) {
|
||||
domainOptions = [
|
||||
{
|
||||
id: "ns",
|
||||
@@ -182,7 +183,7 @@ export default function CreateDomainForm({
|
||||
description: t("selectDomainTypeCnameDescription")
|
||||
}
|
||||
];
|
||||
} else if (build == "oss") {
|
||||
} else {
|
||||
domainOptions = [
|
||||
{
|
||||
id: "wildcard",
|
||||
@@ -559,8 +560,7 @@ export default function CreateDomainForm({
|
||||
)}
|
||||
</div>
|
||||
|
||||
{build == "saas" ||
|
||||
(build == "enterprise" && (
|
||||
{build != "oss" && env.flags.usePangolinDns && (
|
||||
<Alert variant="destructive">
|
||||
<AlertTriangle className="h-4 w-4" />
|
||||
<AlertTitle className="font-semibold">
|
||||
@@ -572,7 +572,7 @@ export default function CreateDomainForm({
|
||||
)}
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
))}
|
||||
)}
|
||||
|
||||
<Alert variant="info">
|
||||
<AlertTriangle className="h-4 w-4" />
|
||||
|
||||
@@ -49,8 +49,8 @@ export function pullEnv(): Env {
|
||||
process.env.FLAGS_ENABLE_CLIENTS === "true" ? true : false,
|
||||
hideSupporterKey:
|
||||
process.env.HIDE_SUPPORTER_KEY === "true" ? true : false,
|
||||
generateOwnCertificates:
|
||||
process.env.GENERATE_OWN_CERTIFICATES === "true"
|
||||
usePangolinDns:
|
||||
process.env.USE_PANGOLIN_DNS === "true"
|
||||
? true
|
||||
: false
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ export type Env = {
|
||||
disableBasicWireguardSites: boolean;
|
||||
enableClients: boolean;
|
||||
hideSupporterKey: boolean;
|
||||
generateOwnCertificates: boolean;
|
||||
usePangolinDns: boolean;
|
||||
},
|
||||
branding: {
|
||||
appName?: string;
|
||||
|
||||
Reference in New Issue
Block a user