přidání Info typu
This commit is contained in:
parent
347bf4141c
commit
8c207f7735
|
@ -1,8 +1,8 @@
|
|||
on:
|
||||
push:
|
||||
branches: [ "deploy/prod" ]
|
||||
branches: ['deploy/prod']
|
||||
pull_request:
|
||||
branches: [ "deploy/prod" ]
|
||||
branches: ['deploy/prod']
|
||||
|
||||
name: 🚀 Deploy website on push
|
||||
jobs:
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
$: if (isReady && !$user) {
|
||||
if (!(location.pathname.startsWith('/login') || location.pathname.startsWith('/register'))) {
|
||||
//navigate('/login')
|
||||
navigate('/login')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
import Section from '../../../lib/components/Common/Section.svelte'
|
||||
import Button from '../../../lib/components/Buttons/Button.svelte'
|
||||
import Image from '../../../lib/components/Common/Image.svelte'
|
||||
|
||||
export let control, nextQuestion
|
||||
export let control: null | false | true | 'not-control'
|
||||
export let nextQuestion
|
||||
export let imgSrc
|
||||
</script>
|
||||
|
||||
|
@ -23,7 +24,7 @@
|
|||
</div>
|
||||
<div class="flex items-center justify-center flex-col w-full gap-6">
|
||||
<span class="relative"> <slot name="answers" /> </span>
|
||||
{#if control !== null}<!--jestli jsem už odpověděl-->
|
||||
{#if control !== null || control === 'not-control'}<!--jestli jsem už odpověděl-->
|
||||
<Button on:submit={nextQuestion} primary class="w-3/4 max-w-sm min-w-[400px] h-16 bottom-0 fixed m-10 relative">Na další otázku</Button>
|
||||
{:else}<!--čeká na odpověd, na sejmutí-->
|
||||
<Button on:submit primary class="w-3/4 max-w-sm min-w-[400px] h-16 bottom-0 fixed m-10 relative">Vyhodnotit</Button>
|
||||
|
@ -31,9 +32,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="w-full relative bottom-[170px] flex justify-center h-fit size">
|
||||
{#if control}
|
||||
{#if control === 'not-control' || control === null}
|
||||
<span />
|
||||
{:else if control}
|
||||
<span style="color:greenyellow">správně</span>
|
||||
{:else if control !== null}
|
||||
{:else}
|
||||
<span style="color:red">špatně</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<script lang="ts">
|
||||
import Layout from '../Components/Layout.svelte'
|
||||
import Input from '../../../lib/components/Inputs/Input.svelte'
|
||||
import { checkPoint } from '$lib/TStypes/expiriences'
|
||||
import { answer } from '$lib/utils/database/game'
|
||||
|
||||
export let data: { name: string; checkPoint: checkPoint }
|
||||
const { checkPoint, name } = data
|
||||
let myAnswer = ''
|
||||
|
||||
export let nextQuestion
|
||||
</script>
|
||||
|
||||
<Layout
|
||||
imgSrc={'gameData.question.thumbnail'}
|
||||
control={'not-control'}
|
||||
nextQuestion={() => {
|
||||
nextQuestion()
|
||||
myAnswer = ''
|
||||
}}
|
||||
>
|
||||
<span slot="title">{name}</span>
|
||||
<span slot="about">{@html checkPoint.CPText}</span>
|
||||
</Layout>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
|
@ -10,6 +10,7 @@
|
|||
import Finish from './Finish.svelte'
|
||||
import { data } from '$lib/stores/game'
|
||||
import Erantmap from '$lib/components/Map/Erantmap.svelte'
|
||||
import Info from './Info.svelte'
|
||||
|
||||
const components = {
|
||||
TEXT: TextForm,
|
||||
|
@ -18,6 +19,7 @@
|
|||
CHECKBOX: MultiplyForm,
|
||||
interval: IntervalForm,
|
||||
qrcode: QrCode,
|
||||
INFO: Info,
|
||||
}
|
||||
|
||||
let control = null // if true => spravne if false spatne
|
||||
|
|
Loading…
Reference in New Issue