tuwien2020 / tgi-pages

Open tools for the TGI course at the TU Vienna
https://tuwien2020.github.io/tgi-pages/#/
The Unlicense
12 stars 5 forks source link

Offline Variant #84

Closed stefnotch closed 2 years ago

stefnotch commented 2 years ago

Either with an approach like #82 or with service workers/PWAs

stefnotch commented 2 years ago

I just tried out https://github.com/antfu/vite-plugin-pwa . It would probably be pretty easy to get it to work, but with ~200 extra dependencies, I'm not sure if we want to use it.

stefnotch commented 2 years ago

Okay, using Workbox is also a bit irritating, because it ships as a ES module, but Firefox doesn't support modules in workers. While the linked issue talks about web workers, the same stuff applies to service workers.

stefnotch commented 2 years ago

Not sure how much work implementing it ourselves would be. If we do, we could probably take quite a lot of code from vite-plugin-pwa (appropriately licensed, of course)

Fancy11111 commented 2 years ago

I have a PWA Prototype up and running, look at this branch

Here is my gh-pages deployment https://fancy11111.github.io/tgi-pages/#/

stefnotch commented 2 years ago

Works quite nicely. Though, KaTeX and Monaco aren't cooperating as well as they should.

image

stefnotch commented 2 years ago

Alrighty, fixed it!

Fancy11111 commented 2 years ago

To also document this here, the PWA had the nice side effect that we have a "desktop" variant as well. image image image

Which makes the PWA feature close this, and #82

Fancy11111 commented 2 years ago

I'll close this for now