2017-05-18 15:51:51 +00:00
< script >
2020-08-26 09:10:16 +00:00
/* eslint-disable vue/no-v-html */
2019-07-16 02:48:40 +00:00
import { _ _ , sprintf } from '~/locale' ;
2018-10-10 06:23:54 +00:00
export default {
computed : {
currentPath ( ) {
return window . location . pathname ;
2017-05-18 15:51:51 +00:00
} ,
2019-07-16 02:48:40 +00:00
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-10-10 06:23:54 +00:00
} ,
} ;
2017-05-18 15:51:51 +00:00
< / script >
< template >
2019-07-16 02:48:40 +00:00
< div class = "alert alert-danger" v-html ="alertMessage" > < / div >
2017-05-18 15:51:51 +00:00
< / template >