21 lines
653 B
Vue
21 lines
653 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>
|