Error.vue 759 B

1234567891011121314151617181920212223242526
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { errorOptions } from '#shared/router/error.ts'
  4. import { useAuthenticationStore } from '#shared/stores/authentication.ts'
  5. import CommonError from '#desktop/components/CommonError/CommonError.vue'
  6. import LayoutMain from '#desktop/components/layout/LayoutMain.vue'
  7. defineOptions({
  8. beforeRouteEnter() {
  9. if (useAuthenticationStore().authenticated) return '/error-tab'
  10. return true
  11. },
  12. })
  13. </script>
  14. <template>
  15. <div class="h-full">
  16. <LayoutMain
  17. class="flex grow flex-col items-center justify-center gap-4 bg-blue-50 dark:bg-gray-800"
  18. >
  19. <CommonError :options="errorOptions" />
  20. </LayoutMain>
  21. </div>
  22. </template>