xref: /openbmc/webui-vue/src/App.vue (revision 22d4d527)
1<template>
2  <div id="app">
3    <router-view />
4  </div>
5</template>
6
7<script>
8export default {
9  name: 'App',
10  computed: {
11    assetTag() {
12      return this.$store.getters['global/assetTag'];
13    },
14  },
15  watch: {
16    assetTag: function (tag) {
17      if (tag) {
18        document.title = `${tag} - ${this.$route.meta.title}`;
19      }
20    },
21    $route: function (to) {
22      document.title = to.meta.title || 'Page is missing title';
23      if (this.assetTag) {
24        document.title = `${this.assetTag} - ${to.meta.title}`;
25      }
26    },
27  },
28  created() {
29    document.title = this.$route.meta.title || 'Page is missing title';
30  },
31};
32</script>
33
34<style lang="scss">
35@import '@/assets/styles/_obmc-custom';
36</style>
37