You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/12/10 07:15:36 UTC
[GitHub] [incubator-dolphinscheduler] chengshiwen commented on pull request #4162: [Fix][UI]: fix re-login problem in new tab
chengshiwen commented on pull request #4162:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4162#issuecomment-742292282
@break60 Thanks for reply.
The action to require re-login in new tab for logged-in user is not a good user interaction experience, so I submit this pr to solve the problem.
For the state synchronization in multiple tabs, this problem appears in most front-end projects. In essence, each tab is independent of each other, and http request is also stateless. To solve this problem, listening event of `localStorage` may be possible. Specifically,
- Chage `localStorage` when some state changed in a certain tab
- Add event listener for key `storage` in another tab
- This means that you can trigger a page refresh, or whatever you want to do
The sample code is as follow:

The example effect is as follow:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org