feat(common): handleConfirm -> handleActivateA, handleCancel -> handleActivateB

This commit is contained in:
2026-02-10 15:30:08 +01:00
parent ca05d0ea65
commit 38b36d0e1c
12 changed files with 60 additions and 63 deletions

View File

@@ -15,12 +15,12 @@ const handleActivateB = () => {
bLabel: $t("common.no"),
aLabel: $t("common.yes"),
onClosed: async (choice) => {
if (choice === "confirm") {
if (choice === "A") {
await animateOutro();
store.closeSubMenu();
}
},
keepButtonsDown: (choice) => choice === "confirm",
keepButtonsDown: (choice) => choice === "A",
});
};
@@ -35,7 +35,7 @@ const handleActivateA = () => {
bLabel: $t("common.no"),
aLabel: $t("common.yes"),
onClosed: (choice) => {
if (choice === "confirm") {
if (choice === "A") {
resetBoard();
}
},
@@ -116,9 +116,9 @@ let animating = false;
const showRestartModal = () => {
confirmationModal.open({
text: $t("settings.options.2048.gameOver"),
onConfirm: () => {},
onActivateA: () => {},
onClosed: (choice) => {
if (choice === "confirm") {
if (choice === "A") {
resetBoard();
}
},