Layouting + game->experience renaming
This commit is contained in:
parent
c0de14399f
commit
823e15f671
|
@ -13,11 +13,31 @@
|
||||||
loading={Loading}
|
loading={Loading}
|
||||||
error={Error}
|
error={Error}
|
||||||
routes={[
|
routes={[
|
||||||
{
|
...[
|
||||||
path: '/',
|
{
|
||||||
component: () => import('$routes/homepage/homepage.svelte'),
|
path: '/',
|
||||||
layout: NavigationBarLayout,
|
component: () => import('$routes/homepage/homepage.svelte'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
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',
|
path: '/error',
|
||||||
component: () => import('$routes/error.svelte'),
|
component: () => import('$routes/error.svelte'),
|
||||||
|
@ -34,25 +54,12 @@
|
||||||
path: '/map',
|
path: '/map',
|
||||||
component: () => import('$root/src/routes/map/map.svelte'),
|
component: () => import('$root/src/routes/map/map.svelte'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/explore',
|
|
||||||
component: () => import('$routes/explore/explore.svelte'),
|
|
||||||
layout: NavigationBarLayout,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/profile/',
|
path: '/profile/',
|
||||||
component: () => import('$src/__error.svelte'),
|
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',
|
path: '/login',
|
||||||
component: () => import('$routes/authorization/login/log_in.svelte'),
|
component: () => import('$routes/authorization/login/log_in.svelte'),
|
||||||
|
@ -76,7 +83,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/:gameurl',
|
path: '/:gameurl',
|
||||||
component: () => import('$root/src/routes/game/experience.svelte'),
|
component: () => import('$routes/game/experience.svelte'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/terms-and-conditions',
|
path: '/terms-and-conditions',
|
||||||
|
@ -97,6 +104,6 @@
|
||||||
{
|
{
|
||||||
path: '/preferences',
|
path: '/preferences',
|
||||||
component: () => import('$root/src/routes/onboarding/interestsPage.svelte'),
|
component: () => import('$root/src/routes/onboarding/interestsPage.svelte'),
|
||||||
}
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
import Info from './Info.svelte'
|
import Info from './Info.svelte'
|
||||||
import { Experience } from '$lib/TStypes/experiences'
|
import { Experience } from '$lib/TStypes/experiences'
|
||||||
import Layout from '../Components/Layout.svelte'
|
import Layout from '../Components/Layout.svelte'
|
||||||
import { answer } from '$lib/utils/database/game'
|
import { answer } from '$lib/utils/database/experience'
|
||||||
|
|
||||||
const components = {
|
const components = {
|
||||||
TEXT: TextForm,
|
TEXT: TextForm,
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if $data.checkPoints.length}
|
{#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}
|
{/if}
|
||||||
</Overlay>
|
</Overlay>
|
||||||
{:else if view === 'experience-play'}
|
{:else if view === 'experience-play'}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
import LocationRequest from '$lib/components/Map/LocationRequest.svelte'
|
import LocationRequest from '$lib/components/Map/LocationRequest.svelte'
|
||||||
import Marker from '$lib/components/Map/Marker.svelte'
|
import Marker from '$lib/components/Map/Marker.svelte'
|
||||||
import { navigate } from '$lib/router'
|
import { navigate } from '$lib/router'
|
||||||
import { getExpiriencesAsStore } from '$lib/utils/database/experience'
|
import { getExperiencesAsStore } from '$lib/utils/database/experience'
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
|
|
||||||
let user: { lat: number; lng: number } = { lat: 0, lng: 0 }
|
let user: { lat: number; lng: number } = { lat: 0, lng: 0 }
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
navigator.geolocation.getCurrentPosition(handleLocationGranted)
|
navigator.geolocation.getCurrentPosition(handleLocationGranted)
|
||||||
|
|
||||||
$: [experiences] = getExpiriencesAsStore()
|
$: [experiences] = getExperiencesAsStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<NavigationBarLayout>
|
<NavigationBarLayout>
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
//
|
//
|
||||||
$: [userInfo] = collections.users.getDocument([Query.equal('erantId', params.erantId)])
|
$: [userInfo] = collections.users.getDocument([Query.equal('erantId', params.erantId)])
|
||||||
|
|
||||||
$: console.log($user)
|
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
title: 'Account',
|
title: 'Account',
|
||||||
|
@ -49,34 +47,36 @@
|
||||||
]
|
]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $userInfo}
|
<div class="w-full h-full p-2">
|
||||||
<div class="w-full h-[188px] flex flex-wrap flex-col gap-4 justify-center items-center mb-8">
|
{#if $userInfo}
|
||||||
<InputPicture />
|
<div class="w-full h-[188px] flex flex-wrap flex-col gap-4 justify-center items-center mb-8">
|
||||||
<span class="font-semibold text-[24px]">{$userInfo.userName}</span>
|
<InputPicture />
|
||||||
<SettingRow class="w-auto gap-2">
|
<span class="font-semibold text-[24px]">{$userInfo.userName}</span>
|
||||||
<PointSmall />
|
<SettingRow class="w-auto gap-2">
|
||||||
<span class="text-[16px] text-[#61646B]">Prague, Czechia</span>
|
<PointSmall />
|
||||||
</SettingRow>
|
<span class="text-[16px] text-[#61646B]">Prague, Czechia</span>
|
||||||
</div>
|
</SettingRow>
|
||||||
<Line />
|
</div>
|
||||||
|
<Line />
|
||||||
|
|
||||||
<div class="w-full h-auto flex flex-wrap flex-row mt-4 gap-4">
|
<div class="w-full h-auto flex flex-wrap flex-row mt-4 gap-4">
|
||||||
{#each items as { title, itms }}
|
{#each items as { title, itms }}
|
||||||
<div class="mb-4 text-[18px] text-[#61646B]">{title}</div>
|
<div class="mb-4 text-[18px] text-[#61646B]">{title}</div>
|
||||||
{#each itms as { icon, text, link }}
|
{#each itms as { icon, text, link }}
|
||||||
{#if typeof link === 'function'}
|
{#if typeof link === 'function'}
|
||||||
<SettingRow>
|
<SettingRow>
|
||||||
<svelte:component this={icon} />
|
<svelte:component this={icon} />
|
||||||
<button class="font-semibold text-[18px]" on:click={link}>{text}</button>
|
<button class="font-semibold text-[18px]" on:click={link}>{text}</button>
|
||||||
</SettingRow>
|
</SettingRow>
|
||||||
{:else}
|
{:else}
|
||||||
<SettingRow>
|
<SettingRow>
|
||||||
<svelte:component this={icon} />
|
<svelte:component this={icon} />
|
||||||
<Link class="font-semibold text-[18px]" to={link}>{text}</Link>
|
<Link class="font-semibold text-[18px]" to={link}>{text}</Link>
|
||||||
</SettingRow>
|
</SettingRow>
|
||||||
<Line />
|
<Line />
|
||||||
{/if}
|
{/if}
|
||||||
|
{/each}
|
||||||
{/each}
|
{/each}
|
||||||
{/each}
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
{/if}
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue