From a54339082366cd2ed8c67e2056a4550530b4d0a8 Mon Sep 17 00:00:00 2001 From: bobsfriend12 Date: Thu, 9 Mar 2023 01:50:32 +0000 Subject: [PATCH] verify meta tags, remove console logs --- app/frontend/static/assets/crafty.webmanifest | 2 +- .../static/assets/js/shared/service-worker.js | 3 +-- app/frontend/templates/base.html | 4 +--- app/frontend/templates/blank_base.html | 2 +- app/frontend/templates/panel/denied.html | 24 +++++++++++++++++++ app/frontend/templates/public/404.html | 2 +- app/frontend/templates/public/error.html | 2 +- app/frontend/templates/public/login.html | 5 ---- app/frontend/templates/public/offline.html | 2 +- app/frontend/templates/public_base.html | 19 +++++++++++++-- 10 files changed, 48 insertions(+), 17 deletions(-) diff --git a/app/frontend/static/assets/crafty.webmanifest b/app/frontend/static/assets/crafty.webmanifest index f1b7e7ac..6c9460e3 100644 --- a/app/frontend/static/assets/crafty.webmanifest +++ b/app/frontend/static/assets/crafty.webmanifest @@ -25,7 +25,7 @@ { "src": "/static/assets/images/crafty-logo-square-1024.png", "type": "image/png", - "sizes": "1024/1024", + "sizes": "1024x1024", "purpose": "any" }, { diff --git a/app/frontend/static/assets/js/shared/service-worker.js b/app/frontend/static/assets/js/shared/service-worker.js index 994ba89f..f8073c39 100644 --- a/app/frontend/static/assets/js/shared/service-worker.js +++ b/app/frontend/static/assets/js/shared/service-worker.js @@ -2,7 +2,7 @@ importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'); -const CACHE = "pwabuilder-page"; +const CACHE = "crafty-controller"; // TODO: replace the following with the correct offline fallback page i.e.: const offlineFallbackPage = "offline.html"; const offlineFallbackPage = "/offline"; @@ -25,7 +25,6 @@ if (workbox.navigationPreload.isSupported()) { } self.addEventListener('fetch', (event) => { - console.log("service worker -- fetch"); if (event.request.mode === 'navigate') { event.respondWith((async () => { try { diff --git a/app/frontend/templates/base.html b/app/frontend/templates/base.html index a627243a..a7bbf16a 100755 --- a/app/frontend/templates/base.html +++ b/app/frontend/templates/base.html @@ -24,7 +24,7 @@ - + @@ -542,8 +542,6 @@ .then(function (registration) { console.log('Service Worker Registered'); }); - } else { - console.log("service worker not registered"); } }); diff --git a/app/frontend/templates/blank_base.html b/app/frontend/templates/blank_base.html index 0977cb54..5171ec27 100644 --- a/app/frontend/templates/blank_base.html +++ b/app/frontend/templates/blank_base.html @@ -19,7 +19,7 @@ - + diff --git a/app/frontend/templates/panel/denied.html b/app/frontend/templates/panel/denied.html index dc4f59c1..d4548c05 100644 --- a/app/frontend/templates/panel/denied.html +++ b/app/frontend/templates/panel/denied.html @@ -12,6 +12,15 @@ + + + + + + + + + @@ -77,6 +86,21 @@ + \ No newline at end of file diff --git a/app/frontend/templates/public/404.html b/app/frontend/templates/public/404.html index 2567e3c5..62a78a81 100644 --- a/app/frontend/templates/public/404.html +++ b/app/frontend/templates/public/404.html @@ -17,7 +17,7 @@ - + diff --git a/app/frontend/templates/public/error.html b/app/frontend/templates/public/error.html index aab6fd38..f51d1dc9 100644 --- a/app/frontend/templates/public/error.html +++ b/app/frontend/templates/public/error.html @@ -17,7 +17,7 @@ - + diff --git a/app/frontend/templates/public/login.html b/app/frontend/templates/public/login.html index 7c8f447e..971edca1 100644 --- a/app/frontend/templates/public/login.html +++ b/app/frontend/templates/public/login.html @@ -153,14 +153,9 @@ .then(function (registration) { console.error('Service Worker Registered'); }); - } else { - console.error("service worker not registered"); } }); - console.error('service worker' in navigator); - console.error(navigator.serviceWorker); - diff --git a/app/frontend/templates/public/offline.html b/app/frontend/templates/public/offline.html index cbc9154c..a90e65a5 100644 --- a/app/frontend/templates/public/offline.html +++ b/app/frontend/templates/public/offline.html @@ -17,7 +17,7 @@ - + diff --git a/app/frontend/templates/public_base.html b/app/frontend/templates/public_base.html index 0b013ab3..1629642c 100644 --- a/app/frontend/templates/public_base.html +++ b/app/frontend/templates/public_base.html @@ -19,7 +19,7 @@ - + @@ -105,7 +105,7 @@ usingWebSockets = false; } // {% else %} - let usingWebSockets = false; + usingWebSockets = false; warn('WebSockets are not supported in Crafty if not using the https protocol') var webSocket; // {% end%} @@ -113,6 +113,21 @@ {% block js %} + {% end %}