idle-vue icon indicating copy to clipboard operation
idle-vue copied to clipboard

Multiple Idles

Open chanr32 opened this issue 7 years ago • 6 comments

Is it possible to have multiple callbacks with different timings?

chanr32 avatar Mar 26 '18 17:03 chanr32

Hello @chanr32. Do you mean something like multiple instance of vue-idle ? for getting event related to idle in 1minutes / 2 minutes / etc ?

gabrielstuff avatar Mar 28 '18 23:03 gabrielstuff

@gabrielstuff Yes. I also need this and exactly what you said.

piyushbeli avatar Nov 17 '18 14:11 piyushbeli

Hello, If anyone want / need this, I'll be glad to help. The idea I guess would be to define one idle which listen to mouse event and one other idle which depends on touch event ?

If anyone can provide, real life example. I'll be grateful.

Thanks

gabrielstuff avatar Feb 06 '19 11:02 gabrielstuff

@gabrielstuff , There could be plenty of real-life examples. Let say we want to log out the user after 10 mins of inactivity (which is a very common use case). Now in the same application let say we want to show a help popup after a user is idle on a page for 2 mins.

piyushbeli avatar Feb 06 '19 15:02 piyushbeli

Hello,

I'm not sure how, we can make this clear with vue. I'm thinking about binding idle-vue to a component instead of the app then.

In the mean time, you should be able to do this with the vanilla version idle-js and the recently release 1.1.2 version

Cheers,

g On 6 Feb 2019 at 16:48 +0100, Piyush Beli [email protected], wrote:

@gabrielstuff , There could be plenty of real-life examples. Let say we want to log out the user after 10 mins of inactivity (which is a very common use case). Now in the same application let say we want to show a help popup after a user is idle on a page for 2 mins. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

gabrielstuff avatar Feb 07 '19 22:02 gabrielstuff

Hi, I am also wondering if it's possible to have multiple idle time listeners or a way to bind idle-vue to a component instead of the main app? or perhaps both?

bi6o avatar Sep 02 '20 13:09 bi6o