Layouting + game->experience renaming

This commit is contained in:
Ota Prokopec 2023-03-21 17:33:06 +01:00
parent c0de14399f
commit 823e15f671
5 changed files with 64 additions and 57 deletions

View File

@ -13,11 +13,31 @@
loading={Loading}
error={Error}
routes={[
...[
{
path: '/',
component: () => import('$routes/homepage/homepage.svelte'),
layout: NavigationBarLayout,
},
{
path: '/explore',
component: () => import('$routes/explore/explore.svelte'),
},
{
path: '/profile/:erantId',
component: () => import('$routes/profile/profile.svelte'),
},
].map((routes) => {
return { ...routes, layout: NavigationBarLayout }
}),
...[
{
path: '/profile/setting/:function',
component: () => import('$routes/profile/profile-functions.svelte'),
},
].map((routes) => {
return { ...routes, layout: NavigationBarLayout }
}),
{
path: '/error',
component: () => import('$routes/error.svelte'),
@ -34,25 +54,12 @@
path: '/map',
component: () => import('$root/src/routes/map/map.svelte'),
},
{
path: '/explore',
component: () => import('$routes/explore/explore.svelte'),
layout: NavigationBarLayout,
},
{
path: '/profile/',
component: () => import('$src/__error.svelte'),
},
{
path: '/profile/:erantId',
component: () => import('$routes/profile/profile.svelte'),
layout: NavigationBarLayout,
},
{
path: '/profile/setting/:function',
component: () => import('$routes/profile/profile-functions.svelte'),
layout: ArrowBackLayout,
},
{
path: '/login',
component: () => import('$routes/authorization/login/log_in.svelte'),
@ -76,7 +83,7 @@
},
{
path: '/:gameurl',
component: () => import('$root/src/routes/game/experience.svelte'),
component: () => import('$routes/game/experience.svelte'),
},
{
path: '/terms-and-conditions',
@ -97,6 +104,6 @@
{
path: '/preferences',
component: () => import('$root/src/routes/onboarding/interestsPage.svelte'),
}
},
]}
/>

View File

@ -12,7 +12,7 @@
import Info from './Info.svelte'
import { Experience } from '$lib/TStypes/experiences'
import Layout from '../Components/Layout.svelte'
import { answer } from '$lib/utils/database/game'
import { answer } from '$lib/utils/database/experience'
const components = {
TEXT: TextForm,

View File

@ -92,7 +92,7 @@
</div>
{#if $data.checkPoints.length}
<Button on:click={() => (view = 'game-play')} primary>Hrát</Button>
<Button on:click={() => (view = 'experience-play')} primary>Hrát</Button>
{/if}
</Overlay>
{:else if view === 'experience-play'}

View File

@ -4,7 +4,7 @@
import LocationRequest from '$lib/components/Map/LocationRequest.svelte'
import Marker from '$lib/components/Map/Marker.svelte'
import { navigate } from '$lib/router'
import { getExpiriencesAsStore } from '$lib/utils/database/experience'
import { getExperiencesAsStore } from '$lib/utils/database/experience'
import { onMount } from 'svelte'
let user: { lat: number; lng: number } = { lat: 0, lng: 0 }
@ -19,7 +19,7 @@
navigator.geolocation.getCurrentPosition(handleLocationGranted)
$: [experiences] = getExpiriencesAsStore()
$: [experiences] = getExperiencesAsStore()
</script>
<NavigationBarLayout>

View File

@ -20,8 +20,6 @@
//
$: [userInfo] = collections.users.getDocument([Query.equal('erantId', params.erantId)])
$: console.log($user)
const items = [
{
title: 'Account',
@ -49,7 +47,8 @@
]
</script>
{#if $userInfo}
<div class="w-full h-full p-2">
{#if $userInfo}
<div class="w-full h-[188px] flex flex-wrap flex-col gap-4 justify-center items-center mb-8">
<InputPicture />
<span class="font-semibold text-[24px]">{$userInfo.userName}</span>
@ -79,4 +78,5 @@
{/each}
{/each}
</div>
{/if}
{/if}
</div>