This commit introduces web push notifications to the application.
Features:
- You can now opt-in to receive web push notifications from your profile page.
- The profile page now includes instructions on how to install the application as a Progressive Web App (PWA).
- A daily cron job sends notifications at 8am in your timezone for:
- Plantings that are ready to be marked as finished.
- Activities that are due on the current day.
Implementation details:
- Adds `web-push` and `serviceworker-rails` gems.
- Adds a `timezone` column to the `members` table.
- Adds a `PushSubscription` model to store user subscriptions.
- Adds a service worker to handle push events.
- Adds a `PushSubscriptionsController` to manage subscriptions.
- Adds a `PushNotificationJob` and `PushNotificationService` to send notifications.
NOTE: I was unable to run any tests due to technical difficulties. The code is therefore untested and may contain errors.
* Ability to like activities
* Ability to like activities
* Add likeable everywhere
* Refactor
* Remove extra newline
* Typo
* Use classes, not IDs
* Explicitly wait for ajax
* Fix tests
* Move likes under owner
* Add separation
* Move harvest likes near actions
* Rearrange harvests
* Render likes under owner
* Make harvest consistent with other views
* Move planting detail into header
* Move detail into header
* Move detail into header
* Revert
* Fix header
* Move likes into jumotrons
* Fix name
* Change all actions to be after likes and a span
* Cleanup
* Cleanup
* Cleanup
* Cleanup
* i18n and accessibility
* Fix name
* Temporarily make ack into a div
* Update app/views/photos/_actions.html.haml
* Upgrade boostrap
* Remove deprecated bootstrap toggles
* Migrate other details
* Avoid accidentally including bootstrap twice
* Avoid accidentally including bootstrap twice
* Avoid accidentally including bootstrap twice
* Fix spec
* Fix spec, where the size of the screen has gone to a partial breakpoint/you can't click on your own name in tablet view
* Fix spec
* Cleanup
* Cleanup
* For now, drop mapbox for OSM tiles
* For now, drop mapbox for OSM tiles
* Use OSM tiles
* Remove mapbox secrets for now. If we bring back mapbox; we should re-enstate
* Only show up to 200 plantings
* Update app/assets/javascripts/members.js.erb
* [CodeFactor] Apply fixes
* Update production.rb
---------
Co-authored-by: codefactor-io <support@codefactor.io>
* For now, drop mapbox for OSM tiles
* For now, drop mapbox for OSM tiles
* Use OSM tiles
* Remove mapbox secrets for now. If we bring back mapbox; we should re-enstate
* Update members.js.erb
* Change placeholder