Skip to content

Commit

Permalink
pourquoi ca marche pas déployé ?
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLatapie committed Apr 6, 2024
1 parent 13a4b7c commit 64c0746
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions PWA/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ <h1>Bienvenue dans l'installeur de FlorianLatapie/Config</h1>
<path d="M18.5855 11.4102H20.5C21.6046 11.4102 22.5 12.3056 22.5 13.4102V22.4102C22.5 23.5147 21.6046 24.4102 20.5 24.4102H10.5C9.39543 24.4102 8.5 23.5147 8.5 22.4102V13.4102C8.5 12.3056 9.39543 11.4102 10.5 11.4102H12.2303" stroke="#0381FE" stroke-linecap="round"></path>
<path d="M12.6768 8.41341L15.2507 5.83944C15.3886 5.70161 15.612 5.70161 15.7499 5.83944L18.3238 8.41341M15.5003 16.8251V5.58984" stroke="#0381FE" stroke-linecap="round"></path>
</svg>
licône ci-dessous,
l'icône ci-dessous,
</div>
puis sur &laquo; Ajouter à lécran daccueil &raquo;.
puis sur &laquo; Ajouter à l'écran d'accueil &raquo;.
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions PWA/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ var isIOS = /Mac|iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream
if (isIOS) {
installBtn.style.display = "none";
iosText.style.display = "block";
alert("ios");
} else {
installBtn.style.display = "block";
iosText.style.display = "none";
alert("not ios");
}

let deferredPrompt;
Expand Down
18 changes: 12 additions & 6 deletions PWA/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ self.addEventListener('install', (e) => {
);
});

self.addEventListener('fetch', (e) => {
console.log(e.request.url);
e.respondWith(
caches.match(e.request).then((response) => response || fetch(e.request)),
);
});
self.addEventListener('fetch', (e) => {
e.respondWith(
caches.match(e.request).then((response) => {
if (response) {
console.log(e.request.url);
return response;
} else {
return fetch(e.request);
}
}),
);
});

0 comments on commit 64c0746

Please sign in to comment.