Compare commits

...

6 Commits

Author SHA1 Message Date
dependabot[bot]
02f108777a Bump nanoid from 3.1.22 to 3.2.0
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.22 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.22...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-22 01:44:52 +00:00
1cf43a3768 Merge pull request #94 from KevinMidboe/fix/passcode-wall-redirect
Fix/passcode wall redirect
2021-11-26 20:50:23 +01:00
e1daf00609 Make text more readable 2021-11-26 20:45:03 +01:00
3a6a9122e1 Some shake animation on unsuccessful code input 2021-11-26 20:44:58 +01:00
0d14305ded Make sure we also add the path when redirecting successfull code input
This is most relevant when SMS is sent to device used to watch the
lottery.
2021-11-26 20:43:11 +01:00
40b4a0657f Code input is now case in-sensitive 2021-11-26 20:42:56 +01:00
2 changed files with 47 additions and 8 deletions

View File

@@ -11,7 +11,7 @@
<label>Din vinlottis kode:</label>
</div>
<div class="codeinput-container">
<div id="code-container" class="codeinput-container">
<input v-model="code" placeholder="KODE" @keyup.enter="submit" />
<button class="vin-button" @click="submit">ENTER</button>
</div>
@@ -56,15 +56,24 @@ export default {
const { video } = this.$refs;
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() {
const site = __sites__.find(site => site.code == this.code);
const site = __sites__.find(site => site.code?.toLowerCase() == this.code?.toLowerCase());
if (site) {
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%;
}
&.shake {
animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
animation-iteration-count: infinite;
}
input {
max-width: 24rem;
width: 100%;
@@ -145,6 +159,7 @@ video {
button {
height: 100%;
max-height: unset;
font-weight: bold;
}
}
@@ -180,6 +195,7 @@ video {
label {
color: rgba(255, 255, 255, 0.82);
text-shadow: 1px 1px black;
font-size: 1.5rem;
font-weight: 500;
}
@@ -205,4 +221,27 @@ video {
.button-container {
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>

View File

@@ -4446,9 +4446,9 @@ nan@^2.12.1:
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
nanoid@^3.1.22:
version "3.1.22"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.22.tgz#b35f8fb7d151990a8aebd5aa5015c03cf726f844"
integrity sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==
version "3.2.0"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c"
integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==
nanomatch@^1.2.9:
version "1.2.13"