feat: implement some TODOs
This commit is contained in:
@@ -37,7 +37,7 @@ onRender((ctx) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// progress text
|
// progress text
|
||||||
const unlockedCount = achievementsStore.achievements.length;
|
const unlockedCount = achievementsStore.unlocked.length;
|
||||||
const totalCount = ACHIEVEMENTS.length;
|
const totalCount = ACHIEVEMENTS.length;
|
||||||
|
|
||||||
ctx.font = "7px NDS7";
|
ctx.font = "7px NDS7";
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// TODO: buttons should take in account opacity
|
|
||||||
|
|
||||||
import Background from "./Background.vue";
|
import Background from "./Background.vue";
|
||||||
import Buttons from "./Buttons.vue";
|
import Buttons from "./Buttons.vue";
|
||||||
import ButtonSelector from "~/components/Common/ButtonSelector.vue";
|
import ButtonSelector from "~/components/Common/ButtonSelector.vue";
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ onRender((ctx) => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
:model-value="achievements.achievements.length"
|
:model-value="achievements.unlocked.length"
|
||||||
:title="$t('settings.clock.achievements.obtained')"
|
:title="$t('settings.clock.achievements.obtained')"
|
||||||
:x="4 * 16 - 1"
|
:x="4 * 16 - 1"
|
||||||
:selected="achievements.allObtained"
|
:selected="achievements.allObtained"
|
||||||
|
|||||||
@@ -16,15 +16,11 @@ const handleCancel = () => {
|
|||||||
switch (state.value) {
|
switch (state.value) {
|
||||||
case "alive": {
|
case "alive": {
|
||||||
state.value = "pause";
|
state.value = "pause";
|
||||||
// TODO: onClosed should as "choice" as a parameter, like "confirmed" or "canceled"
|
|
||||||
let quit = false;
|
|
||||||
confirmationModal.open({
|
confirmationModal.open({
|
||||||
text: $t("settings.user.personalMessage.quitConfirmation"),
|
text: $t("settings.user.personalMessage.quitConfirmation"),
|
||||||
onConfirm: () => {
|
onConfirm: () => {},
|
||||||
quit = true;
|
onClosed: (choice) => {
|
||||||
},
|
if (choice === "cancel") store.closeSubMenu();
|
||||||
onClosed: () => {
|
|
||||||
if (quit) store.closeSubMenu();
|
|
||||||
},
|
},
|
||||||
onCancel: () => {
|
onCancel: () => {
|
||||||
state.value = "alive";
|
state.value = "alive";
|
||||||
|
|||||||
@@ -72,8 +72,7 @@ export const useAchievementsStore = defineStore("achievements", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// TODO: rename to unlocked
|
unlocked: computed(() => storage.value.unlocked),
|
||||||
achievements: computed(() => storage.value.unlocked),
|
|
||||||
advancement: computed(() => storage.value.advancement),
|
advancement: computed(() => storage.value.advancement),
|
||||||
allObtained: computed(
|
allObtained: computed(
|
||||||
() => storage.value.unlocked.length === ACHIEVEMENTS.length,
|
() => storage.value.unlocked.length === ACHIEVEMENTS.length,
|
||||||
|
|||||||
@@ -96,15 +96,7 @@ export const useConfirmationModal = defineStore("confirmationModal", {
|
|||||||
})
|
})
|
||||||
.call(() => {
|
.call(() => {
|
||||||
const closedCallback = this.onClosed;
|
const closedCallback = this.onClosed;
|
||||||
|
this.$reset();
|
||||||
// TODO: this.$reset() ?
|
|
||||||
this.isVisible = false;
|
|
||||||
this.isClosing = false;
|
|
||||||
this.isOpen = false;
|
|
||||||
this.text = "";
|
|
||||||
this.onConfirm = null;
|
|
||||||
this.onClosed = null;
|
|
||||||
|
|
||||||
closedCallback?.(choice);
|
closedCallback?.(choice);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user