From 6cf7964723272d16684459c6241b07d596680f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C2=AA=20Rita=20Lopes?= Date: Sat, 16 Nov 2024 15:45:27 +0000 Subject: [PATCH 01/14] Changed overflow to auto --- src/routes/(app)/+layout.svelte | 4 ++-- .../(app)/events/_components/event-hexagon.stories.ts | 8 ++++++-- .../team/_components/team-member-hexagon.stories.ts | 9 +++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 438bf2a..8602f77 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -22,7 +22,7 @@ :global(html) { height: 100%; min-height: 100vh; - overflow: scroll; + overflow: auto; } :global(body) { @@ -30,6 +30,6 @@ min-height: 100vh; display: flex; flex-direction: column; - overflow: scroll; + overflow: auto; } diff --git a/src/routes/(app)/events/_components/event-hexagon.stories.ts b/src/routes/(app)/events/_components/event-hexagon.stories.ts index c9ed10f..a818326 100644 --- a/src/routes/(app)/events/_components/event-hexagon.stories.ts +++ b/src/routes/(app)/events/_components/event-hexagon.stories.ts @@ -28,10 +28,14 @@ export const SingleDateHexagon = { args: { data: { title: 'Jantar de Curso', - description: 'Muito fixe', + description: 'Muito fixeeeeeeeeeeeeeeee', teamMemberIds: [], registerUrl: 'https://www.google.com/intl/pt-PT/forms/about/', - dateInterval: { startDate: new Date('2023-12-10') }, + + dateInterval: { + startDate: '2023-12-10T00:00:00.000Z' + }, + location: 'Cervejaria Diu', thumbnailPath: 'images/previews/evento.png' } diff --git a/src/routes/(app)/team/_components/team-member-hexagon.stories.ts b/src/routes/(app)/team/_components/team-member-hexagon.stories.ts index 0973d41..aee5914 100644 --- a/src/routes/(app)/team/_components/team-member-hexagon.stories.ts +++ b/src/routes/(app)/team/_components/team-member-hexagon.stories.ts @@ -83,11 +83,16 @@ export const DefaultIconHexagon = { data: { name: 'Bruno Rosendo', email: 'brunorosendo@gmail.com', - role: 'Co-Gestor de Projetos', + role: 'Co-Gestor de Projetosssssssssssssssssssss', photo: 'images/previews/bruno_rosendo.png', linkedin: 'https://pt.linkedin.com/', gitHub: 'https://github.com/', - websites: [{ url: 'https://www.facebook.com/' }] + + websites: [ + { + url: 'https://www.facebook.com/' + } + ] } } }; From b6c6313820b08bfe51e1d011114112ef66628927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C2=AA=20Rita=20Lopes?= Date: Sat, 16 Nov 2024 15:48:07 +0000 Subject: [PATCH 02/14] Fixed wrong link to homepage --- src/routes/(app)/_components/layout/navbar.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/(app)/_components/layout/navbar.svelte b/src/routes/(app)/_components/layout/navbar.svelte index 9065d56..336777d 100644 --- a/src/routes/(app)/_components/layout/navbar.svelte +++ b/src/routes/(app)/_components/layout/navbar.svelte @@ -3,15 +3,15 @@ aria-label="Navigation Bar" > From a730e8b3f01770be5ad6bd2cd932457714cf6e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C2=AA=20Rita=20Lopes?= Date: Sat, 16 Nov 2024 15:52:00 +0000 Subject: [PATCH 03/14] Fixed storrybook test --- .../(app)/events/_components/event-hexagon.stories.ts | 8 ++------ .../team/_components/team-member-hexagon.stories.ts | 9 ++------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/routes/(app)/events/_components/event-hexagon.stories.ts b/src/routes/(app)/events/_components/event-hexagon.stories.ts index a818326..c9ed10f 100644 --- a/src/routes/(app)/events/_components/event-hexagon.stories.ts +++ b/src/routes/(app)/events/_components/event-hexagon.stories.ts @@ -28,14 +28,10 @@ export const SingleDateHexagon = { args: { data: { title: 'Jantar de Curso', - description: 'Muito fixeeeeeeeeeeeeeeee', + description: 'Muito fixe', teamMemberIds: [], registerUrl: 'https://www.google.com/intl/pt-PT/forms/about/', - - dateInterval: { - startDate: '2023-12-10T00:00:00.000Z' - }, - + dateInterval: { startDate: new Date('2023-12-10') }, location: 'Cervejaria Diu', thumbnailPath: 'images/previews/evento.png' } diff --git a/src/routes/(app)/team/_components/team-member-hexagon.stories.ts b/src/routes/(app)/team/_components/team-member-hexagon.stories.ts index aee5914..0973d41 100644 --- a/src/routes/(app)/team/_components/team-member-hexagon.stories.ts +++ b/src/routes/(app)/team/_components/team-member-hexagon.stories.ts @@ -83,16 +83,11 @@ export const DefaultIconHexagon = { data: { name: 'Bruno Rosendo', email: 'brunorosendo@gmail.com', - role: 'Co-Gestor de Projetosssssssssssssssssssss', + role: 'Co-Gestor de Projetos', photo: 'images/previews/bruno_rosendo.png', linkedin: 'https://pt.linkedin.com/', gitHub: 'https://github.com/', - - websites: [ - { - url: 'https://www.facebook.com/' - } - ] + websites: [{ url: 'https://www.facebook.com/' }] } } }; From 0b0070f185515a101f380a62a40494426b9921dd Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Sat, 16 Nov 2024 15:53:26 +0000 Subject: [PATCH 04/14] minor: change form method to avoid showing password on url --- src/routes/(app)/login/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(app)/login/+page.svelte b/src/routes/(app)/login/+page.svelte index c80169d..c5d9fb9 100644 --- a/src/routes/(app)/login/+page.svelte +++ b/src/routes/(app)/login/+page.svelte @@ -23,7 +23,7 @@
-
+

Área Membro

Date: Sat, 16 Nov 2024 17:40:33 +0000 Subject: [PATCH 05/14] chore: replace docker-compose and add localhost to container --- dev.sh | 9 ++++----- docker-compose.yml | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dev.sh b/dev.sh index 9127222..956d37f 100755 --- a/dev.sh +++ b/dev.sh @@ -1,17 +1,17 @@ #!/bin/env bash -which docker-compose &> /dev/null +which docker &> /dev/null if [ $? -ne 0 ]; then echo "Docker compose not installed" echo "Please read the README at https://github.com/NIAEFEUP/website-niaefeup-frontend" exit fi -docker-compose up -d website-niaefeup-frontend-dev -docker-compose up -d website-niaefeup-frontend-storybook +docker compose up -d website-niaefeup-frontend-dev +docker compose up -d website-niaefeup-frontend-storybook trap_ctrl_c() { - docker-compose down + docker compose down clear exit @@ -19,7 +19,6 @@ trap_ctrl_c() { trap "trap_ctrl_c" 2 -clear echo "Containers are up and running" echo "" echo "Press Ctrl-C to exit" diff --git a/docker-compose.yml b/docker-compose.yml index 485747d..94d25a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,8 @@ services: - ./static:/usr/src/website-niaefeup-frontend/static environment: - PORT=3000 + extra_hosts: + - "host.docker.internal:host-gateway" website-niaefeup-frontend-storybook: build: From b5b9f23ebe8bbac750459f4383cf4655adff7a11 Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Sat, 16 Nov 2024 17:41:14 +0000 Subject: [PATCH 06/14] fix: dont show password on url --- src/routes/(app)/login/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(app)/login/+page.svelte b/src/routes/(app)/login/+page.svelte index c5d9fb9..b7833a3 100644 --- a/src/routes/(app)/login/+page.svelte +++ b/src/routes/(app)/login/+page.svelte @@ -23,7 +23,7 @@
- +

Área Membro

Date: Sat, 16 Nov 2024 17:51:02 +0000 Subject: [PATCH 07/14] chore: use host network in dev to access backend --- docker-compose.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 94d25a9..088a446 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,7 @@ services: - ./static:/usr/src/website-niaefeup-frontend/static environment: - PORT=3000 - extra_hosts: - - "host.docker.internal:host-gateway" + network_mode: "host" # do not add this to prod! website-niaefeup-frontend-storybook: build: From d73fd105078d49030a5d60cad4dc22ca04ca2ff5 Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Sat, 16 Nov 2024 18:38:59 +0000 Subject: [PATCH 08/14] minor: make component value bindable --- .../(app)/login/_components/variable-visibility-input.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/(app)/login/_components/variable-visibility-input.svelte b/src/routes/(app)/login/_components/variable-visibility-input.svelte index 1092331..59cf368 100644 --- a/src/routes/(app)/login/_components/variable-visibility-input.svelte +++ b/src/routes/(app)/login/_components/variable-visibility-input.svelte @@ -2,6 +2,7 @@ import Icon from '@/lib/components/icons/icon.svelte'; import Icons from '@/lib/components/icons/icons'; + export let value: any; let visible = false; $: type = visible ? 'text' : 'password'; $: icon = visible ? Icons.Hidden : Icons.Visible; @@ -9,11 +10,12 @@
Iniciar Sessão

{message}

From 03ee834e9b3086f235b7af1a617a8af70bb314a1 Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Sat, 16 Nov 2024 19:08:12 +0000 Subject: [PATCH 10/14] feat: redirect if auth success --- src/routes/(app)/login/+page.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/(app)/login/+page.svelte b/src/routes/(app)/login/+page.svelte index 0ecc580..3453799 100644 --- a/src/routes/(app)/login/+page.svelte +++ b/src/routes/(app)/login/+page.svelte @@ -16,7 +16,11 @@ password }) }).then((res) => res.ok); + message = success ? 'Login successful' : 'Login failed'; + if (success == true) { + window.location.href = '/'; + } } From 8b1338725236747b73da2c8eec368c4a9f61888b Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Sat, 16 Nov 2024 19:10:10 +0000 Subject: [PATCH 11/14] lint: docker compose prettier --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 088a446..25673b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - ./static:/usr/src/website-niaefeup-frontend/static environment: - PORT=3000 - network_mode: "host" # do not add this to prod! + network_mode: 'host' # do not add this to prod! website-niaefeup-frontend-storybook: build: From 7e6be6eb2dd31730bb32defcd5fd6c90e277623d Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Tue, 26 Nov 2024 22:21:59 +0000 Subject: [PATCH 12/14] minor: remove version from docker compose --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 25673b7..dbdb6e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3' services: website-niaefeup-frontend-dev: build: From 247a9da4711ff330dddd3e3d0829fc5c7a3c60ed Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Tue, 26 Nov 2024 22:25:41 +0000 Subject: [PATCH 13/14] chore: replaced docker-compose in test.sh --- test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index a31865b..60fd737 100755 --- a/test.sh +++ b/test.sh @@ -1,10 +1,10 @@ #!/bin/env bash -which docker-compose &> /dev/null +which docker &> /dev/null if [ $? -ne 0 ]; then echo "Docker compose not installed" echo "Please read the README at https://github.com/NIAEFEUP/website-niaefeup-frontend" exit fi -docker-compose run --rm website-niaefeup-frontend-test +docker compose run --rm website-niaefeup-frontend-test From b08cae8fb801d92116f2ccf7fbeb7f441bdb7089 Mon Sep 17 00:00:00 2001 From: AvilaAndre Date: Tue, 26 Nov 2024 23:38:22 +0000 Subject: [PATCH 14/14] lint: added type to variable --- .../(app)/login/_components/variable-visibility-input.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(app)/login/_components/variable-visibility-input.svelte b/src/routes/(app)/login/_components/variable-visibility-input.svelte index 59cf368..1886e34 100644 --- a/src/routes/(app)/login/_components/variable-visibility-input.svelte +++ b/src/routes/(app)/login/_components/variable-visibility-input.svelte @@ -2,7 +2,7 @@ import Icon from '@/lib/components/icons/icon.svelte'; import Icons from '@/lib/components/icons/icons'; - export let value: any; + export let value: string; let visible = false; $: type = visible ? 'text' : 'password'; $: icon = visible ? Icons.Hidden : Icons.Visible;