forked from mirror/pixelfed
Merge pull request #718 from cmho/702-confirm-deletion
[702] Add confirmation check to post deletion function
This commit is contained in:
commit
b7f866441c
1 changed files with 14 additions and 11 deletions
|
@ -496,6 +496,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
deletePost() {
|
deletePost() {
|
||||||
|
var result = confirm('Are you sure you want to delete this post?');
|
||||||
|
if (result) {
|
||||||
if($('body').hasClass('loggedIn') == false) {
|
if($('body').hasClass('loggedIn') == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -511,4 +513,5 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue