1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-01-06 00:25:39 +02:00
mailpit/server/ui-src/App.vue

38 lines
740 B
Vue
Raw Normal View History

2022-07-29 13:23:08 +02:00
<script>
import CommonMixins from './mixins/CommonMixins'
import Notifications from './components/Notifications.vue'
import { RouterView } from 'vue-router'
import { mailbox } from "./stores/mailbox"
2022-07-29 13:23:08 +02:00
export default {
mixins: [CommonMixins],
2022-10-16 00:51:20 +02:00
2022-07-29 13:23:08 +02:00
components: {
Notifications,
2022-07-29 13:23:08 +02:00
},
2022-10-16 00:51:20 +02:00
beforeMount() {
document.title = document.title + ' - ' + location.hostname
2023-12-01 04:30:14 +02:00
mailbox.showTagColors = !localStorage.getItem('hideTagColors') == '1'
// load global config
this.get(this.resolve('/api/v1/webui'), false, function (response) {
mailbox.uiConfig = response.data
})
2022-07-29 13:23:08 +02:00
},
2022-10-16 00:51:20 +02:00
watch: {
$route(to, from) {
// hide mobile menu on URL change
this.hideNav()
}
2022-07-29 13:23:08 +02:00
},
2022-10-16 00:51:20 +02:00
2022-07-29 13:23:08 +02:00
}
</script>
<template>
<RouterView />
<Notifications />
2022-07-29 13:23:08 +02:00
</template>