diff --git a/src/css/popup.css b/src/css/popup.css index 9943326f..c924518f 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -1817,7 +1817,11 @@ manage things like container crud */ } #edit-sites-assigned .hostname .subdomain.wildcardSubdomain { - opacity: 0.2; + background-color: var(--identity-icon-color); + border-radius: 8px; + margin-right: 4px; + padding-left: 10px; + padding-right: 10px; } .assigned-sites-list > div { diff --git a/src/js/popup.js b/src/js/popup.js index 67fea6c0..b996543c 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -1377,6 +1377,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, { // Populating the panel: name and icon document.getElementById("edit-assignments-title").textContent = identity.name; + document.getElementById("edit-sites-assigned").setAttribute("data-identity-color", identity.color); const userContextId = Logic.currentUserContextId(); const assignments = await Logic.getAssignmentObjectByContainer(userContextId); @@ -1427,7 +1428,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, { }); // Wildcard click-to-toggle subdomains trElement.querySelectorAll(".subdomain").forEach((subdomainLink) => { - subdomainLink.addEventListener("click", async (e) => { + subdomainLink.addEventListener("click", (e) => { const wildcardHostname = e.target.getAttribute("data-wildcardHostname"); Utils.setWildcardHostnameForAssignment(assumedUrl, wildcardHostname); if (wildcardHostname) { @@ -1454,14 +1455,14 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, { if (wildcardHostname && wildcardHostname !== hostname) { if (hostname.endsWith(wildcardHostname)) { return { - wildcard: hostname.substring(0, hostname.length - wildcardHostname.length), + wildcard: "★", remaining: wildcardHostname }; } else { // 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 { - wildcard: "___", + wildcard: "★", remaining: hostname }; } @@ -1480,6 +1481,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, { // Add wildcard subdomain(s) if (subdomains.wildcard) { result.appendChild(this.assignmentSubdomainLink(null, subdomains.wildcard)); + result.appendChild(document.createTextNode(".")); } // Add non-wildcard subdomains @@ -1503,6 +1505,7 @@ Logic.registerPanel(P_CONTAINER_ASSIGNMENTS, { result.className = "subdomain"; if (wildcardHostnameOnClick) { result.setAttribute("data-wildcardHostname", wildcardHostnameOnClick); + result.title = `*.${wildcardHostnameOnClick}`; } else { result.classList.add("wildcardSubdomain"); }