1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #5136 from thornbill/login-redirect

Add support for redirecting to the requested page after login
This commit is contained in:
Bill Thornton 2024-02-07 00:56:40 -05:00 committed by GitHub
commit a5a0122001
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 13 deletions

View file

@ -47,8 +47,9 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
if (location.pathname === BounceRoutes.Login) {
setIsLoading(false);
} else {
console.debug('[ConnectionRequired] not logged in, redirecting to login page');
navigate(`${BounceRoutes.Login}?serverid=${connectionResponse.ApiClient.serverId()}`);
console.debug('[ConnectionRequired] not logged in, redirecting to login page', location);
const url = encodeURIComponent(location.pathname + location.search);
navigate(`${BounceRoutes.Login}?serverid=${connectionResponse.ApiClient.serverId()}&url=${url}`);
}
return;
case ConnectionState.ServerSelection: