2022-09-20 19:59:52 +00:00
|
|
|
<template>
|
|
|
|
<div class="main-layout min-h-screen flex flex-col">
|
|
|
|
<navbar />
|
|
|
|
|
|
|
|
<div class="w-full md:w-4/5 lg:w-3/5 md:mx-auto md:max-w-4xl px-4">
|
|
|
|
<alert v-if="alert.type"
|
|
|
|
class="my-4"
|
|
|
|
:message="alert.message"
|
|
|
|
:type="alert.type"
|
|
|
|
:auto-close="alert.autoClose"
|
|
|
|
:confirmation-proceed="alert.confirmationProceed"
|
|
|
|
:confirmation-cancel="alert.confirmationCancel"
|
|
|
|
@close="closeAlert"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<child class="flex-grow" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-01-21 11:57:37 +00:00
|
|
|
import Navbar from '~/components/Navbar.vue'
|
|
|
|
import Alert from '../components/common/Alert.vue'
|
2022-09-20 19:59:52 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'MainLayout',
|
|
|
|
|
|
|
|
components: {
|
|
|
|
Navbar, Alert
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
alert () {
|
|
|
|
return this.$root.alert
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
closeAlert () {
|
|
|
|
this.$root.alert = {
|
|
|
|
type: null,
|
|
|
|
autoClose: 0,
|
|
|
|
message: '',
|
|
|
|
confirmationProceed: null,
|
|
|
|
confirmationCancel: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|