Add versioning
We need some kind of versioning to verify that a user has the current state of the frontend app.
Suggestion: Use the commit hash and write it during the build of the frontend to the corresponding environment.ts
file and to a file in the assets (version.json
?). The frontend will then send a request on load to determine the current version and check if it's internal version is diverging. If the hashes do not match the frontend must respond with a warning dialog, that the user may experience issues, bugs and incompabilities with the current backend version until he updates the app (either by clicking on the update notification or via wiping the cache and doing a hard reload). The user needs some info how to do this with his browser.
Note: Make sure that the version.json file does not get cached by the service worker.