debian-mirror-gitlab/app/assets/javascripts/issue_show/components/locked_warning.vue

28 lines
663 B
Vue
Raw Normal View History

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>