Added dynamically setting title
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
932885d34a
commit
5968e4e56e
|
@ -48,11 +48,19 @@
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.loadAuthor()
|
this.loadAuthor()
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('nav').authors
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
'$route': 'loadAuthor'
|
'$route': 'loadAuthor'
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
langGeneral () {
|
||||||
|
return this.translate('general')
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadAuthor () {
|
loadAuthor () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
@ -88,6 +96,9 @@
|
||||||
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.author.forename + ' ' + this.author.lastname + ' | ' + this.translate('nav').authors
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
|
@ -102,6 +102,9 @@ export default {
|
||||||
|
|
||||||
this.gridButtons[0].text = this.translate('general').delete
|
this.gridButtons[0].text = this.translate('general').delete
|
||||||
this.gridColumns = [this.translate('general').name]
|
this.gridColumns = [this.translate('general').name]
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('nav').authors
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
|
|
|
@ -53,6 +53,13 @@
|
||||||
this.errorNotification(e)
|
this.errorNotification(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('authors').newAuthor + ' | ' + this.translate('nav').authors
|
||||||
|
if (this.authorid) {
|
||||||
|
document.title = this.translate('general').edit + ' | ' + this.translate('nav').authors
|
||||||
|
}
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -52,6 +52,8 @@
|
||||||
created () {
|
created () {
|
||||||
this.loadStatus()
|
this.loadStatus()
|
||||||
this.loadBook()
|
this.loadBook()
|
||||||
|
|
||||||
|
document.title = this.translate('nav').books
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
|
@ -153,6 +155,9 @@
|
||||||
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.book.title + ' | ' + this.translate('nav').books
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
|
@ -115,6 +115,8 @@ export default {
|
||||||
gc.quantity,
|
gc.quantity,
|
||||||
gc.status
|
gc.status
|
||||||
]
|
]
|
||||||
|
|
||||||
|
document.title = this.translate('nav').books
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
|
|
|
@ -169,6 +169,13 @@
|
||||||
this.errorNotification(e)
|
this.errorNotification(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('books').add
|
||||||
|
if (this.bookID) {
|
||||||
|
document.title = this.translate('general').edit + ' | ' + this.translate('nav').books
|
||||||
|
}
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -7,19 +7,23 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import auth from '../auth'
|
import auth from '../auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
user: auth.user
|
user: auth.user
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logout () {
|
logout () {
|
||||||
auth.logout()
|
auth.logout()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('nav').home
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -47,11 +47,19 @@
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.loadItem()
|
this.loadItem()
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('nav').items
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
'$route': 'loadItem'
|
'$route': 'loadItem'
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
langGeneral () {
|
||||||
|
return this.translate('general')
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadItem () {
|
loadItem () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
@ -95,6 +103,9 @@
|
||||||
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.item.title + ' | ' + this.translate('nav').items
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
|
@ -107,6 +107,9 @@ export default {
|
||||||
langGrid.price,
|
langGrid.price,
|
||||||
langGrid.quantity
|
langGrid.quantity
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('nav').items
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
|
|
|
@ -67,6 +67,13 @@
|
||||||
this.errorNotification(e)
|
this.errorNotification(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('items').newItem + ' | ' + this.translate('nav').items
|
||||||
|
if (this.itemID) {
|
||||||
|
document.title = this.translate('general').edit + ' | ' + this.translate('nav').items
|
||||||
|
}
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -52,14 +52,15 @@
|
||||||
loading: false
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeMount () {
|
beforeMount () {
|
||||||
// Check if the user is already logged in, if so, redirect him to the homepage
|
// Check if the user is already logged in, if so, redirect him to the homepage
|
||||||
if (auth.user.authenticated) {
|
if (auth.user.authenticated) {
|
||||||
router.push({name: 'home'})
|
router.push({name: 'home'})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created () {
|
||||||
|
document.title = this.translate('login').title
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit () {
|
submit () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
@ -72,7 +73,6 @@
|
||||||
auth.login(this, credentials, 'home')
|
auth.login(this, credentials, 'home')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
login () {
|
login () {
|
||||||
return this.translate('login')
|
return this.translate('login')
|
||||||
|
|
|
@ -46,11 +46,19 @@
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.loadPublisher()
|
this.loadPublisher()
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('nav').publishers
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
'$route': 'loadPublisher'
|
'$route': 'loadPublisher'
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
langGeneral () {
|
||||||
|
return this.translate('general')
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadPublisher () {
|
loadPublisher () {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
@ -82,6 +90,9 @@
|
||||||
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
time: ('0' + e.getHours()).slice(-2) + ':' + ('0' + e.getMinutes()).slice(-2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.publisher.name + ' | ' + this.translate('nav').publishers
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
|
|
|
@ -102,6 +102,9 @@ export default {
|
||||||
|
|
||||||
this.gridButtons[0].text = this.translate('general').delete
|
this.gridButtons[0].text = this.translate('general').delete
|
||||||
this.gridColumns = [this.translate('general').name]
|
this.gridColumns = [this.translate('general').name]
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('nav').publishers
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// call again the method if the route changes
|
// call again the method if the route changes
|
||||||
|
|
|
@ -46,6 +46,13 @@
|
||||||
this.errorNotification(e)
|
this.errorNotification(e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the title
|
||||||
|
document.title = this.translate('publishers').newPublisher + ' | ' + this.translate('nav').publishers
|
||||||
|
if (this.publisherID) {
|
||||||
|
document.title = this.translate('general').edit + ' | ' + this.translate('nav').publishers
|
||||||
|
}
|
||||||
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -42,6 +42,7 @@ export default {
|
||||||
title: 'Liste des livres',
|
title: 'Liste des livres',
|
||||||
description: 'Description',
|
description: 'Description',
|
||||||
add: 'Ajouter un livre',
|
add: 'Ajouter un livre',
|
||||||
|
editBook: 'Modifier un livre',
|
||||||
deleteHeader: 'Supprimer le livre',
|
deleteHeader: 'Supprimer le livre',
|
||||||
deleteMsg: 'Est-ce que vous êtes sur que vous voulez supprimer cette livre? <b>Cette operation est irréversible !</b>',
|
deleteMsg: 'Est-ce que vous êtes sur que vous voulez supprimer cette livre? <b>Cette operation est irréversible !</b>',
|
||||||
deleteSuccess: 'Le livre a éte supprimè avec succès.',
|
deleteSuccess: 'Le livre a éte supprimè avec succès.',
|
||||||
|
@ -62,6 +63,7 @@ export default {
|
||||||
authors: {
|
authors: {
|
||||||
title: 'Liste des auteurs',
|
title: 'Liste des auteurs',
|
||||||
newAuthor: 'Ajouter un auteur',
|
newAuthor: 'Ajouter un auteur',
|
||||||
|
editAuthor: 'Modifier l\'auteur',
|
||||||
deleteHeader: 'Supprimer l\'auteur',
|
deleteHeader: 'Supprimer l\'auteur',
|
||||||
deleteMsg: 'Est-ce que vous êtes sur que vous voulez supprimer cet auteur? <b>Cette operation est irréversible !</b>',
|
deleteMsg: 'Est-ce que vous êtes sur que vous voulez supprimer cet auteur? <b>Cette operation est irréversible !</b>',
|
||||||
deleteSuccess: 'L\'auteur a éte supprimè avec succès.',
|
deleteSuccess: 'L\'auteur a éte supprimè avec succès.',
|
||||||
|
|
Loading…
Reference in New Issue