Template
feat : lobby
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
import { useLobbyStore } from "~/store/lobby.store";
|
||||
import { useUserStore } from "~/store/user.store";
|
||||
|
||||
export interface Props {
|
||||
id: number;
|
||||
}
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const lobbyStore = useLobbyStore();
|
||||
const userStore = useUserStore();
|
||||
const props = defineProps<Props>();
|
||||
|
||||
const game = lobbyStore.games[props.id];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
{{ game }}
|
||||
<NuxtLink :to="'/game/' + id"
|
||||
><input type="button" value="open" :disabled="!userStore.self || loading"
|
||||
/></NuxtLink>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
input:disabled {
|
||||
cursor: wait;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user