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

@@ -43,7 +43,7 @@
</button>
</div>
<div>
<button class="icon" @click="removeFolder" v-close-popover>
<button class="icon" @click="confirmRemove = true" v-close-popover>
<i class="material-icons">delete</i>
<span>{{ $t("delete") }}</span>
</button>
@@ -93,6 +93,12 @@
</li>
</ul>
</div>
<confirm-modal
:show="confirmRemove"
:title="$t('are_you_sure_remove_folder')"
@hide-modal="confirmRemove = false"
@resolve="removeFolder"
/>
</div>
</template>
@@ -113,6 +119,7 @@ export default {
return {
showChildren: false,
dragging: false,
confirmRemove: false,
}
},
methods: {
@@ -127,7 +134,6 @@ export default {
this.showChildren = !this.showChildren
},
removeFolder() {
if (!confirm(this.$t("are_you_sure_remove_folder"))) return
this.$store.commit("postwoman/removeFolder", {
collectionIndex: this.$props.collectionIndex,
folderName: this.$props.folder.name,