made the filestructure better and migrated the game creation from the old type of db to the newer relational db type!

This commit is contained in:
RezHackXYZ 2025-05-15 06:27:40 +05:30
parent 9ac813c699
commit 736059646d
No known key found for this signature in database
28 changed files with 343 additions and 736 deletions

View file

@ -0,0 +1,30 @@
<script>
import DeleteQuestion from '../buttons/DeleteQuestion.svelte';
import Answers from './answers.svelte';
import { questions } from '../../logic/GameCreateData.svelte.js';
let props = $props();
let index = props.index;
</script>
<div class="flex items-center gap-3">
<div class="mb-3 flex flex-col items-center justify-center gap-1 rounded-2xl bg-gray-600 p-2">
<div class="flex h-fit items-center gap-3">
<h1 class="mt-2 mb-3 text-2xl">Q{index + 1}.</h1>
<input
type="text"
bind:value={questions.v[index].name}
placeholder="Question {index + 1}"
class="h-fit w-[500px] rounded-xl bg-gray-800 p-1 text-center text-2xl text-white"
/>
<DeleteQuestion {index} />
</div>
<div class="flex flex-col gap-2">
{#each questions.v[index].answers as answer, answersIndex}
<Answers questionsIndex={index} {answersIndex} />
{/each}
</div>
</div>
</div>