adapt to #installed having a persistent child now
This commit is contained in:
parent
dc126e1b58
commit
3ffbce0bc7
|
@ -194,7 +194,6 @@ function showStyles(styles) {
|
|||
return;
|
||||
}
|
||||
if (!styles.length) {
|
||||
installed.textContent = '';
|
||||
installed.appendChild(template.noStyles.cloneNode(true));
|
||||
window.dispatchEvent(new Event('showStyles:done'));
|
||||
return;
|
||||
|
@ -345,12 +344,7 @@ Object.assign(handleEvent, {
|
|||
});
|
||||
if (ok) {
|
||||
deleteStyleSafe({id}).then(() => {
|
||||
// don't wait for the async notifyAllTabs as we check the children right away
|
||||
handleDelete(id);
|
||||
// update view with 'No styles installed for this site' message
|
||||
if (!installed.children.length) {
|
||||
showStyles([]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -468,7 +462,7 @@ function handleUpdate(style) {
|
|||
|
||||
function handleDelete(id) {
|
||||
$.remove(ENTRY_ID_PREFIX + id);
|
||||
if (!installed.firstElementChild) {
|
||||
if (!$('.entry')) {
|
||||
installed.appendChild(template.noStyles.cloneNode(true));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,9 +226,9 @@ body.search-results-shown {
|
|||
#search-results .search-results-nav button {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: .25rem 1rem;
|
||||
padding: 0 1rem;
|
||||
margin: 0 .5rem;
|
||||
font-size: 200%;
|
||||
font-size: 150%;
|
||||
line-height: 24px;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
|
Loading…
Reference in New Issue
Block a user