зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1695353 - WebExtension permission list should suppress the bullet if the list is only 1 item long. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D107876
This commit is contained in:
Родитель
7d3961b5d6
Коммит
a8930f1ebe
|
@ -102,6 +102,7 @@
|
|||
<popupnotificationcontent class="addon-webext-perm-notification-content" orient="vertical">
|
||||
<description id="addon-webext-perm-text" class="addon-webext-perm-text"/>
|
||||
<label id="addon-webext-perm-intro" class="addon-webext-perm-text"/>
|
||||
<label id="addon-webext-perm-single-entry" class="addon-webext-perm-single-entry"/>
|
||||
<html:ul id="addon-webext-perm-list" class="addon-webext-perm-list"/>
|
||||
<hbox>
|
||||
<label id="addon-webext-perm-info" is="text-link" class="popup-notification-learnmore-link"/>
|
||||
|
|
|
@ -394,11 +394,23 @@ var ExtensionsUI = {
|
|||
while (list.firstChild) {
|
||||
list.firstChild.remove();
|
||||
}
|
||||
let singleEntryEl = doc.getElementById(
|
||||
"addon-webext-perm-single-entry"
|
||||
);
|
||||
singleEntryEl.textContent = "";
|
||||
singleEntryEl.hidden = true;
|
||||
list.hidden = true;
|
||||
|
||||
for (let msg of strings.msgs) {
|
||||
let item = doc.createElementNS(HTML_NS, "li");
|
||||
item.textContent = msg;
|
||||
list.appendChild(item);
|
||||
if (strings.msgs.length === 1) {
|
||||
singleEntryEl.textContent = strings.msgs[0];
|
||||
singleEntryEl.hidden = false;
|
||||
} else if (strings.msgs.length) {
|
||||
for (let msg of strings.msgs) {
|
||||
let item = doc.createElementNS(HTML_NS, "li");
|
||||
item.textContent = msg;
|
||||
list.appendChild(item);
|
||||
}
|
||||
list.hidden = false;
|
||||
}
|
||||
} else if (topic == "swapping") {
|
||||
return true;
|
||||
|
|
|
@ -19,7 +19,12 @@ html|*.addon-webext-perm-list {
|
|||
padding-inline-start: 10px;
|
||||
}
|
||||
|
||||
.addon-webext-perm-text {
|
||||
.addon-webext-perm-single-entry {
|
||||
margin-top: 11px;
|
||||
}
|
||||
|
||||
.addon-webext-perm-text,
|
||||
.addon-webext-perm-single-entry {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче