nip-13: improve mining error

- fix error overlay colors in light-mode
- improve error text, mentoning what happend and what to do
OFF0 2 years ago
parent 98aa92b9ed
commit c16ccdb4e3
Signed by: offbyn
GPG Key ID: 94A2F643C51F37FA

@ -1,6 +1,7 @@
#errorOverlay {
background: var(--bgcolor-danger);
bottom: 0;
color: var(--color-danger);
display: flex;
flex-direction: column;
left: 0;
@ -17,8 +18,9 @@
}
#errorOverlay button {
background-color: rgba(0 0 0 / .5);
background-color: var(--bgcolor-danger-input);
border: none;
color: var(--color-danger);
display: inline-block;
}
#errorOverlay button:focus {

@ -32,11 +32,13 @@
html {
--bgcolor: #fdfefa;
--bgcolor-accent: #7badfc;
--bgcolor-danger: rgb(225, 40, 40);
--bgcolor-danger-input: rgba(255 255 255 / .85);
--bgcolor-inactive: #bababa;
--bgcolor-textinput: #fff;
--color: rgb(68 68 68);
--color-accent: rgb(16, 93, 176);
--bgcolor-danger: rgb(255, 80, 80);
--color-danger: #0e0e0e;
}
}
@ -44,11 +46,13 @@
html {
--bgcolor: #191919;
--bgcolor-accent: rgb(16, 93, 176);
--bgcolor-danger: rgb(169, 0, 0);
--bgcolor-danger-input: rgba(0 0 0 / .5);
--bgcolor-inactive: #434343;
--bgcolor-textinput: #0e0e0e;
--color: #e3e3e3;
--color-accent: #7b7b7b;
--bgcolor-danger: rgb(169, 0, 0);
--color-danger: #e3e3e3;
}
img {

@ -1046,7 +1046,7 @@ function promptError(error, options = {}) {
lockScroll();
errorOverlay.replaceChildren(
elem('h1', {className: 'error-title'}, error),
elem('p', {}, 'something went wrong'),
elem('p', {}, 'time ran out finding a proof with the desired mining difficulty. either try again, lower the mining difficulty or increase the timeout in profile settings.'),
elem('div', {className: 'buttons'}, [
onCancel ? elem('button', {data: {action: 'close'}}, 'close') : '',
onAgain ? elem('button', {data: {action: 'again'}}, 'try again') : '',

Loading…
Cancel
Save