0
0
Fork 0

feat: global handler

This commit is contained in:
Alex Moreno 2024-09-18 14:48:15 +02:00
parent 7b70734eb8
commit 5ca38ca825
3 changed files with 8 additions and 0 deletions

View File

@ -2,9 +2,15 @@ import { boot } from 'quasar/wrappers';
import qFormMixin from './qformMixin';
import mainShortcutMixin from './mainShortcutMixin';
import keyShortcut from './keyShortcut';
import useNotify from 'src/composables/useNotify.js';
const { notify } = useNotify();
export default boot(({ app }) => {
app.mixin(qFormMixin);
app.mixin(mainShortcutMixin);
app.directive('shortcut', keyShortcut);
app.config.errorHandler = function (err) {
console.error(err);
notify('globals.error', 'negative', 'error');
};
});

View File

@ -103,6 +103,7 @@ globals:
ticket: Ticket
campaign: Campaign
weight: Weight
error: Ups! Something went wrong
pageTitles:
logIn: Login
addressEdit: Update address

View File

@ -105,6 +105,7 @@ globals:
ticket: Ticket
campaign: Campaña
weight: Peso
error: ¡Ups! Algo salió mal
pageTitles:
logIn: Inicio de sesión
addressEdit: Modificar consignatario