Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
ed1fdc85
Verified
Commit
ed1fdc85
authored
Mar 05, 2019
by
jovuit
Committed by
Eliot Berriot
Mar 20, 2019
Browse files
#511: Resolve "Page title not updated when changing the language"
parent
33190613
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/changelog.d/511.bugfix
0 → 100644
View file @
ed1fdc85
i18n: Update page title when changing the App's language. (#511)
front/src/main.js
View file @
ed1fdc85
...
...
@@ -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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment