přidání Info typu
This commit is contained in:
parent
347bf4141c
commit
8c207f7735
|
@ -1,8 +1,8 @@
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "deploy/prod" ]
|
branches: ['deploy/prod']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "deploy/prod" ]
|
branches: ['deploy/prod']
|
||||||
|
|
||||||
name: 🚀 Deploy website on push
|
name: 🚀 Deploy website on push
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -10,18 +10,18 @@ jobs:
|
||||||
name: 🎉 Deploy
|
name: 🎉 Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 🚚 Get latest code
|
- name: 🚚 Get latest code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 🔨 Build Project
|
- name: 🔨 Build Project
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: 📂 Sync files
|
- name: 📂 Sync files
|
||||||
uses: SamKirkland/FTP-Deploy-Action@4.3.2
|
uses: SamKirkland/FTP-Deploy-Action@4.3.2
|
||||||
with:
|
with:
|
||||||
server: 305244.w44.wedos.net
|
server: 305244.w44.wedos.net
|
||||||
username: w305244_BOT007
|
username: w305244_BOT007
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
password: ${{ secrets.FTP_PASSWORD }}
|
||||||
local-dir: ./dist/
|
local-dir: ./dist/
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
$: if (isReady && !$user) {
|
$: if (isReady && !$user) {
|
||||||
if (!(location.pathname.startsWith('/login') || location.pathname.startsWith('/register'))) {
|
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 Section from '../../../lib/components/Common/Section.svelte'
|
||||||
import Button from '../../../lib/components/Buttons/Button.svelte'
|
import Button from '../../../lib/components/Buttons/Button.svelte'
|
||||||
import Image from '../../../lib/components/Common/Image.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
|
export let imgSrc
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-center flex-col w-full gap-6">
|
<div class="flex items-center justify-center flex-col w-full gap-6">
|
||||||
<span class="relative"> <slot name="answers" /> </span>
|
<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>
|
<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í-->
|
{: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>
|
<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>
|
</div>
|
||||||
<div class="w-full relative bottom-[170px] flex justify-center h-fit size">
|
<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>
|
<span style="color:greenyellow">správně</span>
|
||||||
{:else if control !== null}
|
{:else}
|
||||||
<span style="color:red">špatně</span>
|
<span style="color:red">špatně</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</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 Finish from './Finish.svelte'
|
||||||
import { data } from '$lib/stores/game'
|
import { data } from '$lib/stores/game'
|
||||||
import Erantmap from '$lib/components/Map/Erantmap.svelte'
|
import Erantmap from '$lib/components/Map/Erantmap.svelte'
|
||||||
|
import Info from './Info.svelte'
|
||||||
|
|
||||||
const components = {
|
const components = {
|
||||||
TEXT: TextForm,
|
TEXT: TextForm,
|
||||||
|
@ -18,6 +19,7 @@
|
||||||
CHECKBOX: MultiplyForm,
|
CHECKBOX: MultiplyForm,
|
||||||
interval: IntervalForm,
|
interval: IntervalForm,
|
||||||
qrcode: QrCode,
|
qrcode: QrCode,
|
||||||
|
INFO: Info,
|
||||||
}
|
}
|
||||||
|
|
||||||
let control = null // if true => spravne if false spatne
|
let control = null // if true => spravne if false spatne
|
||||||
|
|
Loading…
Reference in New Issue