tethys.backend/resources/js/Pages/Errors/ServerError.vue
Arno Kaimbacher bee76f8d5b
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m13s
- npm added @japa/api-client, @japa/assert, @types/supertest
- webpack added opions['__VUE_PROD_HYDRATION_MISMATCH_DETAILS__'] = false;
- bodyparser config replaced whitelistedMethods with allowedMethods
- extended stardust_provider
- adapted tests for adonisjs v6
2024-04-25 15:17:22 +02:00

61 lines
1.8 KiB
Vue

<template>
<div class="min-h-screen flex items-center justify-center bg-gray-100">
<div class="max-w-md w-full p-6 bg-white rounded-md shadow-md">
<h1 class="text-2xl font-bold text-red-500 mb-4">Error!</h1>
<p class="text-gray-700 mb-4">{{ error }}</p>
<SectionTitleLineWithButton :icon="mdiLightbulbAlert" :title="code.toString()" :main="true">
<BaseButton @click.prevent="handleAction" :icon="mdiArrowLeftBoldOutline" label="Dashboard"
color="white" rounded-full small />
</SectionTitleLineWithButton>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-facing-decorator';
import { Link, router } from '@inertiajs/vue3';
import SectionTitleLineWithButton from '@/Components/SectionTitleLineWithButton.vue';
import BaseButton from '@/Components/BaseButton.vue';
import { mdiLightbulbAlert, mdiArrowLeftBoldOutline } from '@mdi/js';
import { stardust } from '@eidellev/adonis-stardust/client';
@Component({
// options: {
// layout: DefaultLayout,
// },
name: 'AppComponent',
components: {
Link,
BaseButton,
SectionTitleLineWithButton,
},
})
export default class AppComponent extends Vue {
// Component Property
@Prop({
type: String,
default: () => '',
})
error: string;
@Prop({
type: Number,
default: () => '',
})
code: number;
// class properties
mdiLightbulbAlert = mdiLightbulbAlert;
mdiArrowLeftBoldOutline = mdiArrowLeftBoldOutline;
public async handleAction() {
// Add your logic here for handling the button action (e.g., logout or go back)
await router.get(stardust.route('dashboard'));
}
}
</script>