2018-03-21 10:05:08 +00:00
|
|
|
<script>
|
|
|
|
import { mapActions } from 'vuex';
|
|
|
|
import Icon from '~/vue_shared/components/icon.vue';
|
2018-03-22 10:14:27 +00:00
|
|
|
import tooltip from '~/vue_shared/directives/tooltip';
|
2018-03-21 10:05:08 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Icon,
|
|
|
|
},
|
2018-03-22 10:14:27 +00:00
|
|
|
directives: {
|
|
|
|
tooltip,
|
|
|
|
},
|
2018-03-21 10:05:08 +00:00
|
|
|
props: {
|
2018-03-21 11:06:39 +00:00
|
|
|
path: {
|
|
|
|
type: String,
|
2018-03-21 10:05:08 +00:00
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
...mapActions(['stageChange', 'discardFileChanges']),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-once
|
|
|
|
class="multi-file-discard-btn"
|
|
|
|
>
|
|
|
|
<button
|
2018-03-22 10:14:27 +00:00
|
|
|
v-tooltip
|
2018-03-21 10:05:08 +00:00
|
|
|
type="button"
|
|
|
|
class="btn btn-blank append-right-5"
|
2018-03-22 10:14:27 +00:00
|
|
|
:aria-label="__('Stage changes')"
|
|
|
|
:title="__('Stage changes')"
|
|
|
|
data-container="body"
|
2018-03-21 11:06:39 +00:00
|
|
|
@click.stop="stageChange(path)"
|
2018-03-21 10:05:08 +00:00
|
|
|
>
|
|
|
|
<icon
|
|
|
|
name="mobile-issue-close"
|
|
|
|
:size="12"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
<button
|
2018-03-22 10:14:27 +00:00
|
|
|
v-tooltip
|
2018-03-21 10:05:08 +00:00
|
|
|
type="button"
|
|
|
|
class="btn btn-blank"
|
2018-03-22 10:14:27 +00:00
|
|
|
:aria-label="__('Discard changes')"
|
|
|
|
:title="__('Discard changes')"
|
|
|
|
data-container="body"
|
2018-03-21 11:06:39 +00:00
|
|
|
@click.stop="discardFileChanges(path)"
|
2018-03-21 10:05:08 +00:00
|
|
|
>
|
|
|
|
<icon
|
|
|
|
name="remove"
|
|
|
|
:size="12"
|
|
|
|
/>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</template>
|