added qr
This commit is contained in:
parent
5d8dbfd330
commit
4b005cf05c
2 changed files with 11 additions and 1 deletions
|
@ -11,5 +11,6 @@
|
||||||
<h1 class="m-[0] rounded-2xl bg-gray-700 pt-1.5 pr-2 pb-0 pl-2 font-mono text-5xl">
|
<h1 class="m-[0] rounded-2xl bg-gray-700 pt-1.5 pr-2 pb-0 pl-2 font-mono text-5xl">
|
||||||
{gamePin.v}
|
{gamePin.v}
|
||||||
</h1>
|
</h1>
|
||||||
|
<img src="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=url:https://classroomstuff.xyz/kahootclone/join?gamepin={gamePin.v}" alt="qr to join game" class="m-5 h-36 w-36 rounded-lg border-2 border-gray-600" />
|
||||||
<Players />
|
<Players />
|
||||||
<StartGame gamePin={gamePin.v} />
|
<StartGame gamePin={gamePin.v} />
|
||||||
|
|
|
@ -2,10 +2,19 @@
|
||||||
import toast from "svelte-5-french-toast";
|
import toast from "svelte-5-french-toast";
|
||||||
import { joinGame } from "./logic/joinGame.js";
|
import { joinGame } from "./logic/joinGame.js";
|
||||||
import { Checking } from "./logic/JoinGameData.svelte.js";
|
import { Checking } from "./logic/JoinGameData.svelte.js";
|
||||||
|
import { on } from "svelte/events";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
|
|
||||||
let pin;
|
let pin;
|
||||||
let name;
|
let name;
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
const gamepin = urlParams.get('gamepin');
|
||||||
|
if (gamepin) {
|
||||||
|
pin = gamepin;
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="bg-grey-900 flex h-full items-center justify-center">
|
<div class="bg-grey-900 flex h-full items-center justify-center">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue