27 lines
644 B
Vue
27 lines
644 B
Vue
<script setup lang="ts">
|
|
import goStore, { netcode_create_game, join_game } from '~/netcode';
|
|
|
|
const config = useRuntimeConfig()
|
|
|
|
|
|
async function discordLogin() {
|
|
await navigateTo(config.public.discordLoginEndpoint, {
|
|
external: true
|
|
})
|
|
}
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div v-if="goStore.current_game?.started">
|
|
<b>SPECTATOR MODE</b>
|
|
</div>
|
|
|
|
<template v-if="!goStore.current_game?.started">
|
|
<!-- <input type="text" v-model="username" />
|
|
<button @click="register(username)">LOGIN</button> -->
|
|
<button @click="discordLogin()">DISCORD</button>
|
|
</template>
|
|
</template>
|
|
|
|
<style scoped></style> |