diff --git a/src-pwa/custom-service-worker.js b/src-pwa/custom-service-worker.js index eea2df5..6fa3f71 100644 --- a/src-pwa/custom-service-worker.js +++ b/src-pwa/custom-service-worker.js @@ -16,7 +16,7 @@ importScripts('../statics/js/workbox-sw.js'); let port = 3000; -if (self.location.hostname === 'test.freeplanet.app') { +if (self.location.hostname.startsWith('test')) { port = 3001; } // console.log('SW-06 1'); @@ -68,7 +68,7 @@ if (workbox) { const debug = false; workbox.setConfig({ debug: debug }); - workbox.core.setCacheNameDetails({ prefix: "freeplanet" }); + workbox.core.setCacheNameDetails({ prefix: self.location.hostname }); /** * The workboxSW.precacheAndRoute() method efficiently caches and responds to @@ -281,7 +281,7 @@ if (workbox) { // Storage workbox.routing.registerRoute( - new RegExp(/.*(?:storage\.freeplanet)\.app.*$/), + new RegExp(/.*(?:storage.*$/), workbox.strategies.staleWhileRevalidate({ cacheName: 'storage', plugins: [ diff --git a/src/components/logo/logo.ts b/src/components/logo/logo.ts index 3ffed69..d76e49d 100644 --- a/src/components/logo/logo.ts +++ b/src/components/logo/logo.ts @@ -9,4 +9,8 @@ export default class Logo extends Vue { get logoimg() { return '../../' + tools.getimglogo() } + + get logoalt() { + return process.env.APP_NAME + } } diff --git a/src/components/logo/logo.vue b/src/components/logo/logo.vue index 65c27c7..aaa2400 100644 --- a/src/components/logo/logo.vue +++ b/src/components/logo/logo.vue @@ -1,6 +1,6 @@