feat: esc key to exit multiple dialogs (#692)

* fix: `esc` key to exit multiple dialogs

* update

* update

* update

* Update web/src/components/Dialog/BaseDialog.tsx

Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
Zeng1998
2022-12-18 18:09:12 +08:00
committed by GitHub
parent e79d67d127
commit 55695f2189
22 changed files with 87 additions and 3 deletions

View File

@ -79,6 +79,7 @@ const PreferencesSection = () => {
title: `Archive Member`,
content: `Are you sure to archive ${user.username}?`,
style: "warning",
dialogName: "archive-user-dialog",
onConfirm: async () => {
await userStore.patchUser({
id: user.id,
@ -102,6 +103,7 @@ const PreferencesSection = () => {
title: `Delete Member`,
content: `Are you sure to delete ${user.username}? THIS ACTION IS IRREVERSIABLE.❗️`,
style: "warning",
dialogName: "delete-user-dialog",
onConfirm: async () => {
await userStore.deleteUser({
id: user.id,