Error.vue 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <script setup>
  2. import { computed } from 'vue'
  3. import { Head, Link } from '@inertiajs/inertia-vue3'
  4. const props = defineProps({
  5. status: null,
  6. })
  7. const title = computed(() => {
  8. return {
  9. 503: '503: Service Unavailable',
  10. 500: '500: Server Error',
  11. 404: '404: Page Not Found',
  12. 403: '403: Forbidden',
  13. }[props.status]
  14. })
  15. const description = computed(() => {
  16. return {
  17. 503: 'Sorry, we are doing some maintenance. Please check back soon.',
  18. 500: 'Whoops, something went wrong on our servers.',
  19. 404: 'Sorry, the page you are looking for could not be found.',
  20. 403: 'Sorry, you are forbidden from accessing this page.',
  21. }[props.status]
  22. })
  23. </script>
  24. <template>
  25. <Head :title="title" />
  26. <div class="surface-0 flex align-items-center justify-content-center min-h-screen min-w-screen overflow-hidden">
  27. <div class="grid justify-content-center p-2 lg:p-0" style="min-width: 80%">
  28. <div
  29. class="col-12 xl:col-6"
  30. style="
  31. border-radius: 56px;
  32. padding: 0.3rem;
  33. background: linear-gradient(180deg, rgba(247, 149, 48, 0.4) 10%, rgba(247, 149, 48, 0) 30%);
  34. "
  35. >
  36. <div
  37. class="h-full w-full m-0 py-7 px-4"
  38. style="border-radius: 53px; background: linear-gradient(180deg, var(--surface-50) 38.9%, var(--surface-0))"
  39. >
  40. <div class="grid flex flex-column align-items-center">
  41. <div
  42. class="flex justify-content-center align-items-center bg-orange-500 border-circle"
  43. style="width: 3.2rem; height: 3.2rem"
  44. >
  45. <i class="pi pi-fw pi-lock text-2xl text-50"></i>
  46. </div>
  47. <h1 class="text-900 font-bold text-4xl lg:text-5xl mb-2">{{ title }}</h1>
  48. <span class="text-600 text-center">{{ description }}</span>
  49. <div class="col-12 mt-5 text-center">
  50. <i class="pi pi-fw pi-arrow-left text-blue-500 mr-2" style="vertical-align: center"></i>
  51. <Link href="/" class="text-blue-500">Kembali ke Dashboard</Link>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </template>