Skip to content
Snippets Groups Projects
Verified Commit 0dc9cdab authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Use instance name in SPA page title

parent 6608a315
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,26 @@ Vue.use(VueMasonryPlugin)
Vue.use(VueLazyload)
Vue.config.productionTip = false
Vue.directive('title', {
inserted: (el, binding) => { document.title = binding.value + ' - Funkwhale' },
updated: (el, binding) => { document.title = binding.value + ' - Funkwhale' }
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(' - ')
}
})
axios.defaults.baseURL = config.API_URL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment