feat : guess word

This commit is contained in:
2024-12-30 20:15:02 +01:00
parent 08daf733d1
commit 9eaf7009c6
12 changed files with 304 additions and 54 deletions
+9 -2
View File
@@ -14,6 +14,8 @@ const userStore = useUserStore();
const word = wordStore.words[props.id];
const disabled = computed(() => word.loading || !userStore.self);
async function changeWordState() {
if (word.loading) {
return;
@@ -38,6 +40,11 @@ async function deleteWord() {
word.loading = false;
}
}
onMounted(() => {
setInterval(() => {
console.log(disabled.value);
}, 1000);
});
</script>
<template>
@@ -46,11 +53,11 @@ async function deleteWord() {
<input
type="checkbox"
:checked="word.enabled"
:disabled="word.loading || !userStore.self"
:disabled="disabled"
@click.prevent="changeWordState"
/>
<input
:disabled="word.loading || !userStore.self"
:disabled="disabled"
type="button"
@click="deleteWord"
value="Delete"