traxxx/assets/components/stashes/remove.vue

42 lines
654 B
Vue
Raw Permalink Normal View History

2021-03-20 22:03:13 +00:00
<template>
<Dialog
title="Remove stash"
@close="$emit('close', false)"
>
2021-04-04 22:48:03 +00:00
<form
class="dialog-body"
@submit.prevent="removeStash"
>
2021-03-20 22:03:13 +00:00
Are you sure you want to remove stash "{{ stash.name }}"?
<div class="dialog-actions right">
<button
type="submit"
class="button button-primary"
>Remove</button>
</div>
</form>
</Dialog>
</template>
<script>
async function removeStash() {
await this.$store.dispatch('removeStash', this.stash.id);
this.$emit('close', true);
}
export default {
props: {
stash: {
type: Object,
default: null,
},
},
emits: ['close'],
methods: {
removeStash,
},
};
</script>