Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 12:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 12:08:52 +0300
commit53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (patch)
tree5180b96d6a84f36a515cedfa8e81d72de5ccf4fb /app/assets/javascripts/vue_shared/components
parentcfe63cce6a90a1c70397c1b9f6d90480f25cae0a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components')
-rw-r--r--app/assets/javascripts/vue_shared/components/notes/system_note.vue24
1 files changed, 20 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/notes/system_note.vue b/app/assets/javascripts/vue_shared/components/notes/system_note.vue
index 15ca64ba297..0c4d75fb0ad 100644
--- a/app/assets/javascripts/vue_shared/components/notes/system_note.vue
+++ b/app/assets/javascripts/vue_shared/components/notes/system_note.vue
@@ -17,11 +17,12 @@
* />
*/
import $ from 'jquery';
-import { mapGetters, mapActions } from 'vuex';
-import { GlSkeletonLoading } from '@gitlab/ui';
+import { mapGetters, mapActions, mapState } from 'vuex';
+import { GlButton, GlSkeletonLoading, GlTooltipDirective } from '@gitlab/ui';
import descriptionVersionHistoryMixin from 'ee_else_ce/notes/mixins/description_version_history';
import noteHeader from '~/notes/components/note_header.vue';
import Icon from '~/vue_shared/components/icon.vue';
+import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import TimelineEntryItem from './timeline_entry_item.vue';
import { spriteIcon } from '../../../lib/utils/common_utils';
import initMRPopovers from '~/mr_popover/';
@@ -34,9 +35,13 @@ export default {
Icon,
noteHeader,
TimelineEntryItem,
+ GlButton,
GlSkeletonLoading,
},
- mixins: [descriptionVersionHistoryMixin],
+ directives: {
+ GlTooltip: GlTooltipDirective,
+ },
+ mixins: [descriptionVersionHistoryMixin, glFeatureFlagsMixin()],
props: {
note: {
type: Object,
@@ -50,6 +55,7 @@ export default {
},
computed: {
...mapGetters(['targetNoteHash']),
+ ...mapState(['descriptionVersion', 'isLoadingDescriptionVersion']),
noteAnchorId() {
return `note_${this.note.id}`;
},
@@ -80,7 +86,7 @@ export default {
initMRPopovers(this.$el.querySelectorAll('.gfm-merge_request'));
},
methods: {
- ...mapActions(['fetchDescriptionVersion']),
+ ...mapActions(['fetchDescriptionVersion', 'softDeleteDescriptionVersion']),
},
};
</script>
@@ -122,6 +128,16 @@ export default {
<gl-skeleton-loading />
</pre>
<pre v-else class="wrapper mt-2" v-html="descriptionVersion"></pre>
+ <gl-button
+ v-if="canDeleteDescriptionVersion"
+ ref="deleteDescriptionVersionButton"
+ v-gl-tooltip
+ :title="__('Remove description history')"
+ class="btn-transparent delete-description-history"
+ @click="deleteDescriptionVersion"
+ >
+ <icon name="remove" />
+ </gl-button>
</div>
</div>
</div>