nwplus / nwhacks2018_static

This is the website, registration and check-in system for nwHacks 2018
https://2018.nwhacks.io/
Other
7 stars 1 forks source link

admin/select: indicator showing who is viewing which hacker #49

Closed d4l3k closed 6 years ago

d4l3k commented 6 years ago

It'd be nice to have a small indicator which shows who is viewing each page. This could either be visible once you open a page, or in the general listing. The UI would probably be small colored circles that show the name/email address when hovering over.

You'd have to add an object under each form submission with an email address and a timestamp. When you switch to a different hacker, you'd have to remove the field. Just in case that doesn't fire we should hide timestamps older than 1-5 minutes and remove it from the DB.

This could probably be implemented as a new nw-viewing element that takes viewers, viewing, email, name properties which updates the viewers object if viewing is true.

<nw-viewing
  viewers="{{hacker.viewers}}"
  viewing
  email="[[auth.email]]"
  name="[[auth.name]]">
</nw-viewing>