Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework Timeago component #5291

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

sinamics
Copy link
Contributor

Continuation of #5278
Changed to typescript, it gives much better developer experience. Hope this is ok with the code rules.

  • Added better props check and removed try catch block.
  • Future time will return "just now"
  • Added setInterval to update the time ago component.
  • Changed the "just now" to only be visible to time bellow 10sec.
  • Added new props:
    • currentTime ( OPTIONAL: user can modify the current time)
    • refreshInterval ( OPTIONAL: custom refresh interval in milliseconds, default 1000 (1 sec) )
  • Needs more testing. I do not have a camera were am at, so difficult to test new events. will do it later.

@netlify
Copy link

netlify bot commented Jan 29, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 9dadda1
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/63d6dd8f90fb8b0008accd22

@sinamics
Copy link
Contributor Author

@leccelecce FYI

@leccelecce
Copy link
Contributor

Looks good to me! Not spotting any future errors, plus it now "live counts"

image

@blakeblackshear blakeblackshear merged commit a5078b8 into blakeblackshear:dev Jan 29, 2023
@sinamics sinamics deleted the rework-timeago branch January 30, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants