✨ Closes #146
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
import * as Sentry from '@sentry/browser';
|
import * as Sentry from '@sentry/browser';
|
||||||
import { alertModal } from '../stores';
|
import { alertModal } from '../stores';
|
||||||
import { getLocalization } from '$lib/i18n';
|
import { getLocalization } from '$lib/i18n';
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
const { t } = getLocalization();
|
const { t } = getLocalization();
|
||||||
export let game_pin: string;
|
export let game_pin: string;
|
||||||
@@ -89,6 +90,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let captcha_resp: string;
|
let captcha_resp: string;
|
||||||
|
if (Cookies.get('kicked')) {
|
||||||
|
console.log("%cYou're Banned!", 'font-size:6rem');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (captcha_enabled) {
|
if (captcha_enabled) {
|
||||||
if (hcaptchaSitekey) {
|
if (hcaptchaSitekey) {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
import ShowEndScreen from '$lib/play/end.svelte';
|
import ShowEndScreen from '$lib/play/end.svelte';
|
||||||
import KahootResults from '$lib/play/results_kahoot.svelte';
|
import KahootResults from '$lib/play/results_kahoot.svelte';
|
||||||
import { getLocalization } from '$lib/i18n';
|
import { getLocalization } from '$lib/i18n';
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
const { t } = getLocalization();
|
const { t } = getLocalization();
|
||||||
|
|
||||||
@@ -108,6 +109,7 @@
|
|||||||
preventReload = false;
|
preventReload = false;
|
||||||
game_pin = '';
|
game_pin = '';
|
||||||
username = '';
|
username = '';
|
||||||
|
Cookies.set('kicked', 'value', { expires: 1 });
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
socket.on('final_results', (data) => {
|
socket.on('final_results', (data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user