add copy link button
This commit is contained in:
parent
e82accd24b
commit
483dadaa4e
|
|
@ -27,8 +27,8 @@ const generate = () => {
|
|||
//Set ready status for player
|
||||
const ready = () => {
|
||||
if (game.mode == 'single') useBotStore().generate()
|
||||
if (board.isAllItemsReady(game.player.items))
|
||||
game.ready()
|
||||
if (game.player.status == 'ready') game.player.status = 'lobby'
|
||||
if (board.isAllItemsReady(game.player.items)) game.ready()
|
||||
}
|
||||
const drawCell = (row, col) => {
|
||||
let classes = ''
|
||||
|
|
@ -63,7 +63,8 @@ onBeforeUnmount(() => {
|
|||
<template>
|
||||
<div class="lobby">
|
||||
<div class="lobby-buttons">
|
||||
<button class="button-lobby" @click="generate()">{{ $t("button.generate") }}</button>
|
||||
<button v-if="game.player.status == 'lobby'" class="button-lobby" @click="generate()">{{ $t("button.generate") }}</button>
|
||||
<button v-if="game.player.status == 'ready'" class="button-lobby" @click="generate()">{{ $t("button.copy_link") }}</button>
|
||||
<button class="button-lobby" @click="ready()">{{ game.player.status == 'ready' ? $t("button.cancel") : $t("button.ready") }}</button>
|
||||
</div>
|
||||
<div class="lake-border">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user