allow updating frontend version without downloading new version of the

app
This commit is contained in:
forest 2021-07-16 14:19:10 -05:00
parent 4bd9e4896d
commit 44a1154909
3 changed files with 6 additions and 2 deletions

View file

@ -47,9 +47,7 @@ collage.cyberia.club {
- "This invite code is invalid"
- need rotate button
- fix text posts
- deployment: check
- images only load once they are on-screen
- save user's view position in localStorage or something
- rotate posts (capsule colliders)

1
VERSION Normal file
View file

@ -0,0 +1 @@
0.1.20

View file

@ -262,6 +262,11 @@ func setupRoutes(mux *http.ServeMux) {
setCookie(response, "graffiti_invite_code", inviteCode, 60*60*24)
}
versionBytes, err := ioutil.ReadFile("VERSION")
if err == nil {
appVersion = string(versionBytes)
}
stateJSONBytes, err := json.MarshalIndent(
FrontendState{
Version: appVersion,