mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-10 20:56:39 +00:00
show the wildcard record info
This commit is contained in:
@@ -321,7 +321,6 @@ export default function CreateDomainForm({
|
|||||||
name="certResolver"
|
name="certResolver"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>{t("customResolver")}</FormLabel>
|
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("enterCustomResolver")}
|
placeholder={t("enterCustomResolver")}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ export default function DomainInfoCard({ orgId, domainId }: DomainInfoCardProps)
|
|||||||
defaultValues: {
|
defaultValues: {
|
||||||
baseDomain: "",
|
baseDomain: "",
|
||||||
type: build == "oss" || !env.flags.usePangolinDns ? "wildcard" : "ns",
|
type: build == "oss" || !env.flags.usePangolinDns ? "wildcard" : "ns",
|
||||||
certResolver: null,
|
certResolver: domain.certResolver ?? "",
|
||||||
preferWildcardCert: false
|
preferWildcardCert: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -257,8 +257,7 @@ export default function DomainInfoCard({ orgId, domainId }: DomainInfoCardProps)
|
|||||||
</AlertDescription>
|
</AlertDescription>
|
||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
{domain.type !== "wildcard" && (
|
{loadingRecords ? (
|
||||||
loadingRecords ? (
|
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{t("loadingDNSRecords", { fallback: "Loading DNS Records..." })}
|
{t("loadingDNSRecords", { fallback: "Loading DNS Records..." })}
|
||||||
</div>
|
</div>
|
||||||
@@ -269,7 +268,7 @@ export default function DomainInfoCard({ orgId, domainId }: DomainInfoCardProps)
|
|||||||
isRefreshing={isRefreshing}
|
isRefreshing={isRefreshing}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
)}
|
}
|
||||||
|
|
||||||
{/* Domain Settings - Only show for wildcard domains */}
|
{/* Domain Settings - Only show for wildcard domains */}
|
||||||
{domain.type === "wildcard" && (
|
{domain.type === "wildcard" && (
|
||||||
@@ -289,6 +288,7 @@ export default function DomainInfoCard({ orgId, domainId }: DomainInfoCardProps)
|
|||||||
className="space-y-4"
|
className="space-y-4"
|
||||||
id="domain-settings-form"
|
id="domain-settings-form"
|
||||||
>
|
>
|
||||||
|
<>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="certResolver"
|
name="certResolver"
|
||||||
@@ -325,15 +325,31 @@ export default function DomainInfoCard({ orgId, domainId }: DomainInfoCardProps)
|
|||||||
</Select>
|
</Select>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
{field.value !== null && field.value !== "default" && (
|
</FormItem>
|
||||||
<div className="space-y-2 mt-2">
|
)}
|
||||||
|
/>
|
||||||
|
{form.watch("certResolver") !== null &&
|
||||||
|
form.watch("certResolver") !== "default" && (
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="certResolver"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder={t("enterCustomResolver")}
|
placeholder={t("enterCustomResolver")}
|
||||||
value={field.value || domain.certResolver || ""}
|
value={field.value || ""}
|
||||||
onChange={(e) => field.onChange(e.target.value)}
|
onChange={(e) => field.onChange(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{form.watch("certResolver") !== null &&
|
||||||
|
form.watch("certResolver") !== "default" && (
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="preferWildcardCert"
|
name="preferWildcardCert"
|
||||||
@@ -356,11 +372,8 @@ export default function DomainInfoCard({ orgId, domainId }: DomainInfoCardProps)
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</FormItem>
|
</>
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</SettingsSectionForm>
|
</SettingsSectionForm>
|
||||||
|
|||||||
Reference in New Issue
Block a user