diff --git a/package.json b/package.json index 4778b77..5d0396e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite --host 0.0.0.0", "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..f4b1975 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -13,7 +13,7 @@ $: if (isReady && !$user) { if (!(location.pathname.startsWith('/login') || location.pathname.startsWith('/register'))) { - navigate('/login') + //navigate('/login') } } diff --git a/src/__routes.svelte b/src/__routes.svelte index c18cc59..67c284e 100644 --- a/src/__routes.svelte +++ b/src/__routes.svelte @@ -40,8 +40,8 @@ component: () => import('$routes/profile/profile.svelte'), }, { - path: '/profile/payment_history', - component: () => import('$routes/profile/payment_history.svelte'), + path: '/profile/:function', + component: () => import('$routes/profile/profile-functions.svelte'), }, { path: '/legal/terms_of_service', diff --git a/src/lib/components/Inputs/Hidden_Input_type2.svelte b/src/lib/components/Inputs/Hidden_Input_type2.svelte new file mode 100644 index 0000000..0a9da7f --- /dev/null +++ b/src/lib/components/Inputs/Hidden_Input_type2.svelte @@ -0,0 +1,56 @@ + + +
+ + +
+ + diff --git a/src/lib/svg/ArrowBack.svelte b/src/lib/svg/ArrowBack.svelte new file mode 100644 index 0000000..4c7d971 --- /dev/null +++ b/src/lib/svg/ArrowBack.svelte @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/lib/svg/CookieMonster.svelte b/src/lib/svg/CookieMonster.svelte new file mode 100644 index 0000000..81291e3 --- /dev/null +++ b/src/lib/svg/CookieMonster.svelte @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/lib/svg/Logout.svelte b/src/lib/svg/Logout.svelte index 4216c04..fcf4d13 100644 --- a/src/lib/svg/Logout.svelte +++ b/src/lib/svg/Logout.svelte @@ -1,26 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/src/lib/svg/Pen.svelte b/src/lib/svg/Pen.svelte new file mode 100644 index 0000000..41ce96b --- /dev/null +++ b/src/lib/svg/Pen.svelte @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/lib/svg/Sun.svelte b/src/lib/svg/Sun.svelte new file mode 100644 index 0000000..026fb6e --- /dev/null +++ b/src/lib/svg/Sun.svelte @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/lib/utils/database/game.ts b/src/lib/utils/database/game.ts index 8abc5f8..a997e30 100644 --- a/src/lib/utils/database/game.ts +++ b/src/lib/utils/database/game.ts @@ -6,7 +6,7 @@ import { getLocationDataFromLatAndLong } from '../locations' export const load = async (pathName: string) => { const checkPoints = [] const game = (await databases.listDocuments('63cef30d6da945dd4250', '63cef4bd210fdf2e5888', [Query.equal('ExpURL', pathName)])).documents[0] - + const checkPointsIds = game.ExpCPsID for (const checkPointId of checkPointsIds) { @@ -46,5 +46,6 @@ export const getExpiriences = async () => { link: `${expirience.ExpURL}`, }) } + return items } diff --git a/src/routes/explore/explore.svelte b/src/routes/explore/explore.svelte index 04a23ad..6654498 100644 --- a/src/routes/explore/explore.svelte +++ b/src/routes/explore/explore.svelte @@ -2,12 +2,11 @@ import NavigationBarLayout from '../../lib/components/Layouts/NavigationBarLayout.svelte' import Result from './Components/Result.svelte' import Top from './Components/Top.svelte' + import { getExpiriences } from '$lib/utils/database/game' + import Loading from '$lib/components/Common/Loading.svelte' let Search: string - function search(value: string) { - return [value, value, value] - } @@ -15,9 +14,16 @@
- {#each search(Search) as result} - - {/each} + {#await getExpiriences()} +
+ +
+ {:then expiriences} + {#each expiriences as result} + + {/each} + {/await} +
diff --git a/src/routes/homepage/Components/Comparment.svelte b/src/routes/homepage/Components/Comparment.svelte index e2801d6..c00e3e7 100644 --- a/src/routes/homepage/Components/Comparment.svelte +++ b/src/routes/homepage/Components/Comparment.svelte @@ -4,6 +4,8 @@ import Headline from './Headline.svelte' export let items = [] + + console.log(items)
diff --git a/src/routes/homepage/homepage.svelte b/src/routes/homepage/homepage.svelte index 8008f3a..be58e57 100644 --- a/src/routes/homepage/homepage.svelte +++ b/src/routes/homepage/homepage.svelte @@ -6,8 +6,6 @@ import Comparment from './Components/Comparment.svelte' //do budoucna bych to udělal pomocí komponent import { onMount } from 'svelte' import Animation from './Components/Animation.svelte' - import collections from '$lib/collections' - import { getLocationDataFromLatAndLong } from '$lib/utils/locations' import { getExpiriences } from '$lib/utils/database/game' import Loading from '$lib/components/Common/Loading.svelte' diff --git a/src/routes/profile/legal/TOS.svelte b/src/routes/profile/functions/Cookies.svelte similarity index 100% rename from src/routes/profile/legal/TOS.svelte rename to src/routes/profile/functions/Cookies.svelte diff --git a/src/routes/profile/functions/Interests-Update.svelte b/src/routes/profile/functions/Interests-Update.svelte new file mode 100644 index 0000000..45a8f64 --- /dev/null +++ b/src/routes/profile/functions/Interests-Update.svelte @@ -0,0 +1,70 @@ + + +
+

What are you most interested in?

+
+ +
+ +
+ + +
+
+ + \ No newline at end of file diff --git a/src/routes/profile/functions/Profile-Update.svelte b/src/routes/profile/functions/Profile-Update.svelte new file mode 100644 index 0000000..fde0b10 --- /dev/null +++ b/src/routes/profile/functions/Profile-Update.svelte @@ -0,0 +1,92 @@ + + +
+
+
+ +
+ +
+ +
+ + + + + + + + +
+ + \ No newline at end of file diff --git a/src/routes/profile/functions/Setting.svelte b/src/routes/profile/functions/Setting.svelte new file mode 100644 index 0000000..1a70eab --- /dev/null +++ b/src/routes/profile/functions/Setting.svelte @@ -0,0 +1,31 @@ + + + +
+ {#each items as { title, itms }} + {#if title !== ""} +
{title}
+ {/if} + {#each itms as { icon, text, link}} + + + {text} + + + {/each} + {/each} +
+ diff --git a/src/routes/profile/payment_history.svelte b/src/routes/profile/payment_history.svelte deleted file mode 100644 index badfc15..0000000 --- a/src/routes/profile/payment_history.svelte +++ /dev/null @@ -1,78 +0,0 @@ - - - -
- -

Payment History

-
- -
- {#each items as { title, itms }} - {#if title !== ""} -
{title}
- {/if} - {#each itms as { icon, text, link}} - - - {text} - - - {/each} - {/each} -
-
- - diff --git a/src/routes/profile/profile-functions.svelte b/src/routes/profile/profile-functions.svelte new file mode 100644 index 0000000..1ae8297 --- /dev/null +++ b/src/routes/profile/profile-functions.svelte @@ -0,0 +1,63 @@ + + + +
+ +

{data.display_name}

+
+ + + + + +
+ + \ No newline at end of file diff --git a/src/routes/profile/profile.svelte b/src/routes/profile/profile.svelte index 332420b..4bd4617 100644 --- a/src/routes/profile/profile.svelte +++ b/src/routes/profile/profile.svelte @@ -4,11 +4,11 @@ import Line from '$lib/components/Common/Line.svelte' import SettingRow from '$lib/components/Common/SettingRow.svelte' import Profile from '$lib/svg/Profile.svelte' - import Wallet from '$lib/svg/Wallet.svelte' + import Pen from '$lib/svg/Pen.svelte' import Setting2 from '$lib/svg/Setting2.svelte' import { Link } from 'svelte-routing' import NavigationBarLayout from '../../lib/components/Layouts/NavigationBarLayout.svelte' - import Earth from '$lib/svg/Earth.svelte' + import CookieMonster from '$lib/svg/CookieMonster.svelte' import Warning from '$lib/svg/Warning.svelte' import PointSmall from '$lib/svg/PointSmall.svelte' import InputPicture from '$lib/components/Inputs/InputPicture.svelte' @@ -20,20 +20,22 @@ { title: 'Account', itms: [ - { icon: Profile, text: 'Your Profile', link:"/"}, - { icon: Wallet, text: 'Payment History', link:"/profile/payment_history"}, - { icon: Setting2, text: 'Preferences', link:"/"}, + { icon: Profile, text: 'Update Your Profile', link:"/profile/profile_update"}, + { icon: Pen, text: 'Update Your Interests', link:"/profile/interests_update"}, ], }, { title: 'Settings', - itms: [{ icon: Earth, text: 'Language', link:"/"}], + itms: [ + { icon: Setting2, text: 'Setting', link:"/profile/settings"}, + { icon: CookieMonster, text: 'Cookies', link:"/profile/cookies"} + ], }, { title: 'Legal', itms: [ { icon: Help, text: 'Help', link:"/"}, - { icon: Warning, text: 'Terms of Service', link:"/"}, + { icon: Warning, text: 'Terms & Condition', link:"/"}, { icon: Logout, text: 'Log out', link: () => user.deleteSessions() },, ], },