Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:zap: Update error handler, for non-critical warnings

Alicia Sykesaffff262d3b6
diff --git a/src/utils/ErrorHandler.js b/src/utils/ErrorHandler.js
index f430fa74..d0c96f08 100644
--- a/src/utils/ErrorHandler.js
+++ b/src/utils/ErrorHandler.js
@@ -1,5 +1,5 @@
import * as Sentry from '@sentry/vue';
-import { warningMsg } from '@/utils/CoolConsole';
+import { warningMsg, statusMsg } from '@/utils/CoolConsole';
import { sessionStorageKeys } from '@/utils/defaults';
/* Makes the current time, like hh:mm:ss */
@@ -28,4 +28,9 @@ const ErrorHandler = function handler(msg) {
Sentry.captureMessage(`[USER-WARN] ${msg}`); // Report to bug tracker (if enabled)
};
+/* Similar to error handler, but for recording general info */
+export const InfoHandler = (msg, title) => {
+ statusMsg(title || 'Info', msg);
+};
+
export default ErrorHandler;
diff --git a/src/utils/defaults.js b/src/utils/defaults.js
index 40365210..f7e8e396 100644
--- a/src/utils/defaults.js
+++ b/src/utils/defaults.js
@@ -103,6 +103,7 @@ module.exports = {
/* Key names for session storage identifiers */
sessionStorageKeys: {
SW_STATUS: 'serviceWorkerStatus',
+ ERROR_LOG: 'errorLog',
},
/* Unique IDs of modals within the app */
modalNames: {