Compare commits
6 Commits
feat/smsga
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8c5603ca9 | ||
| 1cf43a3768 | |||
| e1daf00609 | |||
| 3a6a9122e1 | |||
| 0d14305ded | |||
| 40b4a0657f |
@@ -11,7 +11,7 @@
|
|||||||
<label>Din vinlottis kode:</label>
|
<label>Din vinlottis kode:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="codeinput-container">
|
<div id="code-container" class="codeinput-container">
|
||||||
<input v-model="code" placeholder="KODE" @keyup.enter="submit" />
|
<input v-model="code" placeholder="KODE" @keyup.enter="submit" />
|
||||||
<button class="vin-button" @click="submit">ENTER</button>
|
<button class="vin-button" @click="submit">ENTER</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -56,15 +56,24 @@ export default {
|
|||||||
const { video } = this.$refs;
|
const { video } = this.$refs;
|
||||||
video.paused ? video.play() : video.pause();
|
video.paused ? video.play() : video.pause();
|
||||||
},
|
},
|
||||||
|
smh() {
|
||||||
|
let inputContainer = document.getElementById('code-container')
|
||||||
|
inputContainer.classList.add('shake')
|
||||||
|
if (this.timeout)
|
||||||
|
clearTimeout(this.timeout)
|
||||||
|
this.timeout = setTimeout(() => inputContainer.classList.remove('shake'), 600);
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
const site = __sites__.find(site => site.code == this.code);
|
const site = __sites__.find(site => site.code?.toLowerCase() == this.code?.toLowerCase());
|
||||||
|
|
||||||
if (site) {
|
if (site) {
|
||||||
createCookie("accesscode", site.code, 14);
|
createCookie("accesscode", site.code, 14);
|
||||||
window.location.href = `${window.location.protocol}//${site.domain}`;
|
const path = (location.pathname+location.search).substr(1)
|
||||||
|
const redirectUrl = `${window.location.protocol}//${site.domain}/${path}`
|
||||||
|
window.location.href = redirectUrl;
|
||||||
|
} else {
|
||||||
|
this.smh()
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -127,6 +136,11 @@ video {
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.shake {
|
||||||
|
animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
max-width: 24rem;
|
max-width: 24rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -145,6 +159,7 @@ video {
|
|||||||
button {
|
button {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-height: unset;
|
max-height: unset;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,6 +195,7 @@ video {
|
|||||||
|
|
||||||
label {
|
label {
|
||||||
color: rgba(255, 255, 255, 0.82);
|
color: rgba(255, 255, 255, 0.82);
|
||||||
|
text-shadow: 1px 1px black;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
@@ -205,4 +221,27 @@ video {
|
|||||||
.button-container {
|
.button-container {
|
||||||
margin-top: 4rem;
|
margin-top: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes shake {
|
||||||
|
10%,
|
||||||
|
90% {
|
||||||
|
transform: translate3d(-1px, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
20%,
|
||||||
|
80% {
|
||||||
|
transform: translate3d(2px, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
30%,
|
||||||
|
50%,
|
||||||
|
70% {
|
||||||
|
transform: translate3d(-4px, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
40%,
|
||||||
|
60% {
|
||||||
|
transform: translate3d(4px, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-session": "^1.17.0",
|
"express-session": "^1.17.0",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.29.4",
|
||||||
"mongoose": "^5.11.4",
|
"mongoose": "^5.11.4",
|
||||||
"node-fetch": "^2.6.0",
|
"node-fetch": "^2.6.0",
|
||||||
"node-schedule": "^2.0.0",
|
"node-schedule": "^2.0.0",
|
||||||
|
|||||||
@@ -4350,10 +4350,10 @@ mkdirp@^0.5.1, mkdirp@^0.5.5, mkdirp@~0.5.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
minimist "^1.2.5"
|
minimist "^1.2.5"
|
||||||
|
|
||||||
moment@^2.10.2, moment@^2.24.0:
|
moment@^2.10.2, moment@^2.29.4:
|
||||||
version "2.29.1"
|
version "2.29.4"
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
|
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
|
||||||
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
|
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
|
||||||
|
|
||||||
mongodb@3.6.6, mongodb@^3.1.0:
|
mongodb@3.6.6, mongodb@^3.1.0:
|
||||||
version "3.6.6"
|
version "3.6.6"
|
||||||
|
|||||||
Reference in New Issue
Block a user