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:
   
![image](https://user-images.githubusercontent.com/4902714/101733314-9f5ef400-3af9-11eb-9a48-b854e8789610.png)
   
   The example effect is as follow:
   ![image](http://recordit.co/SDDH1gRQtr.gif)


----------------------------------------------------------------
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:
[email protected]


Reply via email to