mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-24 18:26:17 +03:00
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
1 changed files with 7 additions and 1 deletions
|
@ -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 a new issue