Converted views/Errors.vue

This commit is contained in:
Joep 2023-09-09 13:46:55 +02:00
parent 1bca23b3dc
commit 2cfc2ae116

View File

@ -9,10 +9,16 @@
</div> </div>
</template> </template>
<script> <script setup lang="ts">
import HeaderBar from "@/components/header/HeaderBar.vue"; import HeaderBar from "@/components/header/HeaderBar.vue";
import { computed } from "vue";
const errors = { const errors: {
[key: string]: {
icon: string,
message: string
}
} = {
0: { 0: {
icon: "cloud_off", icon: "cloud_off",
message: "errors.connection", message: "errors.connection",
@ -31,16 +37,13 @@ const errors = {
}, },
}; };
export default { const props = defineProps<{
name: "errors", errorCode: any,
components: { showHeader: boolean
HeaderBar, }>()
},
props: ["errorCode", "showHeader"], const info = computed(() => {
computed: { return errors[props.errorCode] ? errors [props.errorCode] : errors[500]
info() { })
return errors[this.errorCode] ? errors[this.errorCode] : errors[500];
},
},
};
</script> </script>