Commit 8578cf7c authored by dmoraBerlin's avatar dmoraBerlin Committed by Jarek Ostrowski

Updated discard changes button in webIDE

parent 3dcbfee2
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlModal } from '@gitlab/ui'; import { GlModal, GlButton } from '@gitlab/ui';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import FileIcon from '~/vue_shared/components/file_icon.vue'; import FileIcon from '~/vue_shared/components/file_icon.vue';
import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue'; import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue';
...@@ -8,6 +8,7 @@ import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue'; ...@@ -8,6 +8,7 @@ import ChangedFileIcon from '~/vue_shared/components/changed_file_icon.vue';
export default { export default {
components: { components: {
GlModal, GlModal,
GlButton,
FileIcon, FileIcon,
ChangedFileIcon, ChangedFileIcon,
}, },
...@@ -52,15 +53,16 @@ export default { ...@@ -52,15 +53,16 @@ export default {
</strong> </strong>
<changed-file-icon :file="activeFile" :is-centered="false" /> <changed-file-icon :file="activeFile" :is-centered="false" />
<div class="ml-auto"> <div class="ml-auto">
<button <gl-button
v-if="canDiscard" v-if="canDiscard"
ref="discardButton" ref="discardButton"
type="button" category="secondary"
class="btn btn-remove btn-inverted gl-mr-3" variant="danger"
class="gl-mr-3"
@click="showDiscardModal" @click="showDiscardModal"
> >
{{ __('Discard changes') }} {{ __('Discard changes') }}
</button> </gl-button>
</div> </div>
<gl-modal <gl-modal
ref="discardModal" ref="discardModal"
......
---
title: Updated Discard Changes button in WebIDE
merge_request: 41899
author:
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment