mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add support for redirecting to the requested page after login
This commit is contained in:
parent
bb77009f44
commit
d88bcb48d7
2 changed files with 24 additions and 13 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue