Merge pull request #244 from SELab-2/fix/small-fixes

fix: Small fixes
This commit is contained in:
Laure Jablonski 2025-05-06 10:08:49 +02:00 committed by GitHub
commit a59417b8f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 105 additions and 42 deletions

View file

@ -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"

View file

@ -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>

View file

@ -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;

View file

@ -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;

View file

@ -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
>