From 60916ba765716276a0873e687104ccf2cce847c3 Mon Sep 17 00:00:00 2001 From: Laure Jablonski Date: Wed, 19 Mar 2025 10:47:20 +0100 Subject: [PATCH 01/10] feat: logout werkt en initialen zijn deze van ingelogde user --- frontend/src/components/MenuBar.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/MenuBar.vue b/frontend/src/components/MenuBar.vue index f942babc..45ff871c 100644 --- a/frontend/src/components/MenuBar.vue +++ b/frontend/src/components/MenuBar.vue @@ -15,9 +15,8 @@ const role = auth.authState.activeRole; - //TODO: use authState form services map to get user token - const name = "Kurt Cobain"; - const initials = name + const name : string = auth.authState.user!.profile.name!; + const initials : string = name .split(" ") .map((n) => n[0]) .join(""); @@ -34,6 +33,11 @@ localStorage.setItem("user-lang", langCode); console.log(langCode); }; + + // when the user wants to logout, the authentication must be set to False + function performLogout() { + auth.logout(); + } - +
  • Date: Wed, 19 Mar 2025 10:47:53 +0100 Subject: [PATCH 02/10] fix: knop toegevoegd wanneer ingelogd op homepage om op ingelogde homepage terecht te kunnen komen --- frontend/src/views/HomePage.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/views/HomePage.vue b/frontend/src/views/HomePage.vue index e9d53770..9b419ecd 100644 --- a/frontend/src/views/HomePage.vue +++ b/frontend/src/views/HomePage.vue @@ -19,6 +19,7 @@

    Your access token for the backend is: {{ auth.authState.user?.access_token }}

    + home Send test request From 29949462ed813b1624437b31b77df87b9099c001 Mon Sep 17 00:00:00 2001 From: Laure Jablonski Date: Wed, 19 Mar 2025 11:48:11 +0100 Subject: [PATCH 03/10] style: menubalk klapt in als het scherm te klein wordt om alle componenten te tonen --- frontend/src/components/MenuBar.vue | 107 +++++++++++++++++++++++++--- 1 file changed, 97 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/MenuBar.vue b/frontend/src/components/MenuBar.vue index 45ff871c..c34946a0 100644 --- a/frontend/src/components/MenuBar.vue +++ b/frontend/src/components/MenuBar.vue @@ -9,14 +9,10 @@ const { t, locale } = useI18n(); - // Instantiate variables to use in html to render right - // Links and content dependent on the role (student or teacher) - const path = "/user"; - const role = auth.authState.activeRole; - const name : string = auth.authState.user!.profile.name!; - const initials : string = name + const name: string = auth.authState.user!.profile.name!; + const initials: string = name .split(" ") .map((n) => n[0]) .join(""); @@ -34,6 +30,8 @@ console.log(langCode); }; + const drawer = ref(false); + // when the user wants to logout, the authentication must be set to False function performLogout() { auth.logout(); @@ -42,12 +40,85 @@ From 0b298a5543043a8ee7b56b4a5f9d811b351e5433 Mon Sep 17 00:00:00 2001 From: Laure Jablonski Date: Wed, 19 Mar 2025 20:00:05 +0100 Subject: [PATCH 05/10] style: rol bewoog wanneer schermgrootte veranderde --- frontend/src/components/MenuBar.vue | 115 +++++++++++++++++++--------- 1 file changed, 77 insertions(+), 38 deletions(-) diff --git a/frontend/src/components/MenuBar.vue b/frontend/src/components/MenuBar.vue index c34946a0..42b4543d 100644 --- a/frontend/src/components/MenuBar.vue +++ b/frontend/src/components/MenuBar.vue @@ -41,72 +41,111 @@