fix join link
This commit is contained in:
parent
0adbad651f
commit
16a688212e
|
|
@ -29,7 +29,6 @@ const ready = () => {
|
||||||
if (game.mode == 'single') useBotStore().generate()
|
if (game.mode == 'single') useBotStore().generate()
|
||||||
if (board.isAllItemsReady(game.player.items)) game.ready()
|
if (board.isAllItemsReady(game.player.items)) game.ready()
|
||||||
}
|
}
|
||||||
|
|
||||||
const copyJoinLink = async () => {
|
const copyJoinLink = async () => {
|
||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(window.location.origin + '/join/' + game.id);
|
await navigator.clipboard.writeText(window.location.origin + '/join/' + game.id);
|
||||||
|
|
@ -71,7 +70,7 @@ onBeforeUnmount(() => {
|
||||||
<div class="lobby">
|
<div class="lobby">
|
||||||
<div class="lobby-buttons">
|
<div class="lobby-buttons">
|
||||||
<button v-if="game.player.status == 'lobby'" 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.copyLink") }}</button>
|
<button v-if="game.player.status == 'ready'" class="button-lobby" @click="copyJoinLink()">{{ $t("button.copyLink") }}</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