diff --git a/LICENSE b/LICENSE index fbb858d..3a8e485 100644 --- a/LICENSE +++ b/LICENSE @@ -1,13 +1,8 @@ -MIT License +Proprietary License -Copyright (c) 2020 Ludvík Prokopec +Copyright (c) 2023 Erant, s.r.o. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use the Software solely for the internal business purposes of Erant, s.r.o. Such use may include running the Software on company-owned or leased hardware, and allowing access to the Software by employees or contractors of Erant, s.r.o. No other use, reproduction, distribution, or modification of the Software or any part thereof is permitted without the prior written consent of Erant, s.r.o. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -18,4 +13,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/package.json b/package.json index 5d0396e..4778b77 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite --host 0.0.0.0", + "dev": "vite", "build": "vite build", "preview": "vite preview", "appwrite": "docker compose -f ./appwrite/docker-compose.yml up" diff --git a/src/App.svelte b/src/App.svelte index 1c37889..4915821 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -5,14 +5,18 @@ import { onMount } from 'svelte' import Routes from './__routes.svelte' - import CookiesPopUp from '$lib/components/Cookies/CookiesPopUp.svelte' + /** import CookiesPopUp from '$lib/components/Cookies/CookiesPopUp.svelte' */ import { navigate } from '$lib/router' let isMounted = false $: isReady = $localeLoading === false && $authLoading === false && isMounted + $: console.log($user) + $: if (isReady && !$user) { - if (!(location.pathname.startsWith('/login') || location.pathname.startsWith('/register'))) { + console.log('change') + + if (!location.pathname.startsWith('/login') && !location.pathname.startsWith('/register')) { navigate('/login') } } @@ -33,7 +37,7 @@
- + {#if isReady} diff --git a/src/__routes.svelte b/src/__routes.svelte index 07db58d..980776c 100644 --- a/src/__routes.svelte +++ b/src/__routes.svelte @@ -4,6 +4,7 @@ import Layout from '$src/__layout.svelte' import Loading from '$src/__loading.svelte' import Error from '$src/__error.svelte' + import NavigationBarLayout from '$lib/components/Layouts/NavigationBarLayout.svelte' import('$routes/homepage/homepage.svelte'), + layout: NavigationBarLayout, }, { path: '/error', @@ -34,14 +36,21 @@ { path: '/explore', component: () => import('$routes/explore/explore.svelte'), + layout: NavigationBarLayout, }, { - path: '/profile', + path: '/profile/', + component: () => import('$src/__error.svelte'), + }, + { + path: '/profile/:erantId', component: () => import('$routes/profile/profile.svelte'), + layout: NavigationBarLayout, }, { - path: '/profile/:function', + path: '/profile/setting/:function', component: () => import('$routes/profile/profile-functions.svelte'), + layout: NavigationBarLayout, }, { path: '/login', @@ -55,6 +64,15 @@ path: '/register/failed', component: () => import('$routes/register/registerFailed.svelte'), }, + + { + path: '/register/emailverification/:erantId', + component: () => import('$routes/register/emailVerification.svelte'), + }, + { + path: '/create/account/:erantId/', + component: () => import('$routes/register/createAccount.svelte'), + }, { path: '/:gameurl', component: () => import('$routes/game/game.svelte'), diff --git a/src/lib/collections.ts b/src/lib/collections.ts index 6e31bcf..b6272ae 100644 --- a/src/lib/collections.ts +++ b/src/lib/collections.ts @@ -1,7 +1,9 @@ import { Collection } from './appwrite' -const expiriences = new Collection('63cef30d6da945dd4250', '63cef4bd210fdf2e5888') +const experiences = new Collection('63cef30d6da945dd4250', '63cef4bd210fdf2e5888') +const users = new Collection('63ded6c18e8493bffc83', 'Users') export default { - expiriences, + experiences, + users, } diff --git a/src/lib/components/Layouts/NavigationBarLayout.svelte b/src/lib/components/Layouts/NavigationBarLayout.svelte index f82b1b7..2240d86 100644 --- a/src/lib/components/Layouts/NavigationBarLayout.svelte +++ b/src/lib/components/Layouts/NavigationBarLayout.svelte @@ -1,8 +1,14 @@