Skip to content

Commit

Permalink
Merge pull request #3804 from bcgov/NDT-662-Logout-Modal
Browse files Browse the repository at this point in the history
Ndt 662 logout modal
  • Loading branch information
ccbc-service-account authored Jan 31, 2025
2 parents db7617a + 185c530 commit 310ded8
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [1.233.0](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.232.0...v1.233.0) (2025-01-31)

### Features

- update logout modal ([aef6ee1](https://github.com/bcgov/CONN-CCBC-portal/commit/aef6ee10b207caa9868a56ae6cd55fd9fc10e3ae))

# [1.232.0](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.231.0...v1.232.0) (2025-01-31)

### Features
Expand Down
6 changes: 3 additions & 3 deletions app/components/SessionExpiryHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ const SessionExpiryHandler: React.FC = () => {
<SessionTimeoutHandler
modalDisplaySecondsBeforeLogout={120}
onSessionExpired={handleSessionExpired}
resetOnChange={[router]}
resetOnChange={[]}
extendSessionOnEvents={{
enabled: true,
enabled: false,
throttleTime: 60000,
events: ['keydown', 'mousedown', 'scroll'],
events: [],
}}
/>
);
Expand Down
27 changes: 27 additions & 0 deletions app/patches/@bcgov-cas+sso-react+2.0.0.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
diff --git a/node_modules/@bcgov-cas/sso-react/dist/LogoutWarningModal.js b/node_modules/@bcgov-cas/sso-react/dist/LogoutWarningModal.js
index c925039..4eb90fa 100644
--- a/node_modules/@bcgov-cas/sso-react/dist/LogoutWarningModal.js
+++ b/node_modules/@bcgov-cas/sso-react/dist/LogoutWarningModal.js
@@ -54,18 +54,14 @@ var LogoutWarningModal = function (props) {
return renderModal(__assign({ remainingSeconds: remainingSeconds }, props));
}
// Default render
- return (react_1.default.createElement(Modal_1.default, { size: "lg", id: id, style: { zIndex: 100 } },
- react_1.default.createElement(Modal_1.default.Header, { className: "h4" }, "Inactivity Logout Warning"),
+ return (react_1.default.createElement(Modal_1.default, { size: "lg", id: id, style: { zIndex: 100, top: '100px' } },
+ react_1.default.createElement(Modal_1.default.Header, { className: "h4" }, "Session time exceeded"),
react_1.default.createElement(Modal_1.default.Content, { style: { padding: "2em" } },
react_1.default.createElement(Grid_1.default, { cols: 12 },
- react_1.default.createElement(Grid_1.default.Row, null, "Your session is about to expire due to inactivity."),
react_1.default.createElement(Grid_1.default.Row, null,
- "You will be logged out in ",
- remainingSeconds,
- " seconds."),
+ "You have exceeded the 8 hour session time, and for security reasons you have been logged out."),
react_1.default.createElement(Grid_1.default.Row, { style: { marginTop: "1em" }, justify: "end" },
react_1.default.createElement("form", { action: logoutPath, method: "post", style: { marginBottom: 0 } },
- react_1.default.createElement(Button_1.default, { type: "submit", variant: "secondary", id: "logout-warning-modal-logout-button" }, "Logout")),
- react_1.default.createElement(Button_1.default, { id: "logout-warning-modal-remain-active-button", onClick: onExtendSession, variant: "primary", style: { marginLeft: "1em" } }, "Remain\u00A0active"))))));
+ react_1.default.createElement(Button_1.default, { type: "submit", variant: "secondary", id: "logout-warning-modal-logout-button" }, "Log back in")))))));
};
exports.default = LogoutWarningModal;
diff --git a/node_modules/@bcgov-cas/sso-react/dist/SessionTimeoutHandler.js b/node_modules/@bcgov-cas/sso-react/dist/SessionTimeoutHandler.js
index 43e6190..de717d8 100644
--- a/node_modules/@bcgov-cas/sso-react/dist/SessionTimeoutHandler.js
Expand Down
1 change: 1 addition & 0 deletions db/sqitch.plan
Original file line number Diff line number Diff line change
Expand Up @@ -794,3 +794,4 @@ tables/application_map_data 2025-01-28T17:53:59Z Rafael Solorzano <61289255+rafa
@1.230.0 2025-01-29T19:05:43Z CCBC Service Account <[email protected]> # release v1.230.0
@1.231.0 2025-01-31T05:19:13Z CCBC Service Account <[email protected]> # release v1.231.0
@1.232.0 2025-01-31T17:43:27Z CCBC Service Account <[email protected]> # release v1.232.0
@1.233.0 2025-01-31T22:40:56Z CCBC Service Account <[email protected]> # release v1.233.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CONN-CCBC-portal",
"version": "1.232.0",
"version": "1.233.0",
"main": "index.js",
"repository": "https://github.com/bcgov/CONN-CCBC-portal.git",
"author": "Romer, Meherzad CITZ:EX <[email protected]>",
Expand Down

0 comments on commit 310ded8

Please sign in to comment.