Fixed UI inconsistencies when finer-grained contextual policies are created/imported by other means (thans barbaz for reporting).
This commit is contained in:
parent
2fd3b981af
commit
ba71f20474
|
@ -690,8 +690,8 @@ var UI = (() => {
|
||||||
for (let child; child = ctxSelect.firstChild;) child.remove();
|
for (let child; child = ctxSelect.firstChild;) child.remove();
|
||||||
ctxSelect.appendChild(entry("*", _("anySite")));
|
ctxSelect.appendChild(entry("*", _("anySite")));
|
||||||
if (this.mainDomain) {
|
if (this.mainDomain) {
|
||||||
let key = Sites.optimalKey(this.mainUrl);
|
const key = row.contextMatch || Sites.optimalKey(this.mainUrl);
|
||||||
ctxSelect.appendChild(entry(key, toLabel(key))).selected = key === row.contextMatch;
|
ctxSelect.appendChild(entry(key, toLabel(key))).selected = !!row.contextMatch;
|
||||||
} else {
|
} else {
|
||||||
if (!row._customPerms) row._customPerms = row.perms;
|
if (!row._customPerms) row._customPerms = row.perms;
|
||||||
let ctxSites = row._customPerms.contextual;
|
let ctxSites = row._customPerms.contextual;
|
||||||
|
@ -876,7 +876,7 @@ var UI = (() => {
|
||||||
if (!hasTemp) hasTemp = perms.temp;
|
if (!hasTemp) hasTemp = perms.temp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let top = Sites.optimalKey(this.mainUrl);
|
const top = this.mainUrl;
|
||||||
for (let site of sites) {
|
for (let site of sites) {
|
||||||
let context = top;
|
let context = top;
|
||||||
if (site.site) {
|
if (site.site) {
|
||||||
|
|
Loading…
Reference in New Issue