Fix the title meta when open a project detail or profile page clicking with the center button
parent
86d4eaad61
commit
35be3df835
|
@ -27,10 +27,12 @@ class ProfileController
|
||||||
@._setMeta(@.user)
|
@._setMeta(@.user)
|
||||||
|
|
||||||
_setMeta: (user) ->
|
_setMeta: (user) ->
|
||||||
title = @translate.instant("USER.PROFILE.PAGE_TITLE", {
|
ctx = {
|
||||||
userFullName: user.get("full_name_display"),
|
userFullName: user.get("full_name_display"),
|
||||||
userUsername: user.get("username")
|
userUsername: user.get("username")
|
||||||
})
|
}
|
||||||
|
|
||||||
|
@translate("USER.PROFILE.PAGE_TITLE", ctx).then (title) =>
|
||||||
description = user.get("bio")
|
description = user.get("bio")
|
||||||
@appMetaService.setAll(title, description)
|
@appMetaService.setAll(title, description)
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@ class ProjectController
|
||||||
@xhrError.response(xhr)
|
@xhrError.response(xhr)
|
||||||
|
|
||||||
_setMeta: (project)->
|
_setMeta: (project)->
|
||||||
title = @translate.instant("PROJECT.PAGE_TITLE", {projectName: project.get("name")})
|
ctx = {projectName: project.get("name")}
|
||||||
|
|
||||||
|
title = @translate("PROJECT.PAGE_TITLE", ctx).then (title) =>
|
||||||
description = project.get("description")
|
description = project.get("description")
|
||||||
@appMetaService.setAll(title, description)
|
@appMetaService.setAll(title, description)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue