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