mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 17:39:31 +02:00
#511: Resolve "Page title not updated when changing the language"
This commit is contained in:
parent
7eab11084c
commit
bf4d987fb8
2 changed files with 11 additions and 21 deletions
|
@ -57,28 +57,17 @@ Vue.use(GetTextPlugin, {
|
|||
Vue.use(VueMasonryPlugin)
|
||||
Vue.use(VueLazyload)
|
||||
Vue.config.productionTip = false
|
||||
Vue.directive('title', {
|
||||
inserted: (el, binding) => {
|
||||
let parts = []
|
||||
let instanceName = store.state.instance.settings.instance.name.value
|
||||
if (instanceName.length === 0) {
|
||||
instanceName = 'Funkwhale'
|
||||
}
|
||||
parts.unshift(instanceName)
|
||||
parts.unshift(binding.value)
|
||||
document.title = parts.join(' - ')
|
||||
},
|
||||
updated: (el, binding) => {
|
||||
let parts = []
|
||||
let instanceName = store.state.instance.settings.instance.name.value
|
||||
if (instanceName.length === 0) {
|
||||
instanceName = 'Funkwhale'
|
||||
}
|
||||
parts.unshift(instanceName)
|
||||
parts.unshift(binding.value)
|
||||
document.title = parts.join(' - ')
|
||||
Vue.directive('title', function (el, binding) {
|
||||
let parts = []
|
||||
let instanceName = store.state.instance.settings.instance.name.value
|
||||
if (instanceName.length === 0) {
|
||||
instanceName = 'Funkwhale'
|
||||
}
|
||||
})
|
||||
parts.unshift(instanceName)
|
||||
parts.unshift(binding.value)
|
||||
document.title = parts.join(' - ')
|
||||
}
|
||||
)
|
||||
axios.interceptors.request.use(function (config) {
|
||||
// Do something before request is sent
|
||||
if (store.state.auth.token) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue