Skip to content

WIP: Add manifest support

Hikaru Aikawa requested to merge hikaruaikawa/pleroma-fe:manifest into develop

(Continues !447 (closed))

A couple things to note:

  • Seems like there's no need for a plugin to generate the manifest, I just added it manually into the static files. I could not figure out how to create it dynamically with the name of the instance, but I think that doesn't go in this project, since the instance isn't actually created on pleroma-fe. As it is now, each instance owner will have to edit it manually.
  • The service worker was indeed being registered, but the browser didn't pick it up, so I exposed one of the functions from the push service and called it at the start of the app. I thought it was clearer than calling one of the already exported functions.
  • After messing around with the service worker for a bit, it seems like the only thing it needs is to have a listener for the "fetch" event. I left the default implementation in, which doesn't cache anything, since I didn't think it was my place to decide what to cache.

Currently it works on my own phone, but I can't really test it anywhere else. Anything else that needs to be done?

Edited by lain

Merge request reports