mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-18 17:15:13 +01:00
verify meta tags, remove console logs
This commit is contained in:
parent
81ebb3fbed
commit
a543390823
@ -25,7 +25,7 @@
|
||||
{
|
||||
"src": "/static/assets/images/crafty-logo-square-1024.png",
|
||||
"type": "image/png",
|
||||
"sizes": "1024/1024",
|
||||
"sizes": "1024x1024",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
|
@ -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 {
|
||||
|
@ -24,7 +24,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<!-- <meta name="apple-mobile-web-app-title" content="Crafty Controller 4"> -->
|
||||
<meta name="apple-mobile-web-app-title" content="Crafty">
|
||||
<link rel="apple-touch-icon" href="../static/assets/images/Crafty_4-0.png">
|
||||
<link rel="shortcut icon" sizes="192x192" href="../static/assets/images/Crafty_4-0.png">
|
||||
|
||||
@ -542,8 +542,6 @@
|
||||
.then(function (registration) {
|
||||
console.log('Service Worker Registered');
|
||||
});
|
||||
} else {
|
||||
console.log("service worker not registered");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<!-- <meta name="apple-mobile-web-app-title" content="Crafty Controller 4"> -->
|
||||
<meta name="apple-mobile-web-app-title" content="Crafty">
|
||||
<link rel="apple-touch-icon" href="../static/assets/images/Crafty_4-0.png">
|
||||
<!-- endinject -->
|
||||
<!-- Plugin css for this page -->
|
||||
|
@ -12,6 +12,15 @@
|
||||
<link rel="stylesheet" href="/static/assets/vendors/ti-icons/css/themify-icons.css">
|
||||
<link rel="stylesheet" href="/static/assets/vendors/typicons/typicons.css">
|
||||
<link rel="stylesheet" href="/static/assets/vendors/css/vendor.bundle.base.css">
|
||||
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="Crafty">
|
||||
<link rel="apple-touch-icon" href="../static/assets/images/Crafty_4-0.png">
|
||||
|
||||
|
||||
<!-- endinject -->
|
||||
<!-- Plugin css for this page -->
|
||||
<!-- End Plugin css for this page -->
|
||||
@ -77,6 +86,21 @@
|
||||
<script src="/static/assets/js/shared/settings.js"></script>
|
||||
<script src="/static/assets/js/shared/todolist.js"></script>
|
||||
<!-- endinject -->
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let login_opacity_div = document.getElementById('login_opacity');
|
||||
let opacity = login_opacity_div.getAttribute('data-value');
|
||||
document.getElementById('login-form-background').style.background = 'rgb(34, 36, 55, ' + (opacity / 100) + ')';
|
||||
//Register Service worker for mobile app
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/static/assets/js/shared/service-worker.js', {scope: '/'})
|
||||
.then(function (registration) {
|
||||
console.error('Service Worker Registered');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -17,7 +17,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<!-- <meta name="apple-mobile-web-app-title" content="Crafty Controller 4"> -->
|
||||
<meta name="apple-mobile-web-app-title" content="Crafty">
|
||||
<link rel="apple-touch-icon" href="../static/assets/images/Crafty_4-0.png">
|
||||
|
||||
<!-- endinject -->
|
||||
|
@ -17,7 +17,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<!-- <meta name="apple-mobile-web-app-title" content="Crafty Controller 4"> -->
|
||||
<meta name="apple-mobile-web-app-title" content="Crafty">
|
||||
<link rel="apple-touch-icon" href="../static/assets/images/Crafty_4-0.png">
|
||||
|
||||
<!-- endinject -->
|
||||
|
@ -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);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<!-- <meta name="apple-mobile-web-app-title" content="Crafty Controller 4"> -->
|
||||
<meta name="apple-mobile-web-app-title" content="Crafty">
|
||||
<link rel="apple-touch-icon" href="../static/assets/images/Crafty_4-0.png">
|
||||
|
||||
<!-- endinject -->
|
||||
|
@ -19,7 +19,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<!-- <meta name="apple-mobile-web-app-title" content="Crafty Controller 4"> -->
|
||||
<meta name="apple-mobile-web-app-title" content="Crafty">
|
||||
<link rel="apple-touch-icon" href="../static/assets/images/Crafty_4-0.png">
|
||||
<!-- endinject -->
|
||||
<!-- Plugin css for this page -->
|
||||
@ -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 @@
|
||||
</script>
|
||||
{% block js %}
|
||||
<!-- Custom js for this page -->
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let login_opacity_div = document.getElementById('login_opacity');
|
||||
let opacity = login_opacity_div.getAttribute('data-value');
|
||||
document.getElementById('login-form-background').style.background = 'rgb(34, 36, 55, ' + (opacity / 100) + ')';
|
||||
//Register Service worker for mobile app
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/static/assets/js/shared/service-worker.js', {scope: '/'})
|
||||
.then(function (registration) {
|
||||
console.error('Service Worker Registered');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<!-- End custom js for this page -->
|
||||
{% end %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user