mirror of https://github.com/bra1n/townsquare.git
disable all animations now
This commit is contained in:
parent
fe0f0bfbf1
commit
a99d996419
21
src/App.vue
21
src/App.vue
|
@ -3,7 +3,10 @@
|
||||||
id="app"
|
id="app"
|
||||||
@keyup="keyup"
|
@keyup="keyup"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
:class="{ night: grimoire.isNight }"
|
:class="{
|
||||||
|
night: grimoire.isNight,
|
||||||
|
static: grimoire.isStatic
|
||||||
|
}"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundImage: grimoire.background
|
backgroundImage: grimoire.background
|
||||||
? `url('${grimoire.background}')`
|
? `url('${grimoire.background}')`
|
||||||
|
@ -17,8 +20,7 @@
|
||||||
autoplay
|
autoplay
|
||||||
loop
|
loop
|
||||||
></video>
|
></video>
|
||||||
<div v-if="grimoire.isNightAnimated" class="backdrop animated"></div>
|
<div class="backdrop"></div>
|
||||||
<div v-else class="backdrop"></div>
|
|
||||||
<transition name="blur">
|
<transition name="blur">
|
||||||
<Intro v-if="!players.length"></Intro>
|
<Intro v-if="!players.length"></Intro>
|
||||||
<TownInfo v-if="players.length && !session.nomination"></TownInfo>
|
<TownInfo v-if="players.length && !session.nomination"></TownInfo>
|
||||||
|
@ -203,6 +205,14 @@ ul {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
// disable all animations
|
||||||
|
&.static *,
|
||||||
|
&.static *:after,
|
||||||
|
&.static *:before {
|
||||||
|
transition: none !important;
|
||||||
|
animation: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#version {
|
#version {
|
||||||
|
@ -340,14 +350,11 @@ video#background {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: url("assets/clouds.png") repeat;
|
background: url("assets/clouds.png") repeat;
|
||||||
background-size: 2000px auto;
|
background-size: 2000px auto;
|
||||||
|
animation: move-background 120s linear infinite;
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#app > .backdrop.animated:after {
|
|
||||||
animation: move-background 120s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes move-background {
|
@keyframes move-background {
|
||||||
from {
|
from {
|
||||||
transform: translate3d(-2000px, 0px, 0px);
|
transform: translate3d(-2000px, 0px, 0px);
|
||||||
|
|
|
@ -82,28 +82,25 @@
|
||||||
/>
|
/>
|
||||||
</em>
|
</em>
|
||||||
</li>
|
</li>
|
||||||
|
<li @click="setBackground">
|
||||||
|
Background image
|
||||||
|
<em><font-awesome-icon icon="image"/></em>
|
||||||
|
</li>
|
||||||
<li v-if="!edition.isOfficial" @click="imageOptIn">
|
<li v-if="!edition.isOfficial" @click="imageOptIn">
|
||||||
<small>Show Custom Images</small>
|
<small>Show Custom Images</small>
|
||||||
<em
|
<em
|
||||||
><font-awesome-icon
|
><font-awesome-icon
|
||||||
:icon="[
|
:icon="[
|
||||||
'fas',
|
'fas',
|
||||||
grimoire.isImageOptIn ? 'check-square' : 'square'
|
grimoire.isImageOptIn ? 'check-square' : 'square'
|
||||||
]"
|
]"
|
||||||
/></em>
|
/></em>
|
||||||
</li>
|
</li>
|
||||||
<li @click="setBackground">
|
<li @click="toggleStatic">
|
||||||
Background image
|
Disable Animations
|
||||||
<em><font-awesome-icon icon="image"/></em>
|
|
||||||
</li>
|
|
||||||
<li @click="toggleNightAnimated">
|
|
||||||
Animated night
|
|
||||||
<em
|
<em
|
||||||
><font-awesome-icon
|
><font-awesome-icon
|
||||||
:icon="[
|
:icon="['fas', grimoire.isStatic ? 'check-square' : 'square']"
|
||||||
'fas',
|
|
||||||
grimoire.isNightAnimated ? 'check-square' : 'square'
|
|
||||||
]"
|
|
||||||
/></em>
|
/></em>
|
||||||
</li>
|
</li>
|
||||||
<li @click="toggleMuted">
|
<li @click="toggleMuted">
|
||||||
|
@ -344,7 +341,7 @@ export default {
|
||||||
"toggleMuted",
|
"toggleMuted",
|
||||||
"toggleNight",
|
"toggleNight",
|
||||||
"toggleNightOrder",
|
"toggleNightOrder",
|
||||||
"toggleNightAnimated",
|
"toggleStatic",
|
||||||
"setZoom",
|
"setZoom",
|
||||||
"toggleModal"
|
"toggleModal"
|
||||||
])
|
])
|
||||||
|
|
|
@ -79,9 +79,9 @@ export default new Vuex.Store({
|
||||||
grimoire: {
|
grimoire: {
|
||||||
isNight: false,
|
isNight: false,
|
||||||
isNightOrder: true,
|
isNightOrder: true,
|
||||||
isNightAnimated: true,
|
|
||||||
isPublic: true,
|
isPublic: true,
|
||||||
isMenuOpen: false,
|
isMenuOpen: false,
|
||||||
|
isStatic: false,
|
||||||
isMuted: false,
|
isMuted: false,
|
||||||
isImageOptIn: false,
|
isImageOptIn: false,
|
||||||
zoom: 0,
|
zoom: 0,
|
||||||
|
@ -145,7 +145,7 @@ export default new Vuex.Store({
|
||||||
toggleMuted: toggle("isMuted"),
|
toggleMuted: toggle("isMuted"),
|
||||||
toggleMenu: toggle("isMenuOpen"),
|
toggleMenu: toggle("isMenuOpen"),
|
||||||
toggleNightOrder: toggle("isNightOrder"),
|
toggleNightOrder: toggle("isNightOrder"),
|
||||||
toggleNightAnimated: toggle("isNightAnimated"),
|
toggleStatic: toggle("isStatic"),
|
||||||
toggleNight: toggle("isNight"),
|
toggleNight: toggle("isNight"),
|
||||||
toggleGrimoire: toggle("isPublic"),
|
toggleGrimoire: toggle("isPublic"),
|
||||||
toggleImageOptIn: toggle("isImageOptIn"),
|
toggleImageOptIn: toggle("isImageOptIn"),
|
||||||
|
|
|
@ -11,6 +11,9 @@ module.exports = store => {
|
||||||
if (localStorage.getItem("muted")) {
|
if (localStorage.getItem("muted")) {
|
||||||
store.commit("toggleMuted", true);
|
store.commit("toggleMuted", true);
|
||||||
}
|
}
|
||||||
|
if (localStorage.getItem("static")) {
|
||||||
|
store.commit("toggleStatic", true);
|
||||||
|
}
|
||||||
if (localStorage.getItem("imageOptIn")) {
|
if (localStorage.getItem("imageOptIn")) {
|
||||||
store.commit("toggleImageOptIn", true);
|
store.commit("toggleImageOptIn", true);
|
||||||
}
|
}
|
||||||
|
@ -91,6 +94,13 @@ module.exports = store => {
|
||||||
localStorage.removeItem("muted");
|
localStorage.removeItem("muted");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "toggleStatic":
|
||||||
|
if (state.grimoire.isStatic) {
|
||||||
|
localStorage.setItem("static", 1);
|
||||||
|
} else {
|
||||||
|
localStorage.removeItem("static");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "toggleImageOptIn":
|
case "toggleImageOptIn":
|
||||||
if (state.grimoire.isImageOptIn) {
|
if (state.grimoire.isImageOptIn) {
|
||||||
localStorage.setItem("imageOptIn", 1);
|
localStorage.setItem("imageOptIn", 1);
|
||||||
|
|
Loading…
Reference in New Issue