feat(common): handleConfirm -> handleActivateA, handleCancel -> handleActivateB
This commit is contained in:
@@ -84,7 +84,7 @@ onMounted(() => {
|
||||
animateIntro();
|
||||
});
|
||||
|
||||
const handleCancel = async () => {
|
||||
const handleActivateB = async () => {
|
||||
if (isAnimating.value) return;
|
||||
switch (state.value) {
|
||||
case "alive": {
|
||||
@@ -94,14 +94,14 @@ const handleCancel = async () => {
|
||||
bLabel: $t("common.no"),
|
||||
aLabel: $t("common.yes"),
|
||||
onClosed: async (choice) => {
|
||||
if (choice === "confirm") {
|
||||
if (choice === "A") {
|
||||
await animateOutro();
|
||||
store.closeSubMenu();
|
||||
} else {
|
||||
state.value = "alive";
|
||||
}
|
||||
},
|
||||
keepButtonsDown: (choice) => choice === "confirm",
|
||||
keepButtonsDown: (choice) => choice === "A",
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ const handleCancel = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleConfirm = () => {
|
||||
const handleActivateA = () => {
|
||||
if (isAnimating.value) return;
|
||||
switch (state.value) {
|
||||
case "alive": {
|
||||
@@ -125,7 +125,7 @@ const handleConfirm = () => {
|
||||
bLabel: $t("common.no"),
|
||||
aLabel: $t("common.yes"),
|
||||
onClosed: (choice) => {
|
||||
if (choice === "confirm") {
|
||||
if (choice === "A") {
|
||||
spawn();
|
||||
} else {
|
||||
state.value = "alive";
|
||||
@@ -334,7 +334,7 @@ defineOptions({ render: () => null });
|
||||
:y-offset="confirmationModal.buttonsYOffset + store.submenuButtonsOffsetY"
|
||||
:b-label="$t('common.quit')"
|
||||
:a-label="state === 'waiting' ? $t('common.start') : $t('common.restart')"
|
||||
@activate-b="handleCancel"
|
||||
@activate-a="handleConfirm"
|
||||
@activate-b="handleActivateB"
|
||||
@activate-a="handleActivateA"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -67,13 +67,13 @@ onMounted(() => {
|
||||
animateIntro();
|
||||
});
|
||||
|
||||
const handleCancel = async () => {
|
||||
const handleActivateB = async () => {
|
||||
if (isAnimating.value) return;
|
||||
await animateOutro();
|
||||
store.closeSubMenu();
|
||||
};
|
||||
|
||||
const handleConfirm = async () => {
|
||||
const handleActivateA = async () => {
|
||||
if (isAnimating.value) return;
|
||||
await animateOutro();
|
||||
store.closeSubMenu();
|
||||
@@ -130,7 +130,7 @@ defineOptions({ render: () => null });
|
||||
:y-offset="store.submenuButtonsOffsetY"
|
||||
:b-label="$t('common.cancel')"
|
||||
:a-label="$t('common.confirm')"
|
||||
@activate-b="handleCancel"
|
||||
@activate-a="handleConfirm"
|
||||
@activate-b="handleActivateB"
|
||||
@activate-a="handleActivateA"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user