chore(frontend): code geformatteerd en gelint
This commit is contained in:
		
							parent
							
								
									ad726843b4
								
							
						
					
					
						commit
						e777ed025d
					
				
					 2 changed files with 35 additions and 16 deletions
				
			
		|  | @ -1,30 +1,50 @@ | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
|     import { computed } from "vue"; |     import { ref, type Ref } from "vue"; | ||||||
|     import { useRoute } from "vue-router"; |     import { useRoute } from "vue-router"; | ||||||
|     import { ref } from "vue"; |     import dwengoLogo from "../../../assets/img/dwengo-groen-zwart.svg"; | ||||||
|     import dwengo_logo from "../../../assets/img/dwengo-groen-zwart.svg"; |  | ||||||
| 
 | 
 | ||||||
|     const route = useRoute(); |     const route = useRoute(); | ||||||
| 
 | 
 | ||||||
|     // instantiate variables to use in html to render right |     type Language = { | ||||||
|     // links and content dependent on the role (student or teacher) |         name: string; | ||||||
|     const isTeacher = route.path.includes("teacher"); |         code: string; | ||||||
|     const userId = computed(() => route.params.id as string); |     }; | ||||||
| 
 | 
 | ||||||
|     const role = isTeacher ? "teacher" : "student"; |     declare global { | ||||||
|     const name = "Kurt Cobain"; |         interface Window { | ||||||
|     const initials = name |             userId: string; | ||||||
|  |             role: string; | ||||||
|  |             name: string; | ||||||
|  |             initials: string; | ||||||
|  |             languages: Ref<Language[]>; | ||||||
|  |             changeLanguage: (langCode: string) => void; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // Instantiate variables to use in html to render right | ||||||
|  |     // Links and content dependent on the role (student or teacher) | ||||||
|  |     const isTeacher = route.path.includes("teacher"); | ||||||
|  | 
 | ||||||
|  |     window.userId = route.params.id as string; | ||||||
|  | 
 | ||||||
|  |     window.role = isTeacher ? "teacher" : "student"; | ||||||
|  |     window.name = "Kurt Cobain"; | ||||||
|  |     window.initials = window.name | ||||||
|         .split(" ") |         .split(" ") | ||||||
|         .map((n) => n[0]) |         .map((n) => { | ||||||
|  |             return n[0]; | ||||||
|  |         }) | ||||||
|         .join(""); |         .join(""); | ||||||
| 
 | 
 | ||||||
|     const languages = ref([ |     window.languages = ref<Language[]>([ | ||||||
|         { name: "English", code: "en" }, |         { name: "English", code: "en" }, | ||||||
|         { name: "Nederlands", code: "nl" }, |         { name: "Nederlands", code: "nl" }, | ||||||
|     ]); |     ]); | ||||||
| 
 | 
 | ||||||
|     // logic to change the language of the website to the selected language |     // Logic to change the language of the website to the selected language | ||||||
|     const changeLanguage = (langCode: string) => {}; |     window.changeLanguage = (langCode: string) => { | ||||||
|  |         console.log(langCode); | ||||||
|  |     }; | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|  | @ -39,7 +59,7 @@ | ||||||
|                         > |                         > | ||||||
|                             <img |                             <img | ||||||
|                                 class="dwengo_logo" |                                 class="dwengo_logo" | ||||||
|                                 :src="dwengo_logo" |                                 :src="dwengoLogo" | ||||||
|                             /> |                             /> | ||||||
|                             <p class="caption"> |                             <p class="caption"> | ||||||
|                                 {{ role }} |                                 {{ role }} | ||||||
|  |  | ||||||
|  | @ -5,7 +5,6 @@ import "vuetify/styles"; | ||||||
| import { createVuetify } from "vuetify"; | import { createVuetify } from "vuetify"; | ||||||
| import * as components from "vuetify/components"; | import * as components from "vuetify/components"; | ||||||
| import * as directives from "vuetify/directives"; | import * as directives from "vuetify/directives"; | ||||||
| import { aliases, mdi } from 'vuetify/iconsets/mdi' |  | ||||||
| 
 | 
 | ||||||
| // Components
 | // Components
 | ||||||
| import App from "./App.vue"; | import App from "./App.vue"; | ||||||
|  |  | ||||||
		Reference in a new issue
	
	 Laure Jablonski
						Laure Jablonski