chore : working on game

This commit is contained in:
2024-12-30 00:39:39 +01:00
parent 9a0c26dd80
commit 08daf733d1
5 changed files with 48 additions and 29 deletions
+6 -2
View File
@@ -21,9 +21,13 @@ const currentGames = computed(() => {
<ClientOnly>
<template v-if="userStore.self && userStore.self.id">
<User :id="userStore.self.id"></User>
<button>Logout</button>
<NuxtLink :to="$config.public.endpoint + '/logout'"
><button>Logout</button></NuxtLink
>
</template>
<button v-else>Login</button>
<NuxtLink v-else :to="$config.public.discordLoginEndpoint">
<button>Login</button>
</NuxtLink>
</ClientOnly>
</template>
+4
View File
@@ -16,10 +16,14 @@ const game = lobbyStore.games[props.id];
</script>
<template>
{{ game.id }}
{{ game.players.map((p) => p.user.username) }}
{{ game }}
<NuxtLink :to="'/game/' + id"
><input type="button" value="open" :disabled="!userStore.self || loading"
/></NuxtLink>
<br />
</template>
<style lang="css" scoped>