syncing and styling

This commit is contained in:
Steffen 2020-06-05 20:19:49 +02:00
parent 556d61ec58
commit bc6eb9a11a
No known key found for this signature in database
GPG Key ID: 764D74E98267DFC6
2 changed files with 20 additions and 5 deletions

View File

@ -10,10 +10,12 @@
: '' : ''
}" }"
> >
<Intro v-if="!players.length"></Intro> <transition name="zoom">
<TownInfo v-if="players.length && !session.nomination"></TownInfo> <Intro v-if="!players.length"></Intro>
<TownInfo v-if="players.length && !session.nomination"></TownInfo>
<Vote v-if="session.nomination"></Vote>
</transition>
<TownSquare @screenshot="takeScreenshot"></TownSquare> <TownSquare @screenshot="takeScreenshot"></TownSquare>
<Vote v-if="session.nomination"></Vote>
<Menu ref="menu"></Menu> <Menu ref="menu"></Menu>
<EditionModal /> <EditionModal />
<RolesModal /> <RolesModal />
@ -163,6 +165,17 @@ ul {
justify-content: center; justify-content: center;
} }
.zoom-enter-active,
.zoom-leave-active {
transition: all 250ms;
filter: blur(0);
}
.zoom-enter,
.zoom-leave-to {
opacity: 0;
filter: blur(20px)
}
// Buttons // Buttons
.button-group { .button-group {
display: flex; display: flex;

View File

@ -167,7 +167,8 @@ class LiveSession {
})); }));
this._send("gs", { this._send("gs", {
gamestate: this._gamestate, gamestate: this._gamestate,
edition: this._store.state.edition edition: this._store.state.edition,
nomination: this._store.state.session.nomination
}); });
} }
@ -177,9 +178,10 @@ class LiveSession {
* @param edition * @param edition
* @private * @private
*/ */
_updateGamestate({ gamestate, edition }) { _updateGamestate({ gamestate, edition, nomination }) {
if (!this._isSpectator) return; if (!this._isSpectator) return;
this._store.commit("setEdition", edition); this._store.commit("setEdition", edition);
this._store.commit("session/nomination", nomination);
const players = this._store.state.players.players; const players = this._store.state.players.players;
// adjust number of players // adjust number of players
if (players.length < gamestate.length) { if (players.length < gamestate.length) {