feat(pwa): PWA + service worker for offline-friendly demo#44
Open
playmaker410 wants to merge 1 commit into
Open
feat(pwa): PWA + service worker for offline-friendly demo#44playmaker410 wants to merge 1 commit into
playmaker410 wants to merge 1 commit into
Conversation
- Configure vite-plugin-pwa with generateSW strategy - Manifest: name, short_name, description, start_url, standalone display, 192x192 and 512x512 maskable icons, theme #0e0e0e - Workbox: precache app shell (HTML/CSS/JS/fonts), 20 MB cap - Runtime cache: Stellar RPC balance (network-first, 30 s TTL), announcements (network-first, 5 min TTL), EVM/Horizen RPC (network-first) - Google Fonts: cache-first, 1 year TTL - registerType: prompt — shows update toast before activating new SW - OfflineShell: friendly offline page with retry button - UpdateToast: 'A new version is ready. Click to reload.' - InstallPrompt: 'Install Wraith' button on beforeinstallprompt Closes wraith-protocol#19
|
@playmaker410 is attempting to deploy a commit to the truthixify's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@playmaker410 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
PWA components ( git fetch origin
git rebase origin/develop
git push --force-with-leaseDrop reverts to StellarSend/Receive during the rebase. Thanks @playmaker410. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #19 — PWA conversion using
vite-plugin-pwa.Changes
Manifest (
vite.config.ts)name,short_name,description,start_url: /,display: standaloneandroid-chrome-*.png)#0e0e0e(Wraith dark palette)Service worker (Workbox
generateSW)maximumFileSizeToCacheInBytes)registerType: 'prompt'— new SW waits for user confirmation before activatingComponents
OfflineShell— wraps the app; renders a friendly offline page whennavigator.onLineis false with a Retry buttonUpdateToast— "A new version is ready. Click to reload." toast, dismissibleInstallPrompt— "Install Wraith / Add to home screen" button, fires onbeforeinstallpromptTesting
tsc --noEmitpasses cleanvite buildsucceeds;dist/sw.js+dist/workbox-*.jsgeneratedCloses #19