show installation error inline, allow retrying
This commit is contained in:
parent
91324a4a48
commit
5453ce54c0
|
@ -228,6 +228,24 @@ body.search-results-shown {
|
||||||
cursor: help;
|
cursor: help;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[data-error] {
|
||||||
|
border: var(--pad) solid red;
|
||||||
|
border-radius: var(--pad);
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
[data-error]::after {
|
||||||
|
content: attr(data-error);
|
||||||
|
display: block;
|
||||||
|
background: red;
|
||||||
|
color: yellow;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-top: var(--pad);
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
[data-error] .search-result-description {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.search-results-nav {
|
.search-results-nav {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -412,6 +412,7 @@
|
||||||
saveScrollPosition(entry);
|
saveScrollPosition(entry);
|
||||||
installButton.disabled = true;
|
installButton.disabled = true;
|
||||||
entry.style.setProperty('pointer-events', 'none', 'important');
|
entry.style.setProperty('pointer-events', 'none', 'important');
|
||||||
|
delete entry.dataset.error;
|
||||||
if (!isUsw) {
|
if (!isUsw) {
|
||||||
// FIXME: move this to background page and create an API like installUSOStyle
|
// FIXME: move this to background page and create an API like installUSOStyle
|
||||||
result.pingbackTimer = setTimeout(download, PINGBACK_DELAY,
|
result.pingbackTimer = setTimeout(download, PINGBACK_DELAY,
|
||||||
|
@ -425,7 +426,8 @@
|
||||||
const style = await API.usercss.install({sourceCode, updateUrl});
|
const style = await API.usercss.install({sourceCode, updateUrl});
|
||||||
renderFullInfo(entry, style);
|
renderFullInfo(entry, style);
|
||||||
} catch (reason) {
|
} catch (reason) {
|
||||||
error(`Error while downloading usoID:${id}\nReason: ${reason}`);
|
entry.dataset.error = `${t('genericError')}: ${reason}`;
|
||||||
|
entry.scrollIntoView({behavior: 'smooth', block: 'nearest'});
|
||||||
}
|
}
|
||||||
$remove('.lds-spinner', entry);
|
$remove('.lds-spinner', entry);
|
||||||
installButton.disabled = false;
|
installButton.disabled = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user