From 2bf4f8913af1349015a87258a81d7af348283578 Mon Sep 17 00:00:00 2001 From: Chris <1633711653@qq.com> Date: Sun, 27 Nov 2022 13:08:13 +0800 Subject: [PATCH] fix: update route name when delete status (#151) --- components/status/StatusActions.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index 1a918bc7..2ba53cd6 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -79,9 +79,15 @@ const copyLink = async () => { } const deleteStatus = async () => { // TODO confirm to delete + if (process.dev) { + const result = confirm('[DEV] Are you sure you want to delete this post?') + if (!result) + return + } await useMasto().statuses.remove(status.id) - if (route.name === '@user-post') + + if (route.name === '@account-status') router.back() // TODO when timeline, remove this item