Simplify page titles
This commit is contained in:
parent
fa91d2e76f
commit
b4d70359db
3 changed files with 6 additions and 12 deletions
|
@ -29,9 +29,6 @@ class AppServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
Inertia::share(function () {
|
Inertia::share(function () {
|
||||||
return [
|
return [
|
||||||
'app' => [
|
|
||||||
'name' => Config::get('app.name'),
|
|
||||||
],
|
|
||||||
'auth' => [
|
'auth' => [
|
||||||
'user' => Auth::user() ? [
|
'user' => Auth::user() ? [
|
||||||
'id' => Auth::user()->id,
|
'id' => Auth::user()->id,
|
||||||
|
|
|
@ -47,7 +47,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = `Login | ${this.$page.app.name}`
|
document.title = 'Login | Ping CRM'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
|
|
|
@ -72,17 +72,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
title(title) {
|
title: {
|
||||||
this.updatePageTitle(title)
|
immediate: true,
|
||||||
|
handler(title) {
|
||||||
|
document.title = title ? `${title} | Ping CRM` : 'Ping CRM'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.updatePageTitle(this.title)
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
updatePageTitle(title) {
|
|
||||||
document.title = title ? `${title} | ${this.$page.app.name}` : this.$page.app.name
|
|
||||||
},
|
|
||||||
hideDropdownMenus() {
|
hideDropdownMenus() {
|
||||||
this.showUserMenu = false
|
this.showUserMenu = false
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue