Add another step to game beginning
This commit is contained in:
parent
0934c2b3e8
commit
daa83b2da6
1 changed files with 15 additions and 4 deletions
15
src/App.vue
15
src/App.vue
|
|
@ -1,11 +1,21 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<WS-Entry v-if="state == 'ws-url'" @set-ws-url="websocket_url = $event" />
|
||||
<Game-Code v-else-if="state == 'game-code'" @set-game-code="game_code = $event" />
|
||||
<WS-Entry
|
||||
v-if="state == 'ws-url'"
|
||||
@set-ws-url="websocket_url = $event"
|
||||
/>
|
||||
<Join-Or-Host
|
||||
v-else-if="state == 'game-type'"
|
||||
/>
|
||||
<Game-Code
|
||||
v-else-if="state == 'game-code'"
|
||||
@set-game-code="game_code = $event"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JoinHost from './components/JoinHost';
|
||||
import GameCodeEntry from './components/GameCode';
|
||||
import WebsocketEntry from './components/WebsocketURL';
|
||||
|
||||
|
|
@ -14,6 +24,7 @@ export default {
|
|||
components: {
|
||||
'WS-Entry': WebsocketEntry,
|
||||
'Game-Code': GameCodeEntry,
|
||||
'Join-Or-Host': JoinHost,
|
||||
},
|
||||
data() {return {
|
||||
state: `ws-url`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue