Error.vue 914 B

123456789101112131415161718192021222324252627
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { storeToRefs } from 'pinia'
  4. import { errorOptions } from '#shared/router/error.ts'
  5. import { useAuthenticationStore } from '#shared/stores/authentication.ts'
  6. import CommonError from '#desktop/components/CommonError/CommonError.vue'
  7. import LayoutMain from '#desktop/components/layout/LayoutMain.vue'
  8. import LayoutPage from '#desktop/components/layout/LayoutPage.vue'
  9. const { authenticated } = storeToRefs(useAuthenticationStore())
  10. </script>
  11. <template>
  12. <component
  13. :is="authenticated ? LayoutPage : 'div'"
  14. :class="{ 'h-full': !authenticated }"
  15. >
  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" :authenticated="authenticated" />
  20. </LayoutMain>
  21. </component>
  22. </template>