Added dialog to add stashes.

This commit is contained in:
DebaucheryLibrarian
2021-03-20 03:22:08 +01:00
parent e88cf4e3f4
commit bb9d6ee8fc
12 changed files with 143 additions and 7 deletions

View File

@@ -0,0 +1,49 @@
<template>
<Dialog
title="Add stash"
@close="$emit('close')"
>
<form @submit.prevent="addStash">
<input
ref="name"
v-model="name"
type="input"
placeholder="Name"
class="input"
>
<div class="dialog-actions right">
<button
type="submit"
class="button button-primary"
>Add</button>
</div>
</form>
</Dialog>
</template>
<script>
async function addStash() {
await this.$store.dispatch('createStash', {
name: this.name,
});
this.$emit('close');
}
function mounted() {
this.$refs.name.focus();
}
export default {
data() {
return {
name: null,
};
},
mounted,
methods: {
addStash,
},
};
</script>