diff --git a/packages/backend/src/server/web/boot.css b/packages/backend/src/server/web/boot.css new file mode 100644 index 000000000..f7007f9fb --- /dev/null +++ b/packages/backend/src/server/web/boot.css @@ -0,0 +1,97 @@ +* { + font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif; +} + +body, +html { + background-color: #222; + color: #dfddcc; + justify-content: center; + margin: auto; + width: 80%; + padding: 10px; + text-align: center; +} + +button { + border-radius: 999px; + padding: 0px 12px 0px 12px; + border: none; + cursor: pointer; + margin-bottom: 12px; +} + +.button-big { + background: linear-gradient(90deg, rgb(134, 179, 0), rgb(74, 179, 0)); + line-height: 50px; +} + +.button-big:hover { + background: rgb(153, 204, 0); +} + +.button-small { + background: #444; + line-height: 40px; +} + +.button-small:hover { + background: #555; +} + +.button-label-big { + color: #222; + font-weight: bold; + font-size: 20px; + padding: 12px; +} + +.button-label-small { + color: rgb(153, 204, 0); + font-size: 16px; + padding: 12px; +} + +a { + color: rgb(134, 179, 0); + text-decoration: none; +} + +p, +li { + font-size: 16px; +} + +.dont-worry { + font-size: 18px; +} + +.icon-warning { + color: #dec340; + font-size: 40px; +} + +h1 { + font-size: 32px; +} + +code { + font-family: Fira, FiraCode, monospace; +} + +details { + background: #333; + margin-bottom: 2rem; + padding: 0.5rem 1rem; + border-radius: 5px; + justify-content: center; + margin: 0px 40rem 0px 40rem; +} + +summary { + cursor: pointer; +} + +summary > * { + display: inline; +} diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 9fc536555..8ae5c935b 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -106,14 +106,37 @@ function renderError(code, details) { let errorsElement = document.getElementById('errors'); if (!errorsElement) { + document.getElementsByTagName("head")[0].insertAdjacentHTML( + "beforeend", + ``); document.documentElement.innerHTML = ` -
If the problem persists, please contact the administrator. You may also try the following options:
-Don't worry, it's (probably) not your fault.
+If the problem persists after refreshing, please contact your instance's administrator.
You may also try the following options:
ERROR CODE: ${code}
ERROR CODE: ${code}