From b4df394e29b711b3244db6a0c5da94ed699928ff Mon Sep 17 00:00:00 2001 From: Ota Prokopec Date: Fri, 17 Mar 2023 18:47:41 +0100 Subject: [PATCH 01/28] err --- src/lib/TStypes/experiences.ts | 13 ++++++++++++- src/lib/components/Map/Erantmap.svelte | 20 +++++++++++++++----- src/lib/utils/database/game.ts | 25 ++++++++++++++----------- src/routes/game/Forms/Info.svelte | 3 ++- src/routes/game/game.svelte | 7 +++---- 5 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/lib/TStypes/experiences.ts b/src/lib/TStypes/experiences.ts index 56fcfd1..6e17856 100644 --- a/src/lib/TStypes/experiences.ts +++ b/src/lib/TStypes/experiences.ts @@ -1,5 +1,10 @@ export type CheckPoint = { $id: string + $collectionId: string + $createdAt: string + $databaseId: string + $permissions: string + $updatedAt: string CPAfter: string CPAnswerID: string CPHint: string @@ -13,6 +18,12 @@ export type CheckPoint = { } export type Experience = { + $id: string + $collectionId: string + $createdAt: string + $databaseId: string + $permissions: string + $updatedAt: string ExpApproved: boolean ExpCpsID: string[] ExpCategory?: string @@ -27,5 +38,5 @@ export type Experience = { ExpTestingCode: string ExpURL: string UserID: string - checkPoint: Array + checkPoints: Array } diff --git a/src/lib/components/Map/Erantmap.svelte b/src/lib/components/Map/Erantmap.svelte index 0b7fa10..4206ac6 100644 --- a/src/lib/components/Map/Erantmap.svelte +++ b/src/lib/components/Map/Erantmap.svelte @@ -13,9 +13,17 @@ let className = '' export { className as class } + /*;(() => { + navigator.geolocation.getCurrentPosition(() => { + navigator.geolocation.watchPosition((e) => { + console.log(e) + }) + }) + })()*/ + navigator.geolocation.getCurrentPosition((e) => {}) - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(showPosition, () => dispatch('locationFailed')) + /* if (navigator.geolocation) { + navigator.geolocation.watchPosition(showPosition, () => dispatch('locationFailed')) } else { alert("Can't load your location!") } @@ -23,14 +31,16 @@ user.lat = position.coords.latitude user.lng = position.coords.longitude if (!center) center = user - } + }*/ - const userCenter = () => document.getElementsByClassName('mapboxgl-ctrl-geolocate')[0].click() + const userCenter = () => { + document.getElementsByClassName('mapboxgl-ctrl-geolocate')[0].click() + } {#if center} - setTimeout(() => userCenter(), 40)} {center} bind:mapComponent class={className} on:move> + setTimeout(() => setInterval(() => userCenter(), 1000), 100)} {center} bind:mapComponent class={className} on:move> { diff --git a/src/lib/utils/database/game.ts b/src/lib/utils/database/game.ts index 61a1db3..30771d2 100644 --- a/src/lib/utils/database/game.ts +++ b/src/lib/utils/database/game.ts @@ -3,29 +3,32 @@ import { Query } from 'appwrite' import database from 'svelte-appwrite-client/src/lib/database' import { getLocationDataFromLatAndLong } from '../locations' import { writable } from 'svelte/store' -import { Experience } from '$lib/TStypes/experiences' +import { CheckPoint, Experience } from '$lib/TStypes/experiences' export const load = async (pathName: string, previewQuestionsCount?: number, preview?: Function) => { - const checkPoints = [] - const game = (await databases.listDocuments('63cef30d6da945dd4250', '63cef4bd210fdf2e5888', [Query.equal('ExpURL', pathName)])).documents[0] + const checkPoints: Array = [] + // @ts-ignore + const experience: Experience = (await databases.listDocuments('63cef30d6da945dd4250', '63cef4bd210fdf2e5888', [Query.equal('ExpURL', pathName)])).documents[0] - const checkPointsIds = game.ExpCPsID - const rating = await getRating(game.$id) + const checkPointsIds = experience.ExpCpsID + const rating = await getRating(experience.$id) for (const checkPointId of checkPointsIds) { try { + // @ts-ignore checkPoints.push(await databases.getDocument('63cef30d6da945dd4250', '63cef84d908acf805758', checkPointId)) if (checkPointsIds.indexOf(checkPointId) === previewQuestionsCount - 1) { - game['rating'] = rating - game['checkPoints'] = checkPoints - preview(game) + experience['rating'] = rating + experience['checkPoints'] = checkPoints + preview(experience) } } catch (error) {} } - game['rating'] = rating - game['checkPoints'] = checkPoints - return game + experience['rating'] = rating + experience['checkPoints'] = checkPoints + + return experience } const getRating = async (expId: string) => { diff --git a/src/routes/game/Forms/Info.svelte b/src/routes/game/Forms/Info.svelte index e79b464..c511581 100644 --- a/src/routes/game/Forms/Info.svelte +++ b/src/routes/game/Forms/Info.svelte @@ -6,6 +6,7 @@ const { checkPoint, name } = data export let nextQuestion + export const control: 'wrong-firstTime' | 'wrong-secondTime' | 'correct' | 'not-control' | null = 'not-control' + \ No newline at end of file diff --git a/src/routes/game/game.svelte b/src/routes/game/game.svelte index 8da2d0b..968dee7 100644 --- a/src/routes/game/game.svelte +++ b/src/routes/game/game.svelte @@ -33,12 +33,11 @@ navigate('/error') } }) - $: console.log($data) - $: assets = $data?.questions + /*$: assets = $data?.questions ?.filter((q) => q.thumbnail !== null) ?.slice(0, 8) - ?.map((q) => q.thumbnail) + ?.map((q) => q.thumbnail)*/ let view: 'game-play' | 'game-loading' | 'game-preview' = 'game-loading' @@ -113,4 +112,4 @@ justify-content: flex-start; gap: 15px; } - + \ No newline at end of file -- 2.40.1 From e9402c2825d300b182265033c0b6ac7b40ca04be Mon Sep 17 00:00:00 2001 From: matthieu42morin Date: Sun, 19 Mar 2023 03:26:11 +0100 Subject: [PATCH 02/28] On branch Matt/preferenceUPD Changes to be committed: modified: index.html modified: postcss.config.cjs modified: public/serviceworker.js modified: src/__routes.svelte modified: src/lib/collections.ts modified: src/lib/components/Interests/Interests.svelte new file: src/lib/components/Interests/category.svelte new file: src/routes/onboarding/interestsPage.svelte modified: src/routes/profile/functions/Interests-Update.svelte --- index.html | 6 +- postcss.config.cjs | 2 +- public/serviceworker.js | 3 +- src/__routes.svelte | 4 ++ src/lib/collections.ts | 2 + src/lib/components/Interests/Interests.svelte | 1 + src/lib/components/Interests/category.svelte | 55 +++++++++++++++++ src/routes/onboarding/interestsPage.svelte | 61 +++++++++++++++++++ .../profile/functions/Interests-Update.svelte | 2 +- 9 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 src/lib/components/Interests/category.svelte create mode 100644 src/routes/onboarding/interestsPage.svelte diff --git a/index.html b/index.html index e875a96..105d654 100644 --- a/index.html +++ b/index.html @@ -10,9 +10,9 @@ diff --git a/postcss.config.cjs b/postcss.config.cjs index bafe175..5f0853f 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -2,5 +2,5 @@ const autoprefixer = require('autoprefixer') const tailwind = require('tailwindcss') module.exports = { - plugins: [tailwind(), autoprefixer()], + plugins: [tailwind(), autoprefixer()] } diff --git a/public/serviceworker.js b/public/serviceworker.js index 4b2d31b..1565554 100644 --- a/public/serviceworker.js +++ b/public/serviceworker.js @@ -1,9 +1,10 @@ // This is the service worker with the combined offline experience (Offline page + Offline copy of pages) -import { workbox } from 'https://storage.googleapis.com/workbox-cdn/releases/5.1.4/workbox-sw.js' +import workbox from 'workbox-sw' const CACHE = 'pwabuilder-offline-page' importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.4/workbox-sw.js') + // TODO: replace the following with the correct offline fallback page i.e.: const offlineFallbackPage = "offline.html"; const offlineFallbackPage = '/offline.html' diff --git a/src/__routes.svelte b/src/__routes.svelte index 0f05871..f2acf1b 100644 --- a/src/__routes.svelte +++ b/src/__routes.svelte @@ -94,5 +94,9 @@ path: '/forgot-pswd', component: () => import('$routes/authorization/forgottonPassword/forgot-pswd.svelte'), }, + { + path: '/preferences', + component: () => import('$root/src/routes/onboarding/interestsPage.svelte'), + } ]} /> diff --git a/src/lib/collections.ts b/src/lib/collections.ts index b6272ae..605ac88 100644 --- a/src/lib/collections.ts +++ b/src/lib/collections.ts @@ -2,8 +2,10 @@ import { Collection } from './appwrite' const experiences = new Collection('63cef30d6da945dd4250', '63cef4bd210fdf2e5888') const users = new Collection('63ded6c18e8493bffc83', 'Users') +const categories = new Collection('63cef30d6da945dd4250', '63cef4bd210fdf2e5888') export default { experiences, users, + categories, } diff --git a/src/lib/components/Interests/Interests.svelte b/src/lib/components/Interests/Interests.svelte index fd7f953..e37564e 100644 --- a/src/lib/components/Interests/Interests.svelte +++ b/src/lib/components/Interests/Interests.svelte @@ -3,6 +3,7 @@ import collections from '$lib/collections' import { Query } from 'appwrite' import { navigate } from 'svelte-routing' + import Category from "$lib/components/Interests/category.svelte"; export let current_state = 1 diff --git a/src/lib/components/Interests/category.svelte b/src/lib/components/Interests/category.svelte new file mode 100644 index 0000000..addf887 --- /dev/null +++ b/src/lib/components/Interests/category.svelte @@ -0,0 +1,55 @@ + + + +
+
+ {name} +
+
{name}
+
+ + + \ No newline at end of file diff --git a/src/routes/onboarding/interestsPage.svelte b/src/routes/onboarding/interestsPage.svelte new file mode 100644 index 0000000..75be1b0 --- /dev/null +++ b/src/routes/onboarding/interestsPage.svelte @@ -0,0 +1,61 @@ + + + + + + {#await collections.categories.listDocuments()} +

Loading...

+ {:then categories} + {#each categories.data as category} + toggleSelected(category.name)} + /> + {/each} + + +
+ +
+ {:catch error} +

Error: {error.message}

+ {/await} diff --git a/src/routes/profile/functions/Interests-Update.svelte b/src/routes/profile/functions/Interests-Update.svelte index c61df4d..ca6bf5a 100644 --- a/src/routes/profile/functions/Interests-Update.svelte +++ b/src/routes/profile/functions/Interests-Update.svelte @@ -1,5 +1,5 @@ -- 2.40.1 From e629d598d4cf105532643bcc16fd5a459b3d420a Mon Sep 17 00:00:00 2001 From: Ota Prokopec Date: Sun, 19 Mar 2023 13:32:53 +0100 Subject: [PATCH 03/28] map fix --- src/lib/components/Map/Erantmap.svelte | 12 +++++++++--- src/lib/components/Map/Map.svelte | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/components/Map/Erantmap.svelte b/src/lib/components/Map/Erantmap.svelte index 4206ac6..42acca4 100644 --- a/src/lib/components/Map/Erantmap.svelte +++ b/src/lib/components/Map/Erantmap.svelte @@ -1,4 +1,4 @@ - {#if center} - setTimeout(() => setInterval(() => userCenter(), 1000), 100)} {center} bind:mapComponent class={className} on:move> + setTimeout(() => userCenter(), 100)} {center} bind:mapComponent class={className} on:move> {}} on:geolocate={(e) => { + // @ts-ignore const { latitude, longitude } = e.detail.coords user = { lat: latitude, lng: longitude } }} diff --git a/src/lib/components/Map/Map.svelte b/src/lib/components/Map/Map.svelte index a96831d..c00617c 100644 --- a/src/lib/components/Map/Map.svelte +++ b/src/lib/components/Map/Map.svelte @@ -10,7 +10,6 @@ export let radius = false export let center: { lng: number; lat: number } = { lng: 0, lat: 0 } - $: console.log(center) /*export const geo = (e) => { geolocateControl.dispatchEvent('geolocate') @@ -37,6 +36,7 @@ mapComponent.setCenter([center.lng, center.lat], 14) dispatch('ready') }} + on:recentre={(e) => {}} zoom={14} > -- 2.40.1 From e67a66c7ae17449e363bf5bc9f532f74a522bc0f Mon Sep 17 00:00:00 2001 From: Ota Prokopec Date: Sun, 19 Mar 2023 13:52:36 +0100 Subject: [PATCH 04/28] register-login fix / Erant map scaling fix --- index.html | 126 ++++++++++-------- src/lib/components/Buttons/Button.svelte | 5 + src/lib/components/Map/Erantmap.svelte | 2 +- src/routes/authorization/login/log_in.svelte | 7 +- .../authorization/register/register.svelte | 3 + .../utils/authorizationErrors.ts | 2 +- 6 files changed, 84 insertions(+), 61 deletions(-) diff --git a/index.html b/index.html index e875a96..89ae76b 100644 --- a/index.html +++ b/index.html @@ -1,66 +1,80 @@ + + + + + + Erant - - - - - - Erant + + - - + + + + - - - - + + + - - gtag('config', 'G-8RCL0H1Q7V'); - + + + + - - - - - - - - - - - -
- - + + + + +
+ + diff --git a/src/lib/components/Buttons/Button.svelte b/src/lib/components/Buttons/Button.svelte index 413989d..20bc686 100644 --- a/src/lib/components/Buttons/Button.svelte +++ b/src/lib/components/Buttons/Button.svelte @@ -41,6 +41,11 @@ color: white; background-color: rgb(66, 99, 235); + &.disabled { + &:hover { + background-color: rgb(107 114 128); + } + } &:hover { background-color: rgba(66, 99, 235, 0.8); } diff --git a/src/lib/components/Map/Erantmap.svelte b/src/lib/components/Map/Erantmap.svelte index 42acca4..4d2a0e6 100644 --- a/src/lib/components/Map/Erantmap.svelte +++ b/src/lib/components/Map/Erantmap.svelte @@ -22,7 +22,7 @@ }) }) })()*/ - navigator.geolocation.getCurrentPosition((e) => {}) //at mapbox this is required dont know why + //navigator.geolocation.getCurrentPosition((e) => {}) //at mapbox this is required dont know why /* if (navigator.geolocation) { navigator.geolocation.watchPosition(showPosition, () => dispatch('locationFailed')) diff --git a/src/routes/authorization/login/log_in.svelte b/src/routes/authorization/login/log_in.svelte index ac1dc1a..0362ae8 100644 --- a/src/routes/authorization/login/log_in.svelte +++ b/src/routes/authorization/login/log_in.svelte @@ -7,6 +7,7 @@ import TopImage from '$lib/svg/Top-Image.svelte' import { Helper } from 'flowbite-svelte' import { getErrorMessage } from '../utils/authorizationErrors' + import Button from '$lib/components/Buttons/Button.svelte' export let purpose = 'login' //possible values login, register @@ -58,13 +59,13 @@ - + diff --git a/src/routes/authorization/register/register.svelte b/src/routes/authorization/register/register.svelte index b469ecb..ce532ad 100644 --- a/src/routes/authorization/register/register.svelte +++ b/src/routes/authorization/register/register.svelte @@ -30,11 +30,14 @@ err['code'] = 1001 throw err } + await account.create(ID.unique(), email, password, name) await account.createEmailSession(email, password) await account.createVerification(`${location.origin}/register/emailverification/${erantId}`) state = 'email-sent' } catch (err) { + console.log(err) + error = getErrorMessage(err.code) state = 'register' } diff --git a/src/routes/authorization/utils/authorizationErrors.ts b/src/routes/authorization/utils/authorizationErrors.ts index 575a202..c40dbaa 100644 --- a/src/routes/authorization/utils/authorizationErrors.ts +++ b/src/routes/authorization/utils/authorizationErrors.ts @@ -2,7 +2,7 @@ export const errors = { 1001: 'Nickname is already taken', 409: 'A user with the same email already is in Erant', 401: 'Invalid credentials.', - 400: 'Password must be at least 8 characters.', + 400: 'Email musts be valid.', } export const getErrorMessage = (code: number) => { -- 2.40.1 From f499cfff22d10f4c654af3267cf440d321672506 Mon Sep 17 00:00:00 2001 From: Ota Prokopec Date: Sun, 19 Mar 2023 14:05:50 +0100 Subject: [PATCH 05/28] game fix --- src/lib/TStypes/experiences.ts | 2 +- src/lib/components/Map/Erantmap.svelte | 5 ++++- src/lib/components/Map/LocationRequest.svelte | 18 ++++++++++-------- src/lib/utils/database/game.ts | 2 +- src/routes/game/game.svelte | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/lib/TStypes/experiences.ts b/src/lib/TStypes/experiences.ts index 6e17856..eb8c246 100644 --- a/src/lib/TStypes/experiences.ts +++ b/src/lib/TStypes/experiences.ts @@ -25,7 +25,7 @@ export type Experience = { $permissions: string $updatedAt: string ExpApproved: boolean - ExpCpsID: string[] + ExpCPsID: string[] ExpCategory?: string ExpEnd0: string ExpEnd60: string diff --git a/src/lib/components/Map/Erantmap.svelte b/src/lib/components/Map/Erantmap.svelte index 4d2a0e6..8719162 100644 --- a/src/lib/components/Map/Erantmap.svelte +++ b/src/lib/components/Map/Erantmap.svelte @@ -4,6 +4,7 @@ import { navigate } from 'svelte-routing' import NavigationBarLayout from '../Layouts/NavigationBarLayout.svelte' import { createEventDispatcher, onMount } from 'svelte' + import LocationRequest from './LocationRequest.svelte' const dispatch = createEventDispatcher() export let center = null @@ -22,7 +23,7 @@ }) }) })()*/ - //navigator.geolocation.getCurrentPosition((e) => {}) //at mapbox this is required dont know why + navigator.geolocation.getCurrentPosition((e) => {}) //at mapbox this is required dont know why /* if (navigator.geolocation) { navigator.geolocation.watchPosition(showPosition, () => dispatch('locationFailed')) @@ -41,6 +42,8 @@ } + + {#if center} setTimeout(() => userCenter(), 100)} {center} bind:mapComponent class={className} on:move> diff --git a/src/lib/components/Map/LocationRequest.svelte b/src/lib/components/Map/LocationRequest.svelte index 2c51103..b5eaeaf 100644 --- a/src/lib/components/Map/LocationRequest.svelte +++ b/src/lib/components/Map/LocationRequest.svelte @@ -13,15 +13,17 @@ {#if granted === false} - - This is a info alert -
-
To advance through your experience you need to enable the location access, without it the app won't work.
-
- +
+ + This is a info alert +
+
To advance through your experience you need to enable the location access, without it the app won't work.
+
+ +
-
- + +
{/if} - - - - {#await collections.categories.listDocuments()} -

Loading...

- {:then categories} - {#each categories.data as category} - toggleSelected(category.name)} - /> - {/each} - - -
- -
- {:catch error} -

Error: {error.message}

- {/await} + import Loading from './../../lib/components/Common/Loading.svelte'; + // Import necessary modules and components + import { user } from '$lib/appwrite'; + import collections from '$lib/collections'; + import Loading from '$lib/components/Common/Loading.svelte'; + import Category2InRow from '$lib/components/categories/Category2InRow.svelte'; + import Category3InRow from '$lib/components/categories/Category3InRow.svelte'; + import { getPreferences, addSelectedPreferences } from '$lib/utils/database/preferences'; + import { navigate } from '$lib/router' + import { onMount } from 'svelte'; + + + // Define a variable to store the preferences + let preferences = []; + // Define a variable to store the selected preferences + let selectedPreferences = []; + + onMount(async () => { + preferences = await getPreferences(); + }); + + function updateSelectedPreferences(preference) { + if (selectedPreferences.includes(preference)) { + selectedPreferences = selectedPreferences.filter((item) => item !== preference); + } else { + selectedPreferences = [...selectedPreferences, preference]; + } + } +// Define a function to handle the form submission + async function submitPreferences() { + await addSelectedPreferences(user, selectedPreferences); + selectedPreferences = []; + } + + +{#if preferences.length > 0} +
+
+

What are your interests?

+ +

Who do you like to travel with?

+ +

What brought you to our app?

+ + +
+{:else} + +{/if} diff --git a/src/routes/profile/functions/Interests-Update.svelte b/src/routes/profile/functions/Interests-Update.svelte index ca6bf5a..e16531d 100644 --- a/src/routes/profile/functions/Interests-Update.svelte +++ b/src/routes/profile/functions/Interests-Update.svelte @@ -1,5 +1,5 @@ -- 2.40.1 From 823e15f67135bc95d32222688c1ebd1ae942e37e Mon Sep 17 00:00:00 2001 From: Ota Prokopec Date: Tue, 21 Mar 2023 17:33:06 +0100 Subject: [PATCH 12/28] Layouting + game->experience renaming --- src/__routes.svelte | 51 ++++++++++++---------- src/routes/game/Forms/Renderer.svelte | 2 +- src/routes/game/experience.svelte | 2 +- src/routes/map/map.svelte | 4 +- src/routes/profile/profile.svelte | 62 +++++++++++++-------------- 5 files changed, 64 insertions(+), 57 deletions(-) diff --git a/src/__routes.svelte b/src/__routes.svelte index 396f755..c928e42 100644 --- a/src/__routes.svelte +++ b/src/__routes.svelte @@ -13,11 +13,31 @@ loading={Loading} error={Error} routes={[ - { - path: '/', - component: () => import('$routes/homepage/homepage.svelte'), - layout: NavigationBarLayout, - }, + ...[ + { + path: '/', + 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', 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'), - } + }, ]} /> diff --git a/src/routes/game/Forms/Renderer.svelte b/src/routes/game/Forms/Renderer.svelte index 19b3e57..3acb574 100644 --- a/src/routes/game/Forms/Renderer.svelte +++ b/src/routes/game/Forms/Renderer.svelte @@ -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, diff --git a/src/routes/game/experience.svelte b/src/routes/game/experience.svelte index f73633d..09504fe 100644 --- a/src/routes/game/experience.svelte +++ b/src/routes/game/experience.svelte @@ -92,7 +92,7 @@
{#if $data.checkPoints.length} - + {/if} {:else if view === 'experience-play'} diff --git a/src/routes/map/map.svelte b/src/routes/map/map.svelte index 24ca62b..cac1526 100644 --- a/src/routes/map/map.svelte +++ b/src/routes/map/map.svelte @@ -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() diff --git a/src/routes/profile/profile.svelte b/src/routes/profile/profile.svelte index 1594fdd..692df58 100644 --- a/src/routes/profile/profile.svelte +++ b/src/routes/profile/profile.svelte @@ -20,8 +20,6 @@ // $: [userInfo] = collections.users.getDocument([Query.equal('erantId', params.erantId)]) - $: console.log($user) - const items = [ { title: 'Account', @@ -49,34 +47,36 @@ ] -{#if $userInfo} -
- - {$userInfo.userName} - - - Prague, Czechia - -
- +
+ {#if $userInfo} +
+ + {$userInfo.userName} + + + Prague, Czechia + +
+ -
- {#each items as { title, itms }} -
{title}
- {#each itms as { icon, text, link }} - {#if typeof link === 'function'} - - - - - {:else} - - - {text} - - - {/if} +
+ {#each items as { title, itms }} +
{title}
+ {#each itms as { icon, text, link }} + {#if typeof link === 'function'} + + + + + {:else} + + + {text} + + + {/if} + {/each} {/each} - {/each} -
-{/if} +
+ {/if} +
-- 2.40.1 From 9aab42db08fab80e415884955bfed8d77997c911 Mon Sep 17 00:00:00 2001 From: Ota Prokopec Date: Tue, 21 Mar 2023 17:40:58 +0100 Subject: [PATCH 13/28] Layout --- src/__routes.svelte | 65 +++++++++---------- .../Layouts/NavigationBarLayout.svelte | 1 - src/routes/error.svelte | 7 +- 3 files changed, 35 insertions(+), 38 deletions(-) diff --git a/src/__routes.svelte b/src/__routes.svelte index c928e42..147c622 100644 --- a/src/__routes.svelte +++ b/src/__routes.svelte @@ -13,6 +13,36 @@ loading={Loading} error={Error} routes={[ + //experience + { + path: '/:gameurl', + component: () => import('$routes/game/experience.svelte'), + }, + //authorization + { + path: '/login', + component: () => import('$routes/authorization/login/log_in.svelte'), + }, + { + path: '/register', + component: () => import('$root/src/routes/authorization/register/register.svelte'), + }, + { + path: '/register/failed', + component: () => import('$routes/authorization/register/registerFailed.svelte'), + }, + { + path: '/register/emailverification/:erantId', + component: () => import('$routes/authorization/register/emailVerification.svelte'), + }, + { + path: '/create/account/:erantId/', + component: () => import('$routes/authorization/register/createAccount.svelte'), + }, + { + path: '/forgot-pswd', + component: () => import('$routes/authorization/forgottonPassword/forgot-pswd.svelte'), + }, ...[ { path: '/', @@ -35,9 +65,8 @@ component: () => import('$routes/profile/profile-functions.svelte'), }, ].map((routes) => { - return { ...routes, layout: NavigationBarLayout } + return { ...routes, layout: ArrowBackLayout } }), - { path: '/error', component: () => import('$routes/error.svelte'), @@ -54,37 +83,11 @@ path: '/map', component: () => import('$root/src/routes/map/map.svelte'), }, - { path: '/profile/', component: () => import('$src/__error.svelte'), }, - - { - path: '/login', - component: () => import('$routes/authorization/login/log_in.svelte'), - }, - { - path: '/register', - component: () => import('$root/src/routes/authorization/register/register.svelte'), - }, - { - path: '/register/failed', - component: () => import('$routes/authorization/register/registerFailed.svelte'), - }, - - { - path: '/register/emailverification/:erantId', - component: () => import('$routes/authorization/register/emailVerification.svelte'), - }, - { - path: '/create/account/:erantId/', - component: () => import('$routes/authorization/register/createAccount.svelte'), - }, - { - path: '/:gameurl', - component: () => import('$routes/game/experience.svelte'), - }, + //policy { path: '/terms-and-conditions', component: () => import('$routes/legal/terms-and-conditions.svelte'), @@ -97,10 +100,6 @@ path: '/cookie-policy', component: () => import('$routes/legal/cookie-policy.svelte'), }, - { - path: '/forgot-pswd', - component: () => import('$routes/authorization/forgottonPassword/forgot-pswd.svelte'), - }, { path: '/preferences', component: () => import('$root/src/routes/onboarding/interestsPage.svelte'), diff --git a/src/lib/components/Layouts/NavigationBarLayout.svelte b/src/lib/components/Layouts/NavigationBarLayout.svelte index 36bbb90..fdfb90c 100644 --- a/src/lib/components/Layouts/NavigationBarLayout.svelte +++ b/src/lib/components/Layouts/NavigationBarLayout.svelte @@ -6,7 +6,6 @@ import FooterItem from '../Common/NavBar_Item.svelte' $: [userInfo] = collections.users.getDocument([Query.equal('userId', $user?.$id || '')]) - $: console.log($user) $: items = [ { diff --git a/src/routes/error.svelte b/src/routes/error.svelte index 5a81420..ac8477e 100644 --- a/src/routes/error.svelte +++ b/src/routes/error.svelte @@ -1,10 +1,9 @@ -
Erant -- 2.40.1 From e56983dc4f50814b5f9b7082d45bdf5b8f889473 Mon Sep 17 00:00:00 2001 From: matthieu42morin Date: Wed, 22 Mar 2023 07:20:30 +0100 Subject: [PATCH 14/28] preferencesPage updated - solved fetching, selection functionality needed Changes to be committed: modified: .eslintrc.cjs modified: public/serviceworker.js modified: public/serviceworker_notused.js modified: src/__routes.svelte modified: src/lib/collections.ts modified: src/lib/components/Categories/category2InRow.svelte modified: src/lib/components/Categories/category3InRow.svelte new file: src/lib/router/LazyRoute.svelte new file: src/lib/router/ProtectedRouteGuard.svelte new file: src/lib/router/routes.ts modified: src/lib/utils/database/experience.ts modified: src/lib/utils/database/preferences.ts modified: src/lib/utils/parseQuestion.js modified: src/main.js modified: src/routes/onboarding/interestsPage.svelte new file: src/routes/onboarding/preferencesPage.svelte modified: src/routes/profile/functions/Interests-Update.svelte modified: tailwind.config.cjs --- .eslintrc.cjs | 22 +-- public/serviceworker.js | 54 +----- public/serviceworker_notused.js | 55 +++++- src/__routes.svelte | 2 +- src/lib/collections.ts | 8 +- .../Categories/category2InRow.svelte | 17 ++ .../Categories/category3InRow.svelte | 17 ++ src/lib/router/LazyRoute.svelte | 12 ++ src/lib/router/ProtectedRouteGuard.svelte | 12 ++ src/lib/router/routes.ts | 29 +++ src/lib/utils/database/experience.ts | 2 +- src/lib/utils/database/preferences.ts | 81 ++++++-- src/lib/utils/parseQuestion.js | 26 +-- src/main.js | 2 +- src/routes/onboarding/interestsPage.svelte | 49 +++-- src/routes/onboarding/preferencesPage.svelte | 181 ++++++++++++++++++ .../profile/functions/Interests-Update.svelte | 4 +- tailwind.config.cjs | 12 +- 18 files changed, 459 insertions(+), 126 deletions(-) create mode 100644 src/lib/router/LazyRoute.svelte create mode 100644 src/lib/router/ProtectedRouteGuard.svelte create mode 100644 src/lib/router/routes.ts create mode 100644 src/routes/onboarding/preferencesPage.svelte diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ceaea72..35e5471 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,13 +1,13 @@ module.exports = { - env: { - browser: true, - es2021: true, - }, - extends: 'standard-with-typescript', - overrides: [], - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - }, - rules: {}, + env: { + browser: true, + es2021: true + }, + extends: 'standard-with-typescript', + overrides: [], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module' + }, + rules: {} } diff --git a/public/serviceworker.js b/public/serviceworker.js index 1565554..47999f8 100644 --- a/public/serviceworker.js +++ b/public/serviceworker.js @@ -1,54 +1,4 @@ -// This is the service worker with the combined offline experience (Offline page + Offline copy of pages) -import workbox from 'workbox-sw' -const CACHE = 'pwabuilder-offline-page' +self.addEventListener('install', (e) => { }) -importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.4/workbox-sw.js') - -// TODO: replace the following with the correct offline fallback page i.e.: const offlineFallbackPage = "offline.html"; -const offlineFallbackPage = '/offline.html' - -self.addEventListener('message', (event) => { - if (event.data && event.data.type === 'SKIP_WAITING') { - self.skipWaiting() - } -}) - -self.addEventListener('install', async (event) => { - event.waitUntil( - caches.open(CACHE) - .then((cache) => cache.add(offlineFallbackPage)) - ) -}) - -if (workbox.navigationPreload.isSupported()) { - workbox.navigationPreload.enable() -} - -workbox.routing.registerRoute( - /\/*/, - new workbox.strategies.StaleWhileRevalidate({ - cacheName: CACHE - }) -) - -self.addEventListener('fetch', (event) => { - if (event.request.mode === 'navigate') { - event.respondWith((async () => { - try { - const preloadResp = await event.preloadResponse - - if (preloadResp) { - return preloadResp - } - - const networkResp = await fetch(event.request) - return networkResp - } catch (error) { - const cache = await caches.open(CACHE) - const cachedResp = await cache.match(offlineFallbackPage) - return cachedResp - } - })()) - } -}) +self.addEventListener('fetch', (e) => { }) diff --git a/public/serviceworker_notused.js b/public/serviceworker_notused.js index e1b62bc..3a1ae7e 100644 --- a/public/serviceworker_notused.js +++ b/public/serviceworker_notused.js @@ -1,4 +1,55 @@ -//self.addEventListener("install", (e) => { }) +// This is the service worker with the combined offline experience (Offline page + Offline copy of pages) +import workbox from 'workbox-sw' -//self.addEventListener('fetch', (e) => { }) +const CACHE = 'pwabuilder-offline-page' + +importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.4/workbox-sw.js') + +// TODO: replace the following with the correct offline fallback page i.e.: const offlineFallbackPage = "offline.html"; +const offlineFallbackPage = '/offline.html' + +self.addEventListener('message', (event) => { + if (event.data && event.data.type === 'SKIP_WAITING') { + self.skipWaiting() + } +}) + +self.addEventListener('install', async (event) => { + event.waitUntil( + caches.open(CACHE) + .then((cache) => cache.add(offlineFallbackPage)) + ) +}) + +if (workbox.navigationPreload.isSupported()) { + workbox.navigationPreload.enable() +} + +workbox.routing.registerRoute( + /\/*/, + new workbox.strategies.StaleWhileRevalidate({ + cacheName: CACHE + }) +) + +self.addEventListener('fetch', (event) => { + if (event.request.mode === 'navigate') { + event.respondWith((async () => { + try { + const preloadResp = await event.preloadResponse + + if (preloadResp) { + return preloadResp + } + + const networkResp = await fetch(event.request) + return networkResp + } catch (error) { + const cache = await caches.open(CACHE) + const cachedResp = await cache.match(offlineFallbackPage) + return cachedResp + } + })()) + } +}) diff --git a/src/__routes.svelte b/src/__routes.svelte index 147c622..d18bca5 100644 --- a/src/__routes.svelte +++ b/src/__routes.svelte @@ -102,7 +102,7 @@ }, { path: '/preferences', - component: () => import('$root/src/routes/onboarding/interestsPage.svelte'), + component: () => import('$root/src/routes/onboarding/preferencesPage.svelte'), }, ]} /> diff --git a/src/lib/collections.ts b/src/lib/collections.ts index 605ac88..115f385 100644 --- a/src/lib/collections.ts +++ b/src/lib/collections.ts @@ -2,10 +2,14 @@ import { Collection } from './appwrite' const experiences = new Collection('63cef30d6da945dd4250', '63cef4bd210fdf2e5888') const users = new Collection('63ded6c18e8493bffc83', 'Users') -const categories = new Collection('63cef30d6da945dd4250', '63cef4bd210fdf2e5888') +const interests = new Collection('6417cf1de159d094b370', '6417cf29f2118829b3b4') +const travel_with = new Collection('6417cf1de159d094b370', '6417d0429843609a2f49') +const recommended_by = new Collection('6417cf1de159d094b370', '6417d00e40701375978b') export default { experiences, users, - categories, + interests, + travel_with, + recommended_by } diff --git a/src/lib/components/Categories/category2InRow.svelte b/src/lib/components/Categories/category2InRow.svelte index e69de29..7b50c49 100644 --- a/src/lib/components/Categories/category2InRow.svelte +++ b/src/lib/components/Categories/category2InRow.svelte @@ -0,0 +1,17 @@ + + +
+ {#each preferences as preference} +
onPreferenceSelect(preference)} + > + {preference.name} +
+ {/each} +
+ \ No newline at end of file diff --git a/src/lib/components/Categories/category3InRow.svelte b/src/lib/components/Categories/category3InRow.svelte index e69de29..1308f43 100644 --- a/src/lib/components/Categories/category3InRow.svelte +++ b/src/lib/components/Categories/category3InRow.svelte @@ -0,0 +1,17 @@ + + +
+ {#each preferences as preference} +
onPreferenceSelect(preference)} + > + {preference.name} +
+ {/each} +
+ \ No newline at end of file diff --git a/src/lib/router/LazyRoute.svelte b/src/lib/router/LazyRoute.svelte new file mode 100644 index 0000000..55d8ec2 --- /dev/null +++ b/src/lib/router/LazyRoute.svelte @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/src/lib/router/ProtectedRouteGuard.svelte b/src/lib/router/ProtectedRouteGuard.svelte new file mode 100644 index 0000000..8669fff --- /dev/null +++ b/src/lib/router/ProtectedRouteGuard.svelte @@ -0,0 +1,12 @@ + +{#if allow} + +{:else} + +{/if} \ No newline at end of file diff --git a/src/lib/router/routes.ts b/src/lib/router/routes.ts new file mode 100644 index 0000000..53d3136 --- /dev/null +++ b/src/lib/router/routes.ts @@ -0,0 +1,29 @@ +import { ComponentType, SvelteComponentTyped } from 'svelte' + +export interface Route { + component: () => Promise, + path: string, + layout?: ComponentType>, + loading?: ComponentType>, + before?: () => any, +} + +interface RouteDefinition { + component: () => Promise, + path: string, + layout: ComponentType> | null, + loading: ComponentType> | null, + before: () => any | null, +} + +interface RouteConfig { + routes: Route[], + layout?: ComponentType> | null, + loading?: ComponentType> | null, +} + +const defineRoutes = (config: RouteConfig): RouteDefinition[] => { + return config.routes.map(route => ({ ...route, layout: route?.layout ?? config?.layout ?? null, loading: route?.loading ?? config?.loading ?? null, before: route?.before ?? null })) +} + +export default defineRoutes \ No newline at end of file diff --git a/src/lib/utils/database/experience.ts b/src/lib/utils/database/experience.ts index 665bc86..b8dff83 100644 --- a/src/lib/utils/database/experience.ts +++ b/src/lib/utils/database/experience.ts @@ -2,7 +2,7 @@ import { databases } from '$lib/appwrite' import { Query } from 'appwrite' import database from 'svelte-appwrite-client/src/lib/database' import { getLocationDataFromLatAndLong } from '../locations' -import { writable } from 'svelte/store' +import { writable } from '$lib/stores/stores' import { CheckPoint, Experience } from '$lib/TStypes/experiences' //Loading of checkpoints and rating is done in the same function to prevent multiple requests to the database diff --git a/src/lib/utils/database/preferences.ts b/src/lib/utils/database/preferences.ts index 85ec74c..35548e1 100644 --- a/src/lib/utils/database/preferences.ts +++ b/src/lib/utils/database/preferences.ts @@ -1,25 +1,76 @@ import { databases } from '$lib/appwrite'; import { Query } from 'appwrite'; -export const getPreferences = async () => { - const { documents } = await databases.listDocuments('6417cf1de159d094b370', '6417cf29f2118829b3b4', [ - Query.orderAsc('Name') - ]); +// typescript interfaces for objects return definitions +interface Interest { + name: string; + img: string; + } + interface TravelBuddies { + name: string; + img: string; + } +interface Recommendations { + name: string; + img: string; + } - const preferences = documents.map(({ Name, Image }) => ({ name: Name, img: Image })); + // Define a variable to store the selected preferences + let selectedInterests = []; + let selectedTravelBuddies = []; + let selectedRecommendations = []; - return preferences; -}; +// fetch interests +export const getInterests = async (): Promise => { + return ((await databases.listDocuments('6417cf1de159d094b370', '6417cf29f2118829b3b4')).documents as unknown as Interest[])}; -export const addSelectedPreferences = async (userId, preferences) => { - const { document: user } = await databases.getDocument('63ded6c18e8493bffc83', 'Users', userId); - const updatedUser = { - ...user, - userPreferences: preferences +// fetch travel buddies +export const getTravelBuddies = async (): Promise => { + return ((await databases.listDocuments('6417cf1de159d094b370', '6417d0429843609a2f49')).documents as unknown as TravelBuddies[])}; + +// fetch recommendations +export const getRecommendations = async (): Promise => { + return ((await databases.listDocuments('6417cf1de159d094b370', '6417d00e40701375978b')).documents as unknown as Recommendations[])}; + + // add selected preferences to user +export const addSelectedPreferences = async (userId, interests, travelBuddies, recommendations) => { + const { document: user } = await databases.getDocument('63ded6c18e8493bffc83', 'Users', userId); + + const updatedUser = { + ...user, + userInterests: interests, + userTravelBuddy: travelBuddies, + userRecommended: recommendations + }; + + await databases.updateDocument('63ded6c18e8493bffc83', 'Users', user.$id, updatedUser); + + return updatedUser; }; - await databases.updateDocument('6417cf1de159d094b370', 'user-collection', user.$id, updatedUser); +// // Function to update Interests +// function updateSelectedInterests(preference) { +// if (selectedInterests.includes(preference)) { +// selectedInterests = selectedInterests.filter((item) => item !== preference); +// } else { +// selectedInterests = [...selectedInterests, preference]; +// } +// } +// // Function to update Travel Buddies +// function updateSelectedTravelBuddies(preference) { +// if (selectedTravelBuddies.includes(preference)) { +// selectedTravelBuddies = selectedTravelBuddies.filter((item) => item !== preference); +// } else { +// selectedTravelBuddies = [...selectedTravelBuddies, preference]; +// } +// } +// // Function to update Recommendations +// function updateSelectedRecommendations(preference) { +// if (selectedRecommendations.includes(preference)) { +// selectedRecommendations = selectedRecommendations.filter((item) => item !== preference); +// } else { +// selectedRecommendations = [...selectedRecommendations, preference]; +// } +// } - return updatedUser; -}; \ No newline at end of file diff --git a/src/lib/utils/parseQuestion.js b/src/lib/utils/parseQuestion.js index c6e0a00..35d728d 100644 --- a/src/lib/utils/parseQuestion.js +++ b/src/lib/utils/parseQuestion.js @@ -1,15 +1,15 @@ export default (question, questionType) => { - switch (questionType.toLowerCase()) { - case 'text': - return question - case 'number': - return Number.parseFloat(question) - case 'choice': - return question.split(/;\s*/).map((item) => ({ - label: item.startsWith('*') ? item.substring(1) : item, - value: item.startsWith('*') ? true : false, - })) - default: - return null - } + switch (questionType.toLowerCase()) { + case 'text': + return question + case 'number': + return Number.parseFloat(question) + case 'choice': + return question.split(/;\s*/).map((item) => ({ + label: item.startsWith('*') ? item.substring(1) : item, + value: !!item.startsWith('*') + })) + default: + return null + } } diff --git a/src/main.js b/src/main.js index 91f9d88..5c1f795 100644 --- a/src/main.js +++ b/src/main.js @@ -2,7 +2,7 @@ import './app.css' import App from './App.svelte' const app = new App({ - target: document.getElementById('app'), + target: document.getElementById('app') }) export default app diff --git a/src/routes/onboarding/interestsPage.svelte b/src/routes/onboarding/interestsPage.svelte index 376ba14..8606c9c 100644 --- a/src/routes/onboarding/interestsPage.svelte +++ b/src/routes/onboarding/interestsPage.svelte @@ -1,36 +1,43 @@ @@ -39,21 +46,21 @@

What are your interests?

Who do you like to travel with?

What brought you to our app?

{:else} - + {/if} diff --git a/src/routes/onboarding/preferencesPage.svelte b/src/routes/onboarding/preferencesPage.svelte new file mode 100644 index 0000000..1b818ce --- /dev/null +++ b/src/routes/onboarding/preferencesPage.svelte @@ -0,0 +1,181 @@ + + +
+ {#each preferences as pref} + {#if pref.id === selectedPrefId} +
+
+

{pref.title}

+
+ {#each pref.options as option} + + {/each} +
+ {#if pref.selectedOption} + + {/if} +
+
+ {/if} + {/each} + {#if selectedPrefId === preferences.length && preferences.every(pref => pref.selectedOption)} + + {/if} +
+ + + + \ No newline at end of file diff --git a/src/routes/profile/functions/Interests-Update.svelte b/src/routes/profile/functions/Interests-Update.svelte index e16531d..5be4bfd 100644 --- a/src/routes/profile/functions/Interests-Update.svelte +++ b/src/routes/profile/functions/Interests-Update.svelte @@ -50,7 +50,9 @@ .selected{ transition-delay: 0.25s; width: 46px; - background-color: #14A6AE; + outline: 8px solid #BBD1C5; + outline-color: #14A6AE; + border-radius: 16px; } } diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 129a8ec..b956c20 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -1,9 +1,9 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: ['./index.html', './src/**/*.{html,svelte,js,ts}', './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}'], - theme: { - extend: {}, - }, - plugins: [require('flowbite/plugin')], - darkMode: 'class', + content: ['./index.html', './src/**/*.{html,svelte,js,ts}', './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}'], + theme: { + extend: {} + }, + plugins: [require('flowbite/plugin')], + darkMode: 'class' } -- 2.40.1 From 9668864d6c030013817e23717fd159486d8447a0 Mon Sep 17 00:00:00 2001 From: Schenky Date: Wed, 22 Mar 2023 14:10:01 +0100 Subject: [PATCH 15/28] Update 22.3.2023 --- src/lib/components/Common/PopUp.svelte | 190 ++++++++++++++++++++ src/main.scss | 1 + src/routes/profile/functions/Setting.svelte | 39 +++- 3 files changed, 222 insertions(+), 8 deletions(-) create mode 100644 src/lib/components/Common/PopUp.svelte diff --git a/src/lib/components/Common/PopUp.svelte b/src/lib/components/Common/PopUp.svelte new file mode 100644 index 0000000..95f3019 --- /dev/null +++ b/src/lib/components/Common/PopUp.svelte @@ -0,0 +1,190 @@ + + +
+
+

+ {headline} +

+ +
+ {#each options as option} + + {/each} +
+ +
+ + +
+
+
+ + \ No newline at end of file diff --git a/src/main.scss b/src/main.scss index 9d0db9d..164c955 100644 --- a/src/main.scss +++ b/src/main.scss @@ -9,6 +9,7 @@ @import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@600&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@500&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap'); html, body { diff --git a/src/routes/profile/functions/Setting.svelte b/src/routes/profile/functions/Setting.svelte index 1a70eab..d88c124 100644 --- a/src/routes/profile/functions/Setting.svelte +++ b/src/routes/profile/functions/Setting.svelte @@ -1,16 +1,37 @@ @@ -19,13 +40,15 @@ {#if title !== ""}
{title}
{/if} - {#each itms as { icon, text, link}} + {#each itms as { icon, text, options}} - {text} + - {/each} {/each} + {#if popUp_Active} + + {/if} -- 2.40.1 From 573b1a9cec41ba0b9f19a0c4302bfdb450ab5e48 Mon Sep 17 00:00:00 2001 From: matthieu42morin Date: Wed, 22 Mar 2023 16:26:13 +0100 Subject: [PATCH 16/28] Fucking zavorka Changes to be committed: modified: src/routes/onboarding/preferencesPage.svelte --- src/routes/onboarding/preferencesPage.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/onboarding/preferencesPage.svelte b/src/routes/onboarding/preferencesPage.svelte index 1b818ce..743483d 100644 --- a/src/routes/onboarding/preferencesPage.svelte +++ b/src/routes/onboarding/preferencesPage.svelte @@ -75,7 +75,7 @@

{pref.title}

{#each pref.options as option} -