1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-05-15 22:16:44 +02:00
Matt Currie 05375fed7a
Feature: Display unread count in app badge (#485)
* Display unread count in app badge

* Rate limit app badge updates
2025-04-30 17:34:46 +12:00

49 lines
969 B
Vue

<script>
import CommonMixins from './mixins/CommonMixins'
import Favicon from './components/Favicon.vue'
import AppBadge from './components/AppBadge.vue'
import Notifications from './components/Notifications.vue'
import EditTags from './components/EditTags.vue'
import { mailbox } from "./stores/mailbox"
export default {
mixins: [CommonMixins],
components: {
Favicon,
AppBadge,
Notifications,
EditTags
},
beforeMount() {
// load global config
this.get(this.resolve('/api/v1/webui'), false, function (response) {
mailbox.uiConfig = response.data
if (mailbox.uiConfig.Label) {
document.title = document.title + ' - ' + mailbox.uiConfig.Label
} else {
document.title = document.title + ' - ' + location.hostname
}
})
},
watch: {
$route(to, from) {
// hide mobile menu on URL change
this.hideNav()
}
},
}
</script>
<template>
<RouterView />
<Favicon />
<AppBadge />
<Notifications />
<EditTags />
</template>