commit
						a59417b8f5
					
				
					 6 changed files with 105 additions and 42 deletions
				
			
		|  | @ -84,7 +84,10 @@ | |||
|                 </div> | ||||
|             </div> | ||||
|             <div class="container_right"> | ||||
|                 <v-menu open-on-hover> | ||||
|                 <v-menu | ||||
|                     open-on-hover | ||||
|                     open-on-click | ||||
|                 > | ||||
|                     <template v-slot:activator="{ props }"> | ||||
|                         <v-btn | ||||
|                             v-bind="props" | ||||
|  |  | |||
|  | @ -1,6 +1,20 @@ | |||
| <script setup lang="ts"> | ||||
|     import { useRouter } from "vue-router"; | ||||
|     import dwengoLogo from "../../../assets/img/dwengo-groen-zwart.svg"; | ||||
|     import auth from "@/services/auth/auth-service.ts"; | ||||
|     import { watch } from "vue"; | ||||
| 
 | ||||
|     const router = useRouter(); | ||||
| 
 | ||||
|     watch( | ||||
|         () => auth.isLoggedIn.value, | ||||
|         async (newVal) => { | ||||
|             if (newVal) { | ||||
|                 await router.push("/user"); | ||||
|             } | ||||
|         }, | ||||
|         { immediate: true }, | ||||
|     ); | ||||
| 
 | ||||
|     async function loginAsStudent(): Promise<void> { | ||||
|         await auth.loginAs("student"); | ||||
|  | @ -9,10 +23,6 @@ | |||
|     async function loginAsTeacher(): Promise<void> { | ||||
|         await auth.loginAs("teacher"); | ||||
|     } | ||||
| 
 | ||||
|     async function performLogout(): Promise<void> { | ||||
|         await auth.logout(); | ||||
|     } | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|  | @ -65,13 +75,6 @@ | |||
|                 </div> | ||||
|             </ul> | ||||
|         </div> | ||||
|         <div v-if="auth.isLoggedIn.value"> | ||||
|             <p> | ||||
|                 You are currently logged in as {{ auth.authState.user!.profile.name }} ({{ auth.authState.activeRole }}) | ||||
|             </p> | ||||
|             <v-btn @click="performLogout">Logout</v-btn> | ||||
|             <v-btn to="/user">home</v-btn> | ||||
|         </div> | ||||
|     </main> | ||||
| </template> | ||||
| 
 | ||||
|  |  | |||
|  | @ -143,6 +143,13 @@ | |||
|         box-sizing: border-box; | ||||
|     } | ||||
| 
 | ||||
|     h1 { | ||||
|         color: #0e6942; | ||||
|         text-transform: uppercase; | ||||
|         font-weight: bolder; | ||||
|         font-size: 50px; | ||||
|     } | ||||
| 
 | ||||
|     .center-btn { | ||||
|         display: block; | ||||
|         margin-left: auto; | ||||
|  |  | |||
|  | @ -95,6 +95,13 @@ | |||
|         justify-content: center; | ||||
|     } | ||||
| 
 | ||||
|     h1 { | ||||
|         color: #0e6942; | ||||
|         text-transform: uppercase; | ||||
|         font-weight: bolder; | ||||
|         font-size: 50px; | ||||
|     } | ||||
| 
 | ||||
|     .dropdowns { | ||||
|         display: flex; | ||||
|         justify-content: space-between; | ||||
|  |  | |||
|  | @ -287,6 +287,8 @@ | |||
|                     <template v-slot:default> | ||||
|                         <v-btn | ||||
|                             class="button-in-nav" | ||||
|                             width="100%" | ||||
|                             :color="COLORS.teacherExclusive" | ||||
|                             @click="assign()" | ||||
|                             >{{ t("assignLearningPath") }}</v-btn | ||||
|                         > | ||||
|  |  | |||
		Reference in a new issue
	
	 Laure Jablonski
						Laure Jablonski