2022-07-29 23:23:08 +12:00
|
|
|
<script>
|
2025-06-20 23:26:06 +12:00
|
|
|
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: {
|
2023-12-04 21:24:46 +13:00
|
|
|
Favicon,
|
2025-04-30 17:34:46 +12:00
|
|
|
AppBadge,
|
2023-09-14 22:30:20 +12:00
|
|
|
Notifications,
|
2025-06-20 23:26:06 +12:00
|
|
|
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
|
|
|
|
2023-09-14 22:30:20 +12:00
|
|
|
beforeMount() {
|
2023-09-22 15:06:03 +12:00
|
|
|
// load global config
|
2025-06-20 23:26:06 +12:00
|
|
|
this.get(this.resolve("/api/v1/webui"), false, (response) => {
|
|
|
|
mailbox.uiConfig = response.data;
|
2024-06-21 16:54:33 +12:00
|
|
|
|
|
|
|
if (mailbox.uiConfig.Label) {
|
2025-06-20 23:26:06 +12:00
|
|
|
document.title = document.title + " - " + mailbox.uiConfig.Label;
|
2024-06-21 16:54:33 +12:00
|
|
|
} else {
|
2025-06-20 23:26:06 +12:00
|
|
|
document.title = document.title + " - " + location.hostname;
|
2024-06-21 16:54:33 +12:00
|
|
|
}
|
2025-06-20 23:26:06 +12:00
|
|
|
});
|
2022-07-29 23:23:08 +12:00
|
|
|
},
|
2025-06-20 23:26:06 +12:00
|
|
|
};
|
2022-07-29 23:23:08 +12:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-09-14 22:30:20 +12:00
|
|
|
<RouterView />
|
2023-12-04 21:24:46 +13:00
|
|
|
<Favicon />
|
2025-04-30 17:34:46 +12:00
|
|
|
<AppBadge />
|
2023-09-14 22:30:20 +12:00
|
|
|
<Notifications />
|
2024-06-29 17:12:56 +12:00
|
|
|
<EditTags />
|
2022-07-29 23:23:08 +12:00
|
|
|
</template>
|