feat(settings): change button labels for question (yes/no instead of confirm/cancel)

This commit is contained in:
2026-02-10 15:01:40 +01:00
parent a932c9aac9
commit 399bf8bb0d
3 changed files with 22 additions and 13 deletions

View File

@@ -108,8 +108,12 @@ const handleReset = () => {
if (isAnimating.value) return;
confirmationModal.open({
text: $t("settings.clock.achievements.resetConfirmation"),
onConfirm: () => {
bLabel: $t("common.no"),
aLabel: $t("common.yes"),
onClosed: (choice) => {
if (choice === "confirm") {
achievements.reset();
}
},
});
};

View File

@@ -12,7 +12,8 @@ const handleActivateB = () => {
if (isAnimating.value) return;
confirmationModal.open({
text: $t("settings.options.2048.quitConfirmation"),
onConfirm: () => {},
bLabel: $t("common.no"),
aLabel: $t("common.yes"),
onClosed: async (choice) => {
if (choice === "confirm") {
await animateOutro();
@@ -31,7 +32,8 @@ const handleActivateA = () => {
}
confirmationModal.open({
text: $t("settings.options.2048.restartConfirmation"),
onConfirm: () => {},
bLabel: $t("common.no"),
aLabel: $t("common.yes"),
onClosed: (choice) => {
if (choice === "confirm") {
resetBoard();

View File

@@ -91,15 +91,15 @@ 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();
}
},
onCancel: () => {
} else {
state.value = "alive";
}
},
keepButtonsDown: (choice) => choice === "confirm",
});
@@ -122,11 +122,14 @@ const handleConfirm = () => {
state.value = "pause";
confirmationModal.open({
text: $t("settings.user.snake.restartConfirmation"),
onConfirm: () => {
bLabel: $t("common.no"),
aLabel: $t("common.yes"),
onClosed: (choice) => {
if (choice === "confirm") {
spawn();
},
onCancel: () => {
} else {
state.value = "alive";
}
},
});
break;