feat: show delete confirmation dialog when clicking "Delete & re-draft" menu (#2296)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
parent
8df73b13bd
commit
0a8cc317a9
@ -81,7 +81,13 @@ async function deleteStatus() {
|
||||
}
|
||||
|
||||
async function deleteAndRedraft() {
|
||||
// TODO confirm to delete
|
||||
if (await openConfirmDialog({
|
||||
title: t('confirm.delete_posts.title'),
|
||||
confirm: t('confirm.delete_posts.confirm'),
|
||||
cancel: t('confirm.delete_posts.cancel'),
|
||||
}) !== 'confirm')
|
||||
return
|
||||
|
||||
if (process.dev) {
|
||||
// eslint-disable-next-line no-alert
|
||||
const result = confirm('[DEV] Are you sure you want to delete and re-draft this post?')
|
||||
|
Loading…
Reference in New Issue
Block a user