Merge remote-tracking branch 'origin/dev' into chore/login
# Conflicts: # backend/.env.example # backend/package.json # backend/src/app.ts # backend/src/routes/login.ts # backend/src/routes/student.ts # docker-compose.yml # frontend/src/App.vue # frontend/src/views/HomePage.vue # frontend/src/views/LoginPage.vue # package-lock.json
This commit is contained in:
		
						commit
						de0199de96
					
				
					 109 changed files with 3789 additions and 1727 deletions
				
			
		|  | @ -4,9 +4,7 @@ | |||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|     <router-view/> | ||||
|     <router-view /> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,9 @@ | |||
| <script setup lang="ts"> | ||||
| // This component contains a list with all themes and will be shown on a student's and teacher's homepage. | ||||
|     // This component contains a list with all themes and will be shown on a student's and teacher's homepage. | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <b>404 - Page Not Found</b> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| import {createRouter, createWebHistory} from "vue-router"; | ||||
| import { createRouter, createWebHistory } from "vue-router"; | ||||
| import MenuBar from "@/components/MenuBar.vue"; | ||||
| import StudentHomepage from "@/views/StudentHomepage.vue"; | ||||
| import StudentAssignments from "@/views/assignments/StudentAssignments.vue"; | ||||
|  | @ -23,12 +23,12 @@ const router = createRouter({ | |||
|         { | ||||
|             path: "/", | ||||
|             name: "home", | ||||
|             component: () => {return import("../views/HomePage.vue")}, | ||||
|             component: () => import("../views/HomePage.vue"), | ||||
|         }, | ||||
|         { | ||||
|             path: "/login", | ||||
|             name: "LoginPage", | ||||
|             component: () => {return import("../views/LoginPage.vue")} | ||||
|             component: () => import("../views/LoginPage.vue"), | ||||
|         }, | ||||
|         { | ||||
|             path: "/callback", | ||||
|  | @ -41,24 +41,24 @@ const router = createRouter({ | |||
|                 { | ||||
|                     path: "home", | ||||
|                     name: "StudentHomePage", | ||||
|                     component: StudentHomepage | ||||
|                     component: StudentHomepage, | ||||
|                 }, | ||||
|                 { | ||||
|                     path: "assignment", | ||||
|                     name: "StudentAssignments", | ||||
|                     component: StudentAssignments | ||||
|                     component: StudentAssignments, | ||||
|                 }, | ||||
|                 { | ||||
|                     path: "class", | ||||
|                     name: "StudentClasses", | ||||
|                     component: StudentClasses | ||||
|                     component: StudentClasses, | ||||
|                 }, | ||||
|                 { | ||||
|                     path: "discussion", | ||||
|                     name: "StudentDiscussions", | ||||
|                     component: StudentDiscussions | ||||
|                     component: StudentDiscussions, | ||||
|                 }, | ||||
|             ] | ||||
|             ], | ||||
|         }, | ||||
| 
 | ||||
|         { | ||||
|  | @ -68,56 +68,54 @@ const router = createRouter({ | |||
|                 { | ||||
|                     path: "home", | ||||
|                     name: "TeacherHomepage", | ||||
|                     component: TeacherHomepage | ||||
|                     component: TeacherHomepage, | ||||
|                 }, | ||||
|                 { | ||||
|                     path: "assignment", | ||||
|                     name: "TeacherAssignments", | ||||
|                     component: TeacherAssignments | ||||
|                     component: TeacherAssignments, | ||||
|                 }, | ||||
|                 { | ||||
|                     path: "class", | ||||
|                     name: "TeacherClasses", | ||||
|                     component: TeacherClasses | ||||
|                     component: TeacherClasses, | ||||
|                 }, | ||||
|                 { | ||||
|                     path: "discussion", | ||||
|                     name: "TeacherDiscussions", | ||||
|                     component: TeacherDiscussions | ||||
|                     component: TeacherDiscussions, | ||||
|                 }, | ||||
|             ] | ||||
|             ], | ||||
|         }, | ||||
|         { | ||||
|             path: "/assignment/create", | ||||
|             name: "CreateAssigment", | ||||
|             component: CreateAssignment | ||||
| 
 | ||||
|             component: CreateAssignment, | ||||
|         }, | ||||
|         { | ||||
|             path: "/assignment/:id", | ||||
|             name: "SingleAssigment", | ||||
|             component: SingleAssignment | ||||
| 
 | ||||
|             component: SingleAssignment, | ||||
|         }, | ||||
|         { | ||||
|             path: "/class/create", | ||||
|             name: "CreateClass", | ||||
|             component: CreateClass | ||||
|             component: CreateClass, | ||||
|         }, | ||||
|         { | ||||
|             path: "/class/:id", | ||||
|             name: "SingleClass", | ||||
|             component: SingleClass | ||||
|             component: SingleClass, | ||||
|         }, | ||||
|         { | ||||
|             path: "/discussion/create", | ||||
|             name: "CreateDiscussion", | ||||
|             component: CreateDiscussion | ||||
|             component: CreateDiscussion, | ||||
|         }, | ||||
|         { | ||||
|             path: "/discussion/:id", | ||||
|             name: "SingleDiscussion", | ||||
|             component: SingleDiscussion | ||||
|             component: SingleDiscussion, | ||||
|         }, | ||||
|         { | ||||
|             path: "/:catchAll(.*)", | ||||
|  |  | |||
							
								
								
									
										18
									
								
								frontend/src/utils/base64ToImage.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								frontend/src/utils/base64ToImage.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,18 @@ | |||
| /** | ||||
|  * Converts a Base64 string to a valid image source URL. | ||||
|  * | ||||
|  * @param base64String - The "image" field from the learning path JSON response. | ||||
|  * @returns A properly formatted data URL for use in an <img> tag. | ||||
|  * | ||||
|  * @example | ||||
|  * // Fetch the learning path data and extract the image
 | ||||
|  * const response = await fetch( learning path route ); | ||||
|  * const data = await response.json(); | ||||
|  * const base64String = data.image; | ||||
|  * | ||||
|  * // Use in an <img> element
 | ||||
|  * <img :src="convertBase64ToImageSrc(base64String)" alt="Learning Path Image" /> | ||||
|  */ | ||||
| export function convertBase64ToImageSrc(base64String: string): string { | ||||
|     return base64String.startsWith("data:image") ? base64String : `data:image/png;base64,${base64String}`; | ||||
| } | ||||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
|  | @ -1,11 +1,7 @@ | |||
| <script setup lang="ts"> | ||||
| 
 | ||||
| </script> | ||||
| <script setup lang="ts"></script> | ||||
| 
 | ||||
| <template> | ||||
|     <main></main> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 
 | ||||
| </style> | ||||
| <style scoped></style> | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger