mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-03 22:01:45 +01:00
1 line
2.5 KiB
Plaintext
1 line
2.5 KiB
Plaintext
{"version":3,"file":"Error-7hWphpNC.js","sources":["../../../resources/js/views/Error.vue"],"sourcesContent":["<script setup>\n import { useNotifyStore } from '@/stores/notify'\n \n const errorHandler = useNotifyStore()\n const router = useRouter()\n const route = useRoute()\n\n const showModal = ref(true)\n const showDebug = computed(() => process.env.NODE_ENV === 'development')\n\n const props = defineProps({\n closable: {\n type: Boolean,\n default: true\n }\n })\n\n watch(showModal, (val) => {\n if (val == false) {\n exit()\n }\n })\n\n onMounted(() => {\n if (route.query.err) {\n errorHandler.message = trans('errors.' + route.query.err)\n }\n })\n\n /**\n * Exits the error view\n */\n function exit() {\n window.history.length > 1 && route.name !== '404' && route.name !== 'notFound' && !route.query.err\n ? router.go(-1)\n : router.push({ name: 'accounts' })\n }\n\n</script>\n\n<template>\n <div>\n <modal v-model=\"showModal\" :closable=\"props.closable\">\n <div class=\"error-message\" v-if=\"$route.name == '404' || $route.name == 'notFound'\">\n <p class=\"error-404\"></p>\n <p>{{ $t('errors.resource_not_found') }}</p>\n </div>\n <div v-else class=\"error-message\" >\n <p class=\"error-generic\"></p>\n <p>{{ $t('errors.error_occured') }} </p>\n <p v-if=\"errorHandler.message\" class=\"has-text-grey-lighter\">{{ errorHandler.message }}</p>\n <p v-if=\"errorHandler.originalMessage\" class=\"has-text-grey-lighter\">{{ errorHandler.originalMessage }}</p>\n <p v-if=\"showDebug && errorHandler.debug\" class=\"is-size-7 is-family-code\"><br>{{ errorHandler.debug }}</p>\n </div>\n </modal>\n </div>\n</template>"],"names":["errorHandler","useNotifyStore","router","useRouter","route","useRoute","showModal","ref","showDebug","computed","props","__props","watch","val","exit","onMounted","trans"],"mappings":"8fAGI,MAAMA,EAAeC,EAAe,EAC9BC,EAASC,EAAU,EACnBC,EAAQC,EAAS,EAEjBC,EAAYC,EAAI,EAAI,EACpBC,EAAYC,EAAS,IAAM,EAAsC,EAEjEC,EAAQC,EAORC,EAAAN,EAAYO,GAAQ,CAClBA,GAAO,IACFC,EAAA,CACT,CACH,EAEDC,EAAU,IAAM,CACRX,EAAM,MAAM,MACZJ,EAAa,QAAUgB,EAAM,UAAYZ,EAAM,MAAM,GAAG,EAC5D,CACH,EAKD,SAASU,GAAO,CACL,OAAA,QAAQ,OAAS,GAAKV,EAAM,OAAS,OAASA,EAAM,OAAS,YAAc,CAACA,EAAM,MAAM,IACzFF,EAAO,GAAG,EAAE,EACZA,EAAO,KAAK,CAAE,KAAM,WAAY,CAAA"} |