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