moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

Timeout countdown should be shown in minutes and seconds. #75

Closed arpit03187 closed 6 years ago

arpit03187 commented 6 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ X ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/HackedByChinese/ng2-idle/blob/master/CONTRIBUTING.md#getting-help

Current behavior The timeout warning configuration currently only supports seconds as a unit.

Expected behavior The timeout warning configuration should allow minutes and seconds to show up in the warning.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

If the timeout configuration is done for let's say 2 minutes the countdown should start initially as 1 minute 59 seconds and keep going down instead of showing 120 seconds.

Please tell us about your environment:

Windows 7

moribvndvs commented 6 years ago

I intentionally avoided making decisions on how the time is formatted, since that has localization implications. You'll need to do the formatting of the remaining seconds yourself in your event handler.