Commit bf4d987f authored by jovuit's avatar jovuit Committed by Eliot Berriot

#511: Resolve "Page title not updated when changing the language"

parent 7eab1108
i18n: Update page title when changing the App's language. (#511)
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment