This pull request addresses some small problems with web builds.
Previously, the web build would not update itself when a new version was available, always using the version that was cached in the user's browser instead. Now, the Trunk hooks will create a file named buildinfo.json with information about the current build (the git revision and the build profile), and sw.js will fetch this file from the server every time the user opens the web build and will clear the cache if the fetch succeeded and the fetched build info is different from the cached build info. This allows people to always have an up-to-date version of Luminol when connected to the Internet and to use the cached version when not connected to the Internet. Alternatively, you can put "#dev" at the end of the URL to always bypass the cache.
There was a problem where some input method editors would sometimes display the composition window in the wrong position in Firefox only. This should be fixed now.
egui's storage (for saving settings, the list of recent projects, the positions of windows and scroll bars, etc.) is now backed by IndexedDB instead of local storage. Local storage has a 5 mebibyte limit on the amount of data stored and is inaccessible from web workers.
In bindings.js there was a custom binding for WorkerGlobalScope.performance because web-sys had no binding for this at the time. They've since added one so I've removed the custom binding from bindings.js and replaced it with web-sys's version.
I updated the versions of Trunk and the checkout and upload-artifact actions in the workflows to match the ones from luminol-website.
Description
This pull request addresses some small problems with web builds.
WorkerGlobalScope.performance
because web-sys had no binding for this at the time. They've since added one so I've removed the custom binding from bindings.js and replaced it with web-sys's version.Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
cargo build --release
trunk build --release