feat: confirm modal + chore(deps): bump

This commit is contained in:
Liyas Thomas
2020-12-14 10:35:14 +05:30
parent 858ab252a6
commit 81a6d821c0
9 changed files with 211 additions and 106 deletions

View File

@@ -46,7 +46,7 @@
</button>
</div>
<div>
<button class="icon" @click="removeCollection" v-close-popover>
<button class="icon" @click="confirmRemove = true" v-close-popover>
<i class="material-icons">delete</i>
<span>{{ $t("delete") }}</span>
</button>
@@ -103,6 +103,12 @@
</li>
</ul>
</div>
<confirm-modal
:show="confirmRemove"
:title="$t('are_you_sure_remove_collection')"
@hide-modal="confirmRemove = false"
@resolve="removeCollection"
/>
</div>
</template>
@@ -121,6 +127,7 @@ export default {
showChildren: false,
dragging: false,
selectedFolder: {},
confirmRemove: false,
}
},
methods: {
@@ -135,7 +142,6 @@ export default {
this.showChildren = !this.showChildren
},
removeCollection() {
if (!confirm(this.$t("are_you_sure_remove_collection"))) return
this.$store.commit("postwoman/removeCollection", {
collectionIndex: this.collectionIndex,
})