frontend changes
Build / Build-image (push) Successful in 1m0s

This commit is contained in:
2026-08-10 09:54:38 +02:00
parent 10505c2dd5
commit fc41d52751
4 changed files with 63 additions and 21 deletions
+15
View File
@@ -8,6 +8,7 @@
"@nuxt/ui": "^4.10.0", "@nuxt/ui": "^4.10.0",
"@vitejs/plugin-vue": "^6.0.8", "@vitejs/plugin-vue": "^6.0.8",
"axios": "^1.19.0", "axios": "^1.19.0",
"valibot": "^1.4.2",
"vue": "^3.5.41", "vue": "^3.5.41",
"vue-router": "^5.2.0" "vue-router": "^5.2.0"
}, },
@@ -5464,6 +5465,20 @@
"untyped": "dist/cli.mjs" "untyped": "dist/cli.mjs"
} }
}, },
"node_modules/valibot": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/valibot/-/valibot-1.4.2.tgz",
"integrity": "sha512-gjdCvJ6d3RyHAneqxMYMW9QMCwYMb3jpOO0IyHZV1bnRHFBHrX3VkIILt5XYR0WhwHiH7Mty8ovuPZ/O3gamrg==",
"license": "MIT",
"peerDependencies": {
"typescript": ">=5"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/vaul-vue": { "node_modules/vaul-vue": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/vaul-vue/-/vaul-vue-0.4.1.tgz", "resolved": "https://registry.npmjs.org/vaul-vue/-/vaul-vue-0.4.1.tgz",
+1
View File
@@ -17,6 +17,7 @@
"@nuxt/ui": "^4.10.0", "@nuxt/ui": "^4.10.0",
"@vitejs/plugin-vue": "^6.0.8", "@vitejs/plugin-vue": "^6.0.8",
"axios": "^1.19.0", "axios": "^1.19.0",
"valibot": "^1.4.2",
"vue": "^3.5.41", "vue": "^3.5.41",
"vue-router": "^5.2.0" "vue-router": "^5.2.0"
} }
+15
View File
@@ -0,0 +1,15 @@
<template>
<div class="gw-div">
<slot></slot>
</div>
</template>
<style scoped>
.gw-div {
border-radius: 5px;
padding: 5px;
margin: 5px;
justify-content: center;
background-color: grey;
}
</style>
+29 -18
View File
@@ -1,13 +1,16 @@
<script lang="ts"> <script setup lang="ts">
import vue from '@vitejs/plugin-vue';
import type { FormSubmitEvent } from '@nuxt/ui';
import axios from 'axios'; import axios from 'axios';
import GuessWord from '../components/GuessWord.vue';
</script>
<script lang="ts">
export default { export default {
data() { data() {
return { return {
hint: ' ', hint: ' ',
guesses: [], guesses: [' '],
words: [' '],
guess: '',
}; };
}, },
@@ -18,11 +21,16 @@
this.hint = response.data.hint; this.hint = response.data.hint;
this.guesses = response.data.guesses; this.guesses = response.data.guesses;
}); });
} },
}
async function onSubmit(event: FormSubmitEvent<Schema>) { methods: {
console.log(event.data) onSubmit() {
console.log('adsf')
},
onkeyup() {
this.words = this.guess.split(" ");
}
}
} }
</script> </script>
@@ -30,23 +38,26 @@
<template> <template>
<UCard> <UCard>
<template #header> <template #header>
{{ this.hint }} {{ hint }}
</template> </template>
<template v-for="guess in guesses"> <template v-for="guess in guesses">
{{ guess }} {{ guess }}
</template> </template>
<template #footer>
<UForm :schema="schema" :state="state" class="space-y-4" @submit="onSubmit">
<UInput
placeholder="Three Letter Abbreviation"
/>
<UButton type="submit"> <template #footer>
Submit
</UButton> <div style="display: flex; flex-direction: row;">
</UForm> <template v-for="word in words">
<GuessWord>
{{ word }}
</GuessWord>
</template>
</div>
<form @submit="onSubmit" onsubmit="return false">
<input type="text" @keyup="onkeyup" v-model="guess">
</form>
</template> </template>
</UCard> </UCard>