Any thrown errors get reported back to the UI and can be hoisted to the
notifications section. The `autofade` class can be applied to allow the
message to disappear on its own.
padding-top: 1rem;
margin-top: 2rem;
}
+.autofade {
+ opacity: 1;
+ animation-name: autofade;
+ animation-duration: 5000ms;
+ animation-fill-mode: forwards;
+ animation-iteration-count: 1
+}
+@keyframes autofade {
+ 0% {
+ opacity: 1;
+ }
+ 99% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
#nav, #nav ul {
padding: 0;
max-width: 150px;
}
+#notifications {
+ min-height: 42px;
+ margin-bottom: 5px;
+}
+
#stats {
margin-top: 1rem;
}
import { ExpressAdapter } from '@bull-board/express';
import http from 'http';
import { Server } from 'socket.io';
+import {HttpError} from '../errors';
type AuthInfo = {
authInfo: {
}
catch(e) {
console.log(e);
- //res.statusCode = (e as HttpError).statusCode || 500;
res.send(`
- <div class="alert danger">${e.message}</div>
+ <div class="alert danger autofade">${e.message}</div>
`);
}
finally {