feat: implement some TODOs
This commit is contained in:
@@ -16,15 +16,11 @@ const handleCancel = () => {
|
||||
switch (state.value) {
|
||||
case "alive": {
|
||||
state.value = "pause";
|
||||
// TODO: onClosed should as "choice" as a parameter, like "confirmed" or "canceled"
|
||||
let quit = false;
|
||||
confirmationModal.open({
|
||||
text: $t("settings.user.personalMessage.quitConfirmation"),
|
||||
onConfirm: () => {
|
||||
quit = true;
|
||||
},
|
||||
onClosed: () => {
|
||||
if (quit) store.closeSubMenu();
|
||||
onConfirm: () => {},
|
||||
onClosed: (choice) => {
|
||||
if (choice === "cancel") store.closeSubMenu();
|
||||
},
|
||||
onCancel: () => {
|
||||
state.value = "alive";
|
||||
|
||||
Reference in New Issue
Block a user