🛂 Добавил авторизацию

This commit is contained in:
2021-03-28 00:32:14 +03:00
parent 9835949e9b
commit 8a48043960
9 changed files with 193 additions and 39 deletions

View File

@@ -1,15 +1,28 @@
<template>
<h1>🎰 Flex Bingo 🎰</h1>
<Game id="game" />
<Login id="login" @loggedIn="login" v-show="!loggedIn" />
<Game id="game" v-if="loggedIn" />
</template>
<script>
import Login from './components/Login.vue'
import Game from './components/Game.vue'
export default {
name: 'App',
components: {
Login,
Game
},
data() {
return {
loggedIn: null
}
},
methods: {
login: function(success) {
this.loggedIn = success
}
}
}
</script>
@@ -30,7 +43,17 @@ body {
}
#game {
margin-left: 25%;
margin: auto;
margin-bottom: 100px;
}
.correct {
background-color: rgb(124, 230, 124) !important;
}
.highlight_correct {
border: 1px solid rgb(124, 230, 124);
}
.wrong {
background-color: rgb(255, 71, 71) !important;
}
</style>