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>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<WS-Entry v-if="state == 'ws-url'" @set-ws-url="websocket_url = $event" />
|
<WS-Entry
|
||||||
<Game-Code v-else-if="state == 'game-code'" @set-game-code="game_code = $event" />
|
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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import JoinHost from './components/JoinHost';
|
||||||
import GameCodeEntry from './components/GameCode';
|
import GameCodeEntry from './components/GameCode';
|
||||||
import WebsocketEntry from './components/WebsocketURL';
|
import WebsocketEntry from './components/WebsocketURL';
|
||||||
|
|
||||||
|
|
@ -14,6 +24,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
'WS-Entry': WebsocketEntry,
|
'WS-Entry': WebsocketEntry,
|
||||||
'Game-Code': GameCodeEntry,
|
'Game-Code': GameCodeEntry,
|
||||||
|
'Join-Or-Host': JoinHost,
|
||||||
},
|
},
|
||||||
data() {return {
|
data() {return {
|
||||||
state: `ws-url`,
|
state: `ws-url`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue