This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
forked from microsoft/sample-app-aoai-chatGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yusuf Kaka
committed
Sep 15, 2023
1 parent
615306b
commit ea3f42c
Showing
13 changed files
with
149 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Remy AI Chef Assistant</title> | ||
</head> | ||
<body> | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src="logo512.png" className="App-logo" alt="logo" /> | ||
<p> | ||
Please go ONLINE | ||
</p> | ||
</header> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export {}; | ||
|
||
const CACHE_NAME = "my-cache"; | ||
|
||
//install service worker | ||
self.addEventListener("install", (event: any) => { | ||
event.waitUntil( | ||
caches.open(CACHE_NAME).then((cache) => | ||
cache.addAll(["/", "/index.html", "/styles.css", "/app.js"]) | ||
) | ||
); | ||
}); | ||
|
||
//activate service worker | ||
self.addEventListener("activate", (event: any) => { | ||
event.waitUntil( | ||
caches.keys().then((keyList) => | ||
Promise.all( | ||
keyList.map((key) => { | ||
if (key !== CACHE_NAME) { | ||
return caches.delete(key); | ||
} | ||
}) | ||
) | ||
) | ||
); | ||
}); | ||
|
||
//listen for requests | ||
self.addEventListener("fetch", (event: any) => { | ||
event.respondWith( | ||
caches.match(event.request).then((response) => { | ||
return response || fetch(event.request); | ||
}) | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export function register() { | ||
if ("serviceWorker" in navigator) { | ||
window.addEventListener("load", () => { | ||
navigator.serviceWorker | ||
.register("/service-worker.js") | ||
.then((registration) => { | ||
console.log("Service worker registered:", registration); | ||
}) | ||
.catch((error) => { | ||
console.error("Service worker registration failed:", error); | ||
}); | ||
}); | ||
} | ||
} | ||
|
||
export function unregister() { | ||
if ("serviceWorker" in navigator) { | ||
navigator.serviceWorker.ready | ||
.then((registration) => { | ||
registration.unregister(); | ||
}) | ||
.catch((error) => { | ||
console.error("Service worker unregistration failed:", error); | ||
}); | ||
} | ||
} |
46 changes: 23 additions & 23 deletions
46
static/assets/index-b1382f32.js → static/assets/index-58c579a4.js
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Remy AI Chef Assistant</title> | ||
</head> | ||
<body> | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src="logo512.png" className="App-logo" alt="logo" /> | ||
<p> | ||
Please go ONLINE | ||
</p> | ||
</header> | ||
</div> | ||
</body> | ||
</html> |