-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Create Progressive Web App #4730
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4730 +/- ##
==========================================
- Coverage 37.46% 37.46% -0.01%
==========================================
Files 312 312
Lines 46507 46522 +15
==========================================
+ Hits 17423 17428 +5
- Misses 26595 26601 +6
- Partials 2489 2493 +4
Continue to review full report at Codecov.
|
Can this be somehow changed not to have duplicate js files? Also if gitea is deployed with suburl this will not work |
Cuplicate js files? Where? What do you mean with suburl? Subdomain should work. But a sub path might cause problems... |
You coud add
Just an idea, idk if that would work :) |
I don't think that this would work because service worker doesn't have access to the document. |
The solution might be to generate the service worker file dynamically like html templates. Also the mainfest has a namespace which should be generated dynamically. |
@SohnyBohny An example of how to use a template to achieve what you are looking for is #3572 |
Okay thank you - I will check this out when I have time (in ≈2 weeks) |
@SohnyBohny |
CI failed |
What does this error mean? |
your golang code is not the same as the format program did. |
Finally CI build has passed :-) |
@SohnyBohny one minor nit, but everything else looks great. Could TODO items be for another PR, or are they needed right away? |
The 192x192 and 512x512 icons are needed that chrome automatically shows an install banner on Android. Without them the User will not find out this feature. |
|
@lunny any error message? I think 512px sized icon is needed... |
|
Another two TODOs? |
@lunny I think last TODO can wait for another PR. |
Great @techknowlogick thank you Of course the last TODO can wait (if it is neccessary at all). I was just not sure how you like the head of the html to be ordered. For me it's done now. Of course the list should be up to date at any time. Somewere in the docs or in the release notes there should be a note that the service worker has to be served over https (or localhost) |
I think this list is already outdated :) We should really think of some kind of automated sync for it |
Which list? |
I think at least recently merged vue-calendar-heatmap, moment |
Workbox is exactly our usecase. I'll look into that as soon as possible and will create a new PR then. |
Is this the right place to keep discussing about this topic or should I open an issue for that? Anyway: Most cacheable files are located under More specific I need following questions answered:
|
Create a PWA by adding a app manifest and a service worker
This will allow users (especially on Android) to add the gitea website to the home-screen and use it like a native app.
Being served over https a service worker will cache all static content which will cause faster page loading and a better user experience.
TODOs: