mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-23 13:26:41 +00:00
consistent full domain
This commit is contained in:
@@ -86,6 +86,7 @@ export default function GeneralForm() {
|
|||||||
domainId: string;
|
domainId: string;
|
||||||
subdomain?: string;
|
subdomain?: string;
|
||||||
fullDomain: string;
|
fullDomain: string;
|
||||||
|
baseDomain: string;
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
|
|
||||||
const GeneralFormSchema = z
|
const GeneralFormSchema = z
|
||||||
@@ -442,7 +443,8 @@ export default function GeneralForm() {
|
|||||||
const selected = {
|
const selected = {
|
||||||
domainId: res.domainId,
|
domainId: res.domainId,
|
||||||
subdomain: res.subdomain,
|
subdomain: res.subdomain,
|
||||||
fullDomain: res.fullDomain
|
fullDomain: res.fullDomain,
|
||||||
|
baseDomain: res.baseDomain
|
||||||
};
|
};
|
||||||
setSelectedDomain(selected);
|
setSelectedDomain(selected);
|
||||||
}}
|
}}
|
||||||
@@ -460,11 +462,8 @@ export default function GeneralForm() {
|
|||||||
: "";
|
: "";
|
||||||
|
|
||||||
const sanitizedFullDomain = sanitizedSubdomain
|
const sanitizedFullDomain = sanitizedSubdomain
|
||||||
? `${sanitizedSubdomain}.${selectedDomain.fullDomain
|
? `${sanitizedSubdomain}.${selectedDomain.baseDomain}`
|
||||||
.split(".")
|
: selectedDomain.baseDomain;
|
||||||
.slice(-2)
|
|
||||||
.join(".")}`
|
|
||||||
: selectedDomain.fullDomain;
|
|
||||||
|
|
||||||
setResourceFullDomain(sanitizedFullDomain);
|
setResourceFullDomain(sanitizedFullDomain);
|
||||||
form.setValue("domainId", selectedDomain.domainId);
|
form.setValue("domainId", selectedDomain.domainId);
|
||||||
|
|||||||
Reference in New Issue
Block a user