Skip to content

feat: add pwa to simulate SO updates#8

Merged
PuruVJ merged 7 commits intoPuruVJ:mainfrom
userquin:feat/add-pwa-for-macos-updates
Oct 3, 2021
Merged

feat: add pwa to simulate SO updates#8
PuruVJ merged 7 commits intoPuruVJ:mainfrom
userquin:feat/add-pwa-for-macos-updates

Conversation

@userquin
Copy link
Contributor

@userquin userquin commented Oct 2, 2021

  1. pnpm install
  2. pnpm run test-https : will ask to install the ssl certificate for localhost, install it
  3. open browser on private window (chrome or edge): https://localhost
    4 ) stop 2 and rerun it again: go to the browser and press F5, you will see the prompt, click reload

closes #7

@vercel
Copy link

vercel bot commented Oct 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/puruvj/macos-web/gPLMhH1KGgFArS4qghvekMszXJ2N
✅ Preview: https://macos-web-git-fork-userquin-feat-add-pwa-for-maco-2773d5-puruvj.vercel.app

@userquin
Copy link
Contributor Author

userquin commented Oct 2, 2021

You can also test it without https using pnpm run build && pnpm run serve, but you need to touch some assets/module/component if you want to test the install simulation, since the sw will not change

@userquin
Copy link
Contributor Author

userquin commented Oct 3, 2021

Last commit contains:

  • muted the initial sound (autoplay to off) when there is an update fired by the restart button on system update.
  • badge on app store; if you click later on system update it will keep the badge, see comments on Dock.svelte on needsUpdate prop.

The logic for badge is on Dock.svelte, the onMount on BootupScreen.svelte just retrieve the value stored on localStorage on handleUpdateApp call on Dock.svetle, removing it from localStorage and he initial sound only if not updated from pwa reload.

@userquin
Copy link
Contributor Author

userquin commented Oct 3, 2021

So, finally we have the macos Web Svelte running as a PWA:

  • the pwa will speed up the app
  • the pwa will version the app and use it to simulate the system update via prompt for update strategy using the vite-plugin-pwa
  • the AppStore dock button will show a badge with 1 similar to native macosx
  • the previous badge will be kept on AppStore dock button until you click the Restart

@userquin
Copy link
Contributor Author

userquin commented Oct 3, 2021

We need to review the logic for autoplay initial audio, the problem is the value is changed after page load and so the audio will not autoplay anymore: I have revert changes to store to loclaStorage and its handling on onMount lifecycle.

@userquin
Copy link
Contributor Author

userquin commented Oct 3, 2021

We need to animate the app store on dock, just bouncing up and down animation...

@userquin userquin marked this pull request as ready for review October 3, 2021 11:03
@PuruVJ PuruVJ merged commit a253587 into PuruVJ:main Oct 3, 2021
@userquin userquin deleted the feat/add-pwa-for-macos-updates branch October 3, 2021 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simulate updates via PWA

2 participants