Simplify page titles

This commit is contained in:
Jonathan Reinink 2019-08-08 08:50:36 -04:00
parent fa91d2e76f
commit b4d70359db
3 changed files with 6 additions and 12 deletions

View File

@ -29,9 +29,6 @@ class AppServiceProvider extends ServiceProvider
Inertia::share(function () {
return [
'app' => [
'name' => Config::get('app.name'),
],
'auth' => [
'user' => Auth::user() ? [
'id' => Auth::user()->id,

View File

@ -47,7 +47,7 @@ export default {
}
},
mounted() {
document.title = `Login | ${this.$page.app.name}`
document.title = 'Login | Ping CRM'
},
methods: {
submit() {

View File

@ -72,17 +72,14 @@ export default {
}
},
watch: {
title(title) {
this.updatePageTitle(title)
title: {
immediate: true,
handler(title) {
document.title = title ? `${title} | Ping CRM` : 'Ping CRM'
},
},
},
mounted() {
this.updatePageTitle(this.title)
},
methods: {
updatePageTitle(title) {
document.title = title ? `${title} | ${this.$page.app.name}` : this.$page.app.name
},
hideDropdownMenus() {
this.showUserMenu = false
},