Files
front/app.vue
T
2024-05-01 14:26:20 +02:00

26 lines
701 B
Vue

<script setup lang="ts">
import { ref } from 'vue';
import goStore, { register, setReady } from '@/netcode';
let username = ref<string>('legonzaur')
</script>
<template>
<input v-if="!goStore.self && !goStore.game?.started" type="text" v-model="username">
<button v-if="!goStore.self && !goStore.game?.started" @click="register(username)">LOGIN</button>
<input @change="setReady(($event.target as HTMLInputElement).checked)" v-if="goStore.self && !goStore.game?.started"
type="checkbox" id="ready">
<label v-if="goStore.self && !goStore.game?.started" for="scales">Ready</label>
<div>
<GameBoard></GameBoard>
</div>
</template>
<style>
html {
text-align: center;
}
</style>