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:
Diffstat (limited to 'app/assets/javascripts/merge_conflicts/components')
-rw-r--r--app/assets/javascripts/merge_conflicts/components/diff_file_editor.vue34
-rw-r--r--app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.vue2
-rw-r--r--app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.vue2
3 files changed, 21 insertions, 17 deletions
diff --git a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.vue b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.vue
index 7649c363daa..04e493712ec 100644
--- a/app/assets/javascripts/merge_conflicts/components/diff_file_editor.vue
+++ b/app/assets/javascripts/merge_conflicts/components/diff_file_editor.vue
@@ -1,4 +1,5 @@
<script>
+import { GlButton } from '@gitlab/ui';
import { debounce } from 'lodash';
import { mapActions } from 'vuex';
import { deprecatedCreateFlash as flash } from '~/flash';
@@ -7,6 +8,9 @@ import { __ } from '~/locale';
import { INTERACTIVE_RESOLVE_MODE } from '../constants';
export default {
+ components: {
+ GlButton,
+ },
props: {
file: {
type: Object,
@@ -100,21 +104,21 @@ export default {
};
</script>
<template>
- <div v-show="file.showEditor" class="diff-editor-wrap">
- <div v-if="file.promptDiscardConfirmation" class="discard-changes-alert-wrap">
- <div class="discard-changes-alert">
- {{ __('Are you sure you want to discard your changes?') }}
- <div class="discard-actions">
- <button
- class="btn btn-sm btn-danger-secondary gl-button"
- @click="acceptDiscardConfirmation(file)"
- >
- {{ __('Discard changes') }}
- </button>
- <button class="btn btn-default btn-sm gl-button" @click="cancelDiscardConfirmation(file)">
- {{ __('Cancel') }}
- </button>
- </div>
+ <div v-show="file.showEditor">
+ <div v-if="file.promptDiscardConfirmation" class="discard-changes-alert">
+ {{ __('Are you sure you want to discard your changes?') }}
+ <div class="gl-ml-3 gl-display-inline-block">
+ <gl-button
+ size="small"
+ variant="danger"
+ category="secondary"
+ @click="acceptDiscardConfirmation(file)"
+ >
+ {{ __('Discard changes') }}
+ </gl-button>
+ <gl-button size="small" @click="cancelDiscardConfirmation(file)">
+ {{ __('Cancel') }}
+ </gl-button>
</div>
</div>
<div :class="classObject" class="editor-wrap">
diff --git a/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.vue b/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.vue
index 9721481e6be..a856d38c089 100644
--- a/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.vue
+++ b/app/assets/javascripts/merge_conflicts/components/inline_conflict_lines.vue
@@ -35,7 +35,7 @@ export default {
<td :class="lineCssClass(line)" class="diff-line-num header"></td>
<td :class="lineCssClass(line)" class="line_content header">
<strong>{{ line.richText }}</strong>
- <button class="btn" @click="handleSelected({ file, line })">
+ <button type="button" @click="handleSelected({ file, line })">
{{ line.buttonTitle }}
</button>
</td>
diff --git a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.vue b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.vue
index 7b1d947ccff..2c89b614c87 100644
--- a/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.vue
+++ b/app/assets/javascripts/merge_conflicts/components/parallel_conflict_lines.vue
@@ -35,7 +35,7 @@ export default {
<td class="diff-line-num header" :class="lineCssClass(line)"></td>
<td class="line_content header" :class="lineCssClass(line)">
<strong>{{ line.richText }}</strong>
- <button class="btn" @click="handleSelected({ file, line })">
+ <button type="button" @click="handleSelected({ file, line })">
{{ line.buttonTitle }}
</button>
</td>