2020-07-22 13:19:23 -07:00
|
|
|
<template>
|
2021-01-22 14:54:24 -08:00
|
|
|
<div class="d-flex flex-column vh-100">
|
2020-07-22 13:19:23 -07:00
|
|
|
<div class="flex-grow-1">
|
2020-09-23 11:34:35 -07:00
|
|
|
<Header/>
|
2021-05-13 03:09:08 -07:00
|
|
|
<main class="container">
|
2021-05-03 07:15:48 -07:00
|
|
|
<Nuxt/>
|
|
|
|
<ScrollButton/>
|
|
|
|
</main>
|
2020-07-22 13:19:23 -07:00
|
|
|
</div>
|
2021-05-13 03:09:08 -07:00
|
|
|
<div class="container">
|
2020-07-22 13:19:23 -07:00
|
|
|
<Footer/>
|
|
|
|
</div>
|
2021-06-09 05:47:58 -07:00
|
|
|
<DialogueBox ref="dialogue"/>
|
2021-01-06 06:21:20 -08:00
|
|
|
<Lightbox/>
|
2020-07-22 13:19:23 -07:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2020-10-24 13:32:12 -07:00
|
|
|
<script>
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
mounted() {
|
2021-06-09 05:47:58 -07:00
|
|
|
Vue.prototype.$alert = (message, color='primary') => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
this.$refs.dialogue.show(false, message, color, resolve, reject);
|
|
|
|
});
|
|
|
|
};
|
2020-10-24 13:32:12 -07:00
|
|
|
Vue.prototype.$confirm = (message, color='primary') => {
|
|
|
|
return new Promise((resolve, reject) => {
|
2021-06-09 05:47:58 -07:00
|
|
|
this.$refs.dialogue.show(true, message, color, resolve, reject);
|
2020-10-24 13:32:12 -07:00
|
|
|
});
|
|
|
|
};
|
2021-06-09 09:35:42 -07:00
|
|
|
Vue.prototype.$post = (url, data, options = {}, timeout = 30000) => {
|
2021-06-09 09:06:32 -07:00
|
|
|
return new Promise((resolve, reject) => {
|
2021-06-09 09:35:42 -07:00
|
|
|
this.$axios.$post(url, data, {...options, timeout})
|
2021-06-09 09:06:32 -07:00
|
|
|
.then(data => resolve(data))
|
|
|
|
.catch(async e => {
|
|
|
|
console.error(e);
|
|
|
|
await this.$alert(this.$t('error.generic'), 'danger');
|
|
|
|
reject();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
2020-10-24 13:32:12 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2020-07-22 13:19:23 -07:00
|
|
|
<style lang="scss">
|
|
|
|
@import "assets/style";
|
|
|
|
</style>
|