update new version experience

This changes the new version message to be more user-friendly and allows
using the new version without restarting the browser or clearing the
cache.
This commit is contained in:
David Lechner
2021-01-18 18:51:38 -06:00
parent c8d499e979
commit 5a66f041f2
6 changed files with 63 additions and 5 deletions
+4 -1
View File
@@ -13,6 +13,9 @@
"error": "{errorMessage}"
},
"serviceWorker": {
"update": "New content is available and will be used when all tabs for this page are closed.'"
"update": {
"message": "A new version of {appName} is available. Click {action} to start using the new version.",
"action": "Restart"
}
}
}
+2 -1
View File
@@ -9,7 +9,8 @@ export enum MessageId {
BleGattServiceNotFound = 'ble.gattServiceNotFound',
BleNoWebBluetooth = 'ble.noWebBluetooth',
ProgramChanged = 'editor.programChanged',
ServiceWorkerUpdate = 'serviceWorker.update',
ServiceWorkerUpdateMessage = 'serviceWorker.update.message',
ServiceWorkerUpdateAction = 'serviceWorker.update.action',
YesReloadProgram = 'editor.yesReloadProgram',
MpyError = 'mpy.error',
}