From c1e418c23b6297fc39e6a321a529309b45dcd9f2 Mon Sep 17 00:00:00 2001 From: yaso Date: Wed, 18 Sep 2024 13:35:29 +0200 Subject: [PATCH] Srvice worker update --- .../lib/mih_packages/mih_home/home_tile_grid.dart | 2 +- Frontend/patient_manager/web/index.html | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Frontend/patient_manager/lib/mih_packages/mih_home/home_tile_grid.dart b/Frontend/patient_manager/lib/mih_packages/mih_home/home_tile_grid.dart index 2877dd11..733d826e 100644 --- a/Frontend/patient_manager/lib/mih_packages/mih_home/home_tile_grid.dart +++ b/Frontend/patient_manager/lib/mih_packages/mih_home/home_tile_grid.dart @@ -487,7 +487,7 @@ class _HomeTileGridState extends State { child: SizedBox( child: MIHSearchField( controller: searchController, - hintText: "Search Apps", + hintText: "Search Mzansi Apps", required: false, editable: true, onTap: () { diff --git a/Frontend/patient_manager/web/index.html b/Frontend/patient_manager/web/index.html index dfd74056..8869f5df 100644 --- a/Frontend/patient_manager/web/index.html +++ b/Frontend/patient_manager/web/index.html @@ -152,9 +152,12 @@ } }); } + console.log('Latest Service Worker Version: ' + serviceWorkerVersion); + console.log('Active Service Worker and Version: ' + reg.active.scriptURL); if (!reg.active && (reg.installing || reg.waiting)) { // No active web worker and we have installed or are installing // one for the first time. Simply wait for it to activate. + console.log('Installing service worker.'); waitForActivation(reg.installing || reg.waiting); } else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) { // When the app updates the serviceWorkerVersion changes, so we @@ -164,14 +167,14 @@ waitForActivation(reg.installing); } else { // Existing service worker is still good. - console.log('Loading app from service worker.'); + console.log('Service Worker up-to-date, Loading app.'); loadMainDartJs(); } }); }); if (navigator.serviceWorker.state == 'activated') { - console.log('Installed new service worker.'); + console.log('Latest Service Worker Installed.'); loadMainDartJs(); // if there's an existing controller (previous Service Worker), show the prompt // you can tweak this and delay the notification once the page is load you can show a notification and ask for a new refresh @@ -179,6 +182,7 @@ } else { // Service workers not supported. Just drop the