nip-13: improve mining error
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details

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

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

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

@ -1046,7 +1046,7 @@ function promptError(error, options = {}) {
lockScroll(); lockScroll();
errorOverlay.replaceChildren( errorOverlay.replaceChildren(
elem('h1', {className: 'error-title'}, error), 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'}, [ elem('div', {className: 'buttons'}, [
onCancel ? elem('button', {data: {action: 'close'}}, 'close') : '', onCancel ? elem('button', {data: {action: 'close'}}, 'close') : '',
onAgain ? elem('button', {data: {action: 'again'}}, 'try again') : '', onAgain ? elem('button', {data: {action: 'again'}}, 'try again') : '',

Loading…
Cancel
Save