From e6056677192bdc6c33793e20d9b653195972694d Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 13 May 2022 00:53:48 -0700 Subject: web: add better icons for PWA --- web/static/sw.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'web/static/sw.js') diff --git a/web/static/sw.js b/web/static/sw.js index 3a92eb3..7ed7a85 100644 --- a/web/static/sw.js +++ b/web/static/sw.js @@ -1,23 +1,15 @@ const CACHE_PREFIX = 'dartboat-' -const CACHE_VERSION = '1'; +const CACHE_VERSION = '2'; const CACHE_NAME = `${CACHE_PREFIX}${CACHE_VERSION}`; const FILES = [ './', + 'style.css', 'dartboat.js', 'dartboat_wasm.js', 'dartboat_wasm.wasm', - 'style.css', - 'icons.woff2', - 'inter-num.woff2', - 'dartboat_16.png', - 'dartboat_32.png', - 'dartboat_64.png', - 'dartboat_96.png', - 'dartboat_128.png', - 'dartboat_192.png', - 'dartboat_256.png', - 'dartboat_512.png' + 'fonts/bootstrap-icons-sub.woff2', + 'fonts/inter-num.woff2' ] function swlog(str) { @@ -57,7 +49,8 @@ self.addEventListener('fetch', e => { if (cached) return cached; - if (!(resp = await fetch(e.request)).ok) { + const resp = await fetch(e.request); + if (!resp.ok) { swlog(`ignore status:${resp.status} ${e.request.url}`); } else { swlog(`put ${e.request.url}`); -- cgit v1.2.3-70-g09d2