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

Event on-active

Open Kuro-dev opened this issue 2 years ago • 1 comments

I want to automatically log a user out if they are idle for too long. for that i want to show a small popup that lets them know in advance. Now i would also like to automatically dismiss this notification in the case that the user does something again.

Kuro-dev avatar Jan 19 '22 13:01 Kuro-dev

This is what for you've got @remind and :reminders. You can use it to show the modal. Currently in the plugin there is event sent on active, but you can easily implement this with window.addEventListener. Just remember to clear it in beforeDestroy with `window.removeEventListener.

malekim avatar Jan 20 '22 07:01 malekim

@Kuro-dev You can now do this using refresh callback

<v-idle @refresh="onrefresh" />

function onrefresh() { console.log("user did something") }

deidyomega avatar Feb 14 '24 10:02 deidyomega