From fb48e7c9d2ba4a3566244234174230dde4411304 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 3 Dec 2021 13:09:45 +0100 Subject: [PATCH 01/71] catch error Client certificate revoked and pass error.session-expired. Graph QL error: always passed from backend --- frontend/src/locales/de.json | 2 +- frontend/src/locales/en.json | 2 +- frontend/src/main.js | 2 +- frontend/src/views/Layout/DashboardLayout_gdd.vue | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 1e8bfb621..120bf6cbd 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -48,7 +48,7 @@ "error": "Fehler", "no-account": "Leider konnten wir keinen Account finden mit diesen Daten!", "no-email-verify": "Die Email wurde noch nicht bestätigt, bitte überprüfe deine Emails und klicke auf den Aktivierungslink!", - "session-expired": "Sitzung abgelaufen!" + "session-expired": "Die Sitzung wurde aus Sicherheitsgründen beendet." }, "form": { "amount": "Betrag", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index f473ff798..bbb68b0b9 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -48,7 +48,7 @@ "error": "Error", "no-account": "Unfortunately we could not find an account to the given data!", "no-email-verify": "Your email is not activated yet, please check your emails and click the activation link!", - "session-expired": "The session expired" + "session-expired": "The session was closed for security reasons." }, "form": { "amount": "Amount", diff --git a/frontend/src/main.js b/frontend/src/main.js index 1aa945608..8194bb4a8 100755 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -24,7 +24,7 @@ const authLink = new ApolloLink((operation, forward) => { }) return forward(operation).map((response) => { if (response.errors && response.errors[0].message === '403.13 - Client certificate revoked') { - response.errors[0].message = i18n.t('error.session-expired') + // response.errors[0].message = i18n.t('error.session-expired') store.dispatch('logout', null) if (router.currentRoute.path !== '/login') router.push('/login') return response diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index 8273685bd..9487eadf7 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -133,7 +133,9 @@ export default { }) .catch((error) => { this.pending = true - this.$toasted.error(error.message) + if (error.message === 'GraphQL error: 403.13 - Client certificate revoked') { + this.$toasted.error(this.$t('error.session-expired')) + } // what to do when loading balance fails? }) }, From 73006ede996604a09e7642b3b0c1a9e3756fa5b3 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 7 Dec 2021 10:34:24 +0100 Subject: [PATCH 02/71] insert b-navbar from bootstrap --- .../src/views/Layout/DashboardLayout_gdd.vue | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index 8273685bd..16847f39f 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -1,5 +1,46 @@