nuxt-prawo-jazdy/components/ResultModal.vue
NetMan 63121da4b7 postgres -> sqlite, pinia/middleware fix?
other smaller: little type fixes, little changes to ui - more readable category chooser
- result screen with correct, incorrect and chosen answers
little changes to readme
2025-12-13 16:07:23 +01:00

34 lines
1 KiB
Vue

<script setup lang="ts">
const myModal = useTemplateRef('myModal');
onMounted(() => {
myModal.value?.showModal();
});
defineEmits(['again']);
</script>
<template>
<dialog
ref="myModal"
class="flex justify-center items-center backdrop-blur-sm modal"
>
<div class="flex flex-col p-3 bg-base rounded-md gap-3 modal-box min-w-fit">
<h1 class="text-[1.5rem]">
<slot name="title" />
</h1>
<div class="*:inline">Kategoria: <slot name="category" /></div>
<div class="*:inline">Punkty: <slot name="points" /> / 74</div>
<div class="*:inline">Wynik: <slot name="resultTrueFalse" /></div>
<div class="flex flex-row gap-2">
<NuxtLink to="/" class="btn btn-soft">Wróć na stronę główną</NuxtLink>
<div class="btn btn-outline" @click="$emit('again')">
Rozpocznij jeszcze raz
</div>
<button class="btn btn-neutral" @click="myModal?.close()">
Przejrzyj odpowiedzi
</button>
</div>
</div>
</dialog>
</template>