From c7c1b6c7c67d8d2fa7feeb97ebb25ce717ca836d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Mon, 10 Nov 2025 08:09:09 +0100 Subject: [PATCH] move notification with new marging and close button close #7 --- src/vueLib/general/useNotify.ts | 17 ++++++++++++++++- src/vueLib/login/userStore.ts | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/vueLib/general/useNotify.ts b/src/vueLib/general/useNotify.ts index be9b8e3..b15376f 100644 --- a/src/vueLib/general/useNotify.ts +++ b/src/vueLib/general/useNotify.ts @@ -48,9 +48,24 @@ export function useNotify() { $q?.notify({ message: message, color: color, - position: 'bottom-right', + position: 'top-left', icon: icon, timeout: timeout, + classes: 'custom-notify', + attrs: { + style: 'margin-top: 50px', + }, + actions: [ + { + icon: 'close', + color: 'white', + dense: true, + round: true, + handler: () => { + /* just closes */ + }, + }, + ], }); } } diff --git a/src/vueLib/login/userStore.ts b/src/vueLib/login/userStore.ts index 9fdd58b..7885787 100644 --- a/src/vueLib/login/userStore.ts +++ b/src/vueLib/login/userStore.ts @@ -56,9 +56,23 @@ export const useUserStore = defineStore('user', { $q?.notify({ message: "user '" + this.user?.username + "' logged out", color: 'orange', - position: 'bottom-right', + position: 'top-left', icon: 'warning', timeout: 5000, + attrs: { + style: 'margin-top: 50px', + }, + actions: [ + { + icon: 'close', + color: 'white', + dense: true, + round: true, + handler: () => { + /* just closes */ + }, + }, + ], }); } else { console.error("user '" + this.user?.username + "' logged out"); @@ -73,9 +87,23 @@ export const useUserStore = defineStore('user', { $q?.notify({ message: err, color: 'orange', - position: 'bottom-right', + position: 'top-left', icon: 'warning', timeout: 5000, + attrs: { + style: 'margin-top: 50px', + }, + actions: [ + { + icon: 'close', + color: 'white', + dense: true, + round: true, + handler: () => { + /* just closes */ + }, + }, + ], }); } else { console.error("user '" + this.user?.username + "' logged out");