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:
prathikshaprasadsuman 2021-03-17 15:29:39 +00:00
Родитель 7d3961b5d6
Коммит a8930f1ebe
3 изменённых файлов: 23 добавлений и 5 удалений

Просмотреть файл

@ -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;
}