2017-09-10 17:25:29 +05:30
< script >
2019-09-30 21:07:59 +05:30
import { _ _ , sprintf } from '~/locale' ;
2018-12-13 13:39:08 +05:30
export default {
computed : {
currentPath ( ) {
return window . location . pathname ;
2017-09-10 17:25:29 +05:30
} ,
2019-09-30 21:07:59 +05:30
alertMessage ( ) {
return sprintf (
_ _ (
'Someone edited the issue at the same time you did. Please check out %{linkStart}the issue%{linkEnd} and make sure your changes will not unintentionally remove theirs.' ,
) ,
{
linkStart : ` <a href=" ${ this . currentPath } " target="_blank" rel="nofollow"> ` ,
linkEnd : ` </a> ` ,
} ,
false ,
) ;
} ,
2018-12-13 13:39:08 +05:30
} ,
} ;
2017-09-10 17:25:29 +05:30
< / script >
< template >
2019-09-30 21:07:59 +05:30
< div class = "alert alert-danger" v-html = "alertMessage" > < / div >
2017-09-10 17:25:29 +05:30
< / template >