bearnithi / bn-ng-idle

Angular user idle detector service
28 stars 11 forks source link

Add the ability to notify idle #46

Open Vyeche opened 2 years ago

Vyeche commented 2 years ago

Hi,

I hope all is well.

I noticed I could not know if idle has triggered when I wanted to interact with the UI. In my case, I need to close a popup window before the timeout expires.

Thanks & Kind regard, Vye

bearnithi commented 2 years ago

Hi @Vyeche ,

Could you please explain in detail on what you want to accomplish?

Vyeche commented 2 years ago

Hi @bearnithi In detail? Check out the plugin https://moribvndvs.github.io/ng2-idle/

The idea:

Hi @Vyeche ,

Could you please explain in detail on what you want to accomplish?

martinphalane commented 1 year ago

HI @Vyeche i am looking for a similar solution , did you manage to come right ?

Vyeche commented 1 year ago

I had to write my own solution. I think I need to recode it cos it's not working the way I need.

bearnithi commented 1 year ago

I added a timeoutInSeconds parameter as optional for the resetTimer method. In your scenario, the timer A will run for 1 min and then after 1 min you can show a popup in that case using resetTimer you can set the time to 30 sec for second timer. If the user is still idle for the 30 sec, you can auto logout. If they click on stay on the page, use resetTimer again with 1 min.