From e47be245835dacd8d1e5c8bdb757f51d25f4594a Mon Sep 17 00:00:00 2001 From: Peter Linnegan Date: Thu, 10 Mar 2022 17:09:59 +0000 Subject: [PATCH] feat: make login link open in new tab --- package.json | 2 +- public/manifest.webapp | 2 +- .../shared/components/LoggedOutMessage.tsx | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 162e59d..5395e86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dashboard-information", - "version": "1.1.2", + "version": "1.1.1", "private": true, "dependencies": { "@dhis2/ui": "^7.16.1", diff --git a/public/manifest.webapp b/public/manifest.webapp index 0f70053..cb0f735 100644 --- a/public/manifest.webapp +++ b/public/manifest.webapp @@ -9,7 +9,7 @@ }, "appType": "DASHBOARD_WIDGET", "name": "Information", - "version": "1.1.2", + "version": "1.1.1", "description": "Rich text editor for DHIS2 dashboard content, created for PEPFAR. Allows embedding videos. Strips Javascript from user-created content. For more info, see https://github.com/pepfar-datim/dashboard-information-widget", "developer": { "name": "PEPFAR" diff --git a/src/modules/shared/components/LoggedOutMessage.tsx b/src/modules/shared/components/LoggedOutMessage.tsx index ff26ba0..0b93a57 100644 --- a/src/modules/shared/components/LoggedOutMessage.tsx +++ b/src/modules/shared/components/LoggedOutMessage.tsx @@ -12,17 +12,19 @@ const LoggedOutMessage = () => { fontFamily: 'Roboto', }, }; - const handleLogin = () => { - const baseUrl = window.parent.location.origin; - window.parent.location.href = `${baseUrl}/dhis-web-commons/security/login.action`; - }; + const baseUrl = window.parent.location.origin; return (

You are no longer logged in, please click{' '} -

+ here -

{' '} - to return to the login page. + {' '} + to open a new tab and login, then refresh the current page.

); };