Show version

This commit is contained in:
Douglas Barone 2022-01-20 08:55:37 -04:00
parent 9cc4c90ee8
commit a1bb66c582

View File

@ -9,12 +9,15 @@
</v-avatar> </v-avatar>
</v-toolbar-title> </v-toolbar-title>
<v-toolbar-items class="align-center"> <v-toolbar-items class="align-center">
<h2 <template v-if="$vuetify.breakpoint.smAndUp">
v-if="$vuetify.breakpoint.smAndUp" <h2 v-if="$route.meta.title" class="d-inline ml-4 font-weight-light">
class="d-inline ml-4 font-weight-light"
>
{{ pageTitle }} {{ pageTitle }}
</h2> </h2>
<h2 v-else class="d-inline ml-4 font-weight-light">
Portal de Tecnologia da Informação
<small> v{{ appVersion }} </small>
</h2>
</template>
</v-toolbar-items> </v-toolbar-items>
<v-spacer /> <v-spacer />
<v-toolbar-items class="align-center"> <v-toolbar-items class="align-center">
@ -40,6 +43,8 @@ import MainDrawer from '../components/MainDrawer'
import UserMenu from '@/components/UserMenu' import UserMenu from '@/components/UserMenu'
import { version } from '../../package.json'
export default { export default {
name: 'Default', name: 'Default',
components: { UserMenu, MainDrawer }, components: { UserMenu, MainDrawer },
@ -48,9 +53,13 @@ export default {
}), }),
computed: { computed: {
pageTitle() { pageTitle() {
return this.$route.meta.title return (
? this.$route.meta.title this.$route.meta.title ||
: 'Portal de Tecnologia da Informação' `Portal de Tecnologia da Informação v${version}`
)
},
appVersion() {
return version
} }
} }
} }