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

34 lines
772 B
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2021-11-18 22:05:49 +05:30
import { GlSprintf, GlLink } from '@gitlab/ui';
import { __ } from '~/locale';
const alertMessage = __(
'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.',
);
2019-09-30 21:07:59 +05:30
2018-12-13 13:39:08 +05:30
export default {
2021-11-18 22:05:49 +05:30
alertMessage,
components: {
GlSprintf,
GlLink,
},
2018-12-13 13:39:08 +05:30
computed: {
currentPath() {
return window.location.pathname;
2017-09-10 17:25:29 +05:30
},
2018-12-13 13:39:08 +05:30
},
};
2017-09-10 17:25:29 +05:30
</script>
<template>
2021-11-18 22:05:49 +05:30
<div class="alert alert-danger">
<gl-sprintf :message="$options.alertMessage">
<template #link="{ content }">
<gl-link :href="currentPath" target="_blank" rel="nofollow">
{{ content }}
</gl-link>
</template>
</gl-sprintf>
</div>
2017-09-10 17:25:29 +05:30
</template>