Skip to content

Commit

Permalink
FEAT ITEM-413-front-afficher-plusieurs-messages-en-meme-temps-sans-qu…
Browse files Browse the repository at this point in the history
…ils-ne-soient-supperposes :

     - simplification du code
     - adaptation au RGAA du bouton de fermeture des messages d'alerte
     - correction du style du message d'alerte sur la page de connexion
  • Loading branch information
EryneKL committed Dec 4, 2024
1 parent a1e31bb commit 5f068c8
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<div class="notificationContainer">
<v-slide-y-transition group>
<v-alert
class="alertMessage"
v-for="notification in errorsList"
:color=alertType
:key="notification[0]"
>
<p class="mb-4">{{ notification[1].message }}</p>
<p class="mb-4">{{ notification[1].description }}</p>
<div style="text-align: right"><v-btn @click="removeNotification(notification[0])">CLOSE</v-btn></div>
<div style="text-align: right"><v-btn @click="removeNotification(notification[0])" value="Fermer le message d'erreur">FERMER</v-btn></div>
</v-alert>
</v-slide-y-transition>
</div>
Expand Down Expand Up @@ -52,8 +52,6 @@ const alertType = ref(null)
const errorsList = ref(new Map())
let idActualMessageErrNetwork = null;
let errorType = null
const authStore = useAuthStore();
Expand Down Expand Up @@ -87,8 +85,6 @@ function addError(error) {
description: ''
}
if(!error.response){
removeNotification(idActualMessageErrNetwork)
idActualMessageErrNetwork = notificationId;
errorType = "ERR_NETWORK"
newError.message = 'Erreur réseau : ' + error.code
newError.description = 'Service indisponible : merci de réessayer ultérieurement.'
Expand Down Expand Up @@ -156,11 +152,13 @@ function clearErrors() {
<style>
/*Declaré en global*/
/* Style des card contenant les choix proposés aux utilisateurs et utilisatrices */
.custom-card-title {
background-color: v-bind('$vuetify.theme.current.colors.primary');
color: v-bind('$vuetify.theme.current.colors.textColor');
}
/* Style du container comprenant les messages d'erreur */
.notificationContainer {
position: fixed;
top: 80px;
Expand All @@ -169,4 +167,11 @@ function clearErrors() {
grid-gap: 0.5em;
z-index: 99;
}
/* Permet d'avoir le bon formatage du message d'erreur sur la page de connexion */
.alertMessage {
background-color: #A32525;
color: white;
}
</style>

0 comments on commit 5f068c8

Please sign in to comment.