feat: Add configurable auto logout on inactivity

Users can pick an inactivity timeout in their preferences. A warning
appears 30 seconds before, and activity or a logout is synchronised
across open tabs.
This commit is contained in:
Daniel Hiller
2026-08-08 00:24:16 +02:00
parent a9d0c228df
commit 3ef87a8603
22 changed files with 603 additions and 2 deletions
+13
View File
@@ -26,6 +26,7 @@ const initialState = {
projectsSearch: '',
projectsOrder: ProjectOrders.BY_DEFAULT,
isHiddenProjectsVisible: false, // TODO: refactor?
autoLogoutWarning: null,
};
// eslint-disable-next-line default-param-last
@@ -117,6 +118,18 @@ export default (state = initialState, { type, payload }) => {
...state,
isLogouting: true,
};
case ActionTypes.AUTO_LOGOUT_WARNING_SHOW:
return {
...state,
autoLogoutWarning: {
expiresAt: payload.expiresAt,
},
};
case ActionTypes.AUTO_LOGOUT_WARNING_DISMISS:
return {
...state,
autoLogoutWarning: null,
};
case ActionTypes.MODAL_OPEN:
return {
...state,