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..dbdb6e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3' services: website-niaefeup-frontend-dev: build: @@ -11,6 +10,7 @@ services: - ./static:/usr/src/website-niaefeup-frontend/static environment: - PORT=3000 + network_mode: 'host' # do not add this to prod! website-niaefeup-frontend-storybook: build: 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)/_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" >
diff --git a/src/routes/(app)/login/+page.svelte b/src/routes/(app)/login/+page.svelte index c80169d..3453799 100644 --- a/src/routes/(app)/login/+page.svelte +++ b/src/routes/(app)/login/+page.svelte @@ -16,14 +16,18 @@ password }) }).then((res) => res.ok); + message = success ? 'Login successful' : 'Login failed'; + if (success == true) { + window.location.href = '/'; + } }