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

feat: add PWA support #919

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

feat: add PWA support #919

wants to merge 1 commit into from

Conversation

ragekit
Copy link

@ragekit ragekit commented May 22, 2024

Closes #325

@ragekit ragekit mentioned this pull request May 22, 2024
@ragekit ragekit changed the title Worker toward PWA share point Work toward PWA share point May 22, 2024
@fmartingr
Copy link
Member

Hey, figured out what's happening.

You need to edit internal/view/embed.go and add the file to the go:embed comment, file should look like this:

package views

import "embed"

//go:embed assets/js/* assets/css/* assets/res/* assets/manifest.webmanifest
var Assets embed.FS

//go:embed *.html
var Templates embed.FS

@fmartingr fmartingr changed the title Work toward PWA share point feat: add PWA support May 23, 2024
@fmartingr fmartingr modified the milestone: 1.8.0 May 23, 2024
@ragekit
Copy link
Author

ragekit commented May 25, 2024

allright ! got a basic pwa installed on my phone that doesn't really do anything special right now !
I'm focusing on the share-target, I think it's the most important part for shiori (more than offline access for now)
What's the endpoint to send a url to ? Is it going through the apiv1 ?
EDIT: ill check what the chrome extension is doing

@fmartingr
Copy link
Member

allright ! got a basic pwa installed on my phone that doesn't really do anything special right now ! I'm focusing on the share-target, I think it's the most important part for shiori (more than offline access for now) What's the endpoint to send a url to ? Is it going through the apiv1 ? EDIT: ill check what the chrome extension is doing

That particular API has not been migrated yet. What are the requirements of the share-target for a PWA? I'm not familiar with that.

@ragekit
Copy link
Author

ragekit commented May 27, 2024

Its just doing a html request to an url. I can actually get it in the service worker and do something there, I'll do a fetch with the correct data to the same endpoint used in the api and the frontend

@ragekit
Copy link
Author

ragekit commented Jun 3, 2024

It's not forgottend I just didn't have time to work on this !

@fmartingr
Copy link
Member

It's not forgottend I just didn't have time to work on this !

No-one is rushing you, you can take all the time you need :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants