From 6f0b6f094d9fdeffc5de181c186a81c21bd5a6cb Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 27 Apr 2023 11:52:32 +0200 Subject: [PATCH 1/4] refactor auto logout messages autohide time 5000 --- frontend/src/components/SessionLogoutTimeout.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/SessionLogoutTimeout.vue b/frontend/src/components/SessionLogoutTimeout.vue index 7a11d1d83..2b776fbdd 100644 --- a/frontend/src/components/SessionLogoutTimeout.vue +++ b/frontend/src/components/SessionLogoutTimeout.vue @@ -67,7 +67,7 @@ export default { } if (this.tokenExpiresInSeconds === 0) { this.$timer.stop('tokenExpires') - this.toastInfoNoHide(this.$t('session.automaticallyLoggedOut')) + this.toastInfo(this.$t('session.automaticallyLoggedOut')) this.$emit('logout') } }, @@ -85,7 +85,7 @@ export default { }) .catch(() => { this.$timer.stop('tokenExpires') - this.toastInfoNoHide(this.$t('session.automaticallyLoggedOut')) + this.toastInfo(this.$t('session.automaticallyLoggedOut')) this.$emit('logout') }) }, From 3e0db936d63f95f57359ef896ab4a88256195f43 Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 2 May 2023 18:00:29 +0200 Subject: [PATCH 2/4] update jest-canvas-mock version to resolve window mock problem in tests --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 8515ca209..f07284da6 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,7 +44,7 @@ "graphql": "^15.5.1", "identity-obj-proxy": "^3.0.0", "jest": "^26.6.3", - "jest-canvas-mock": "^2.3.1", + "jest-canvas-mock": "^2.5.0", "jwt-decode": "^3.1.2", "portal-vue": "^2.1.7", "prettier": "^2.2.1", From 12a499ab42f87f67e09d0564bab3c1e88e555eaf Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 2 May 2023 18:04:13 +0200 Subject: [PATCH 3/4] update yarn.lock --- frontend/yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 9e8fdd81d..7cc8e5fe5 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -8657,10 +8657,10 @@ javascript-stringify@^1.6.0: resolved "https://registry.yarnpkg.com/javascript-stringify/-/javascript-stringify-1.6.0.tgz#142d111f3a6e3dae8f4a9afd77d45855b5a9cce3" integrity sha1-FC0RHzpuPa6PSpr9d9RYVbWpzOM= -jest-canvas-mock@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/jest-canvas-mock/-/jest-canvas-mock-2.3.1.tgz#9535d14bc18ccf1493be36ac37dd349928387826" - integrity sha512-5FnSZPrX3Q2ZfsbYNE3wqKR3+XorN8qFzDzB5o0golWgt6EOX1+emBnpOc9IAQ+NXFj8Nzm3h7ZdE/9H0ylBcg== +jest-canvas-mock@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/jest-canvas-mock/-/jest-canvas-mock-2.5.0.tgz#3e60f87f77ddfa273cf8e7e4ea5f86fa827c7117" + integrity sha512-s2bmY2f22WPMzhB2YA93kiyf7CAfWAnV/sFfY9s48IVOrGmwui1eSFluDPesq1M+7tSC1hJAit6mzO0ZNXvVBA== dependencies: cssfontparser "^1.2.1" moo-color "^1.0.2" From ef8c619512116ffdd0f423066eb8e2499c7bfee1 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 31 May 2023 12:50:10 +0200 Subject: [PATCH 4/4] remove changes, hide automatic logout toaster after login --- frontend/src/components/SessionLogoutTimeout.vue | 4 ++-- frontend/src/pages/Login.vue | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/SessionLogoutTimeout.vue b/frontend/src/components/SessionLogoutTimeout.vue index 2b776fbdd..7a11d1d83 100644 --- a/frontend/src/components/SessionLogoutTimeout.vue +++ b/frontend/src/components/SessionLogoutTimeout.vue @@ -67,7 +67,7 @@ export default { } if (this.tokenExpiresInSeconds === 0) { this.$timer.stop('tokenExpires') - this.toastInfo(this.$t('session.automaticallyLoggedOut')) + this.toastInfoNoHide(this.$t('session.automaticallyLoggedOut')) this.$emit('logout') } }, @@ -85,7 +85,7 @@ export default { }) .catch(() => { this.$timer.stop('tokenExpires') - this.toastInfo(this.$t('session.automaticallyLoggedOut')) + this.toastInfoNoHide(this.$t('session.automaticallyLoggedOut')) this.$emit('logout') }) }, diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 6fd435c2d..6e0a50949 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -86,6 +86,7 @@ export default { const loader = this.$loading.show({ container: this.$refs.submitButton, }) + this.$root.$bvToast.hide() this.$apollo .mutate({ mutation: login,