feat(settings): change button labels for question (yes/no instead of confirm/cancel)
This commit is contained in:
@@ -91,16 +91,16 @@ const handleCancel = async () => {
|
||||
state.value = "pause";
|
||||
confirmationModal.open({
|
||||
text: $t("settings.user.snake.quitConfirmation"),
|
||||
onConfirm: () => {},
|
||||
bLabel: $t("common.no"),
|
||||
aLabel: $t("common.yes"),
|
||||
onClosed: async (choice) => {
|
||||
if (choice === "confirm") {
|
||||
await animateOutro();
|
||||
store.closeSubMenu();
|
||||
} else {
|
||||
state.value = "alive";
|
||||
}
|
||||
},
|
||||
onCancel: () => {
|
||||
state.value = "alive";
|
||||
},
|
||||
keepButtonsDown: (choice) => choice === "confirm",
|
||||
});
|
||||
break;
|
||||
@@ -122,11 +122,14 @@ const handleConfirm = () => {
|
||||
state.value = "pause";
|
||||
confirmationModal.open({
|
||||
text: $t("settings.user.snake.restartConfirmation"),
|
||||
onConfirm: () => {
|
||||
spawn();
|
||||
},
|
||||
onCancel: () => {
|
||||
state.value = "alive";
|
||||
bLabel: $t("common.no"),
|
||||
aLabel: $t("common.yes"),
|
||||
onClosed: (choice) => {
|
||||
if (choice === "confirm") {
|
||||
spawn();
|
||||
} else {
|
||||
state.value = "alive";
|
||||
}
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user