1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-07-03 00:46:58 +02:00
Files
mailpit/server/ui-src/App.vue

48 lines
982 B
Vue
Raw Normal View History

2022-07-29 23:23:08 +12:00
<script>
import CommonMixins from "./mixins/CommonMixins";
import Favicon from "./components/AppFavicon.vue";
import AppBadge from "./components/AppBadge.vue";
import Notifications from "./components/AppNotifications.vue";
import EditTags from "./components/EditTags.vue";
import { mailbox } from "./stores/mailbox";
2022-07-29 23:23:08 +12:00
export default {
components: {
Favicon,
AppBadge,
Notifications,
EditTags,
},
mixins: [CommonMixins],
watch: {
$route(to, from) {
// hide mobile menu on URL change
this.hideNav();
},
2022-07-29 23:23:08 +12:00
},
2022-10-16 11:51:20 +13:00
beforeMount() {
// load global config
this.get(this.resolve("/api/v1/webui"), false, (response) => {
mailbox.uiConfig = response.data;
if (mailbox.uiConfig.Label) {
document.title = document.title + " - " + mailbox.uiConfig.Label;
} else {
document.title = document.title + " - " + location.hostname;
}
});
2022-07-29 23:23:08 +12:00
},
};
2022-07-29 23:23:08 +12:00
</script>
<template>
<RouterView />
<Favicon />
<AppBadge />
<Notifications />
<EditTags />
2022-07-29 23:23:08 +12:00
</template>