Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-8.10.x' into candidate…
Browse files Browse the repository at this point in the history
…-8.12.x
  • Loading branch information
GordonSmith committed Nov 9, 2023
2 parents 1cea10d + 78d5c95 commit c964223
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions esp/src/src-react/components/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ export const Frame: React.FunctionComponent<FrameProps> = () => {
return () => unlisten();
}, []);

React.useEffect(() => {
initSession();

topic.subscribe("hpcc/session_management_status", function (publishedMessage) {
if (publishedMessage.status === "Unlocked") {
unlock();
} else if (publishedMessage.status === "Locked") {
lock();
} else if (publishedMessage.status === "DoIdle") {
fireIdle();
} else if (publishedMessage.status === "Idle") {
window.localStorage.setItem("pageOnLock", window.location.hash.substring(1));
setUserSession({ ...userSession, Status: "Locked" });
window.location.reload();
}
});
}, [setUserSession, userSession]);

React.useEffect(() => {
document.title = `${showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch v9"}${locationPathname.split("/").join(" | ")}`;
}, [environmentTitle, locationPathname, showEnvironmentTitle]);
Expand Down

0 comments on commit c964223

Please sign in to comment.