This commit is contained in:
parent
925f311d20
commit
4ea6ac064d
1 changed files with 7 additions and 4 deletions
|
@ -917,6 +917,7 @@ Logic.registerPanel(P_CONTAINER_INFO, {
|
||||||
});
|
});
|
||||||
// Populating the panel: name and icon
|
// Populating the panel: name and icon
|
||||||
document.getElementById("container-info-title").textContent = identity.name;
|
document.getElementById("container-info-title").textContent = identity.name;
|
||||||
|
document.getElementById("edit-sites-assigned").setAttribute("data-identity-color", identity.color);
|
||||||
|
|
||||||
const alwaysOpen = document.querySelector("#always-open-in-info-panel");
|
const alwaysOpen = document.querySelector("#always-open-in-info-panel");
|
||||||
Utils.addEnterHandler(alwaysOpen, async () => {
|
Utils.addEnterHandler(alwaysOpen, async () => {
|
||||||
|
@ -1426,7 +1427,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, {
|
||||||
});
|
});
|
||||||
// Wildcard click-to-toggle subdomains
|
// Wildcard click-to-toggle subdomains
|
||||||
trElement.querySelectorAll(".subdomain").forEach((subdomainLink) => {
|
trElement.querySelectorAll(".subdomain").forEach((subdomainLink) => {
|
||||||
subdomainLink.addEventListener("click", async (e) => {
|
subdomainLink.addEventListener("click", (e) => {
|
||||||
const wildcardHostname = e.target.getAttribute("data-wildcardHostname");
|
const wildcardHostname = e.target.getAttribute("data-wildcardHostname");
|
||||||
Utils.setWildcardHostnameForAssignment(assumedUrl, wildcardHostname);
|
Utils.setWildcardHostnameForAssignment(assumedUrl, wildcardHostname);
|
||||||
if (wildcardHostname) {
|
if (wildcardHostname) {
|
||||||
|
@ -1453,14 +1454,14 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, {
|
||||||
if (wildcardHostname && wildcardHostname !== hostname) {
|
if (wildcardHostname && wildcardHostname !== hostname) {
|
||||||
if (hostname.endsWith(wildcardHostname)) {
|
if (hostname.endsWith(wildcardHostname)) {
|
||||||
return {
|
return {
|
||||||
wildcard: hostname.substring(0, hostname.length - wildcardHostname.length),
|
wildcard: "★",
|
||||||
remaining: wildcardHostname
|
remaining: wildcardHostname
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// In case something got corrupted, allow user to fix error
|
// In case something got corrupted, allow user to fix error
|
||||||
// by clicking "____" link to clear corrupted wildcard hostname
|
// by clicking '★' link to clear corrupted wildcard hostname
|
||||||
return {
|
return {
|
||||||
wildcard: "___",
|
wildcard: "★",
|
||||||
remaining: hostname
|
remaining: hostname
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1479,6 +1480,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, {
|
||||||
// Add wildcard subdomain(s)
|
// Add wildcard subdomain(s)
|
||||||
if (subdomains.wildcard) {
|
if (subdomains.wildcard) {
|
||||||
result.appendChild(this.assignmentSubdomainLink(null, subdomains.wildcard));
|
result.appendChild(this.assignmentSubdomainLink(null, subdomains.wildcard));
|
||||||
|
result.appendChild(document.createTextNode("."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add non-wildcard subdomains
|
// Add non-wildcard subdomains
|
||||||
|
@ -1502,6 +1504,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, {
|
||||||
result.className = "subdomain";
|
result.className = "subdomain";
|
||||||
if (wildcardHostnameOnClick) {
|
if (wildcardHostnameOnClick) {
|
||||||
result.setAttribute("data-wildcardHostname", wildcardHostnameOnClick);
|
result.setAttribute("data-wildcardHostname", wildcardHostnameOnClick);
|
||||||
|
result.title = `*.${wildcardHostnameOnClick}`;
|
||||||
} else {
|
} else {
|
||||||
result.classList.add("wildcardSubdomain");
|
result.classList.add("wildcardSubdomain");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue