Compare commits
6 Commits
feat/smsga
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dc0ffd39b | ||
| 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>
|
||||||
|
|||||||
19
yarn.lock
19
yarn.lock
@@ -1638,7 +1638,12 @@ buffer-fill@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
|
resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
|
||||||
integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
|
integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
|
||||||
|
|
||||||
buffer-from@^1.0.0, buffer-from@^1.1.1:
|
buffer-from@^1.0.0:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
||||||
|
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
|
||||||
|
|
||||||
|
buffer-from@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||||
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
||||||
@@ -6076,9 +6081,9 @@ source-map-resolve@^0.5.0:
|
|||||||
urix "^0.1.0"
|
urix "^0.1.0"
|
||||||
|
|
||||||
source-map-support@~0.5.12, source-map-support@~0.5.19:
|
source-map-support@~0.5.12, source-map-support@~0.5.19:
|
||||||
version "0.5.19"
|
version "0.5.21"
|
||||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
|
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
|
||||||
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
|
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer-from "^1.0.0"
|
buffer-from "^1.0.0"
|
||||||
source-map "^0.6.0"
|
source-map "^0.6.0"
|
||||||
@@ -6344,9 +6349,9 @@ terser-webpack-plugin@^5.1.1:
|
|||||||
terser "^5.5.1"
|
terser "^5.5.1"
|
||||||
|
|
||||||
terser@^4.6.3:
|
terser@^4.6.3:
|
||||||
version "4.8.0"
|
version "4.8.1"
|
||||||
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
|
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f"
|
||||||
integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
|
integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==
|
||||||
dependencies:
|
dependencies:
|
||||||
commander "^2.20.0"
|
commander "^2.20.0"
|
||||||
source-map "~0.6.1"
|
source-map "~0.6.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user