forked from episphere/dashboard
-
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.
Merge branch 'dev' of https://github.com/episphere/studyManagerDashboard
- Loading branch information
Showing
19 changed files
with
85 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Study Manager Dashboard | ||
|
||
This repo implements study manager dashboard for Connect project. | ||
|
||
[Here](https://episphere.github.io/studyManagerDashboard/) is the dashboard hosted on GitHub. |
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 |
---|---|---|
|
@@ -339,4 +339,8 @@ table { | |
font-size: 1rem; | ||
border-radius: .25rem; | ||
width: 100px; | ||
} | ||
} | ||
|
||
#appVersion { | ||
font-size: 0.8rem; | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,51 @@ | ||
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'); | ||
|
||
const appVersion = "v24.7.0"; | ||
workbox.setConfig({ debug: false }); | ||
const { registerRoute } = workbox.routing; | ||
const { CacheFirst, NetworkFirst } = workbox.strategies; | ||
const { ExpirationPlugin } = workbox.expiration; | ||
|
||
const cacheNameMapper = { | ||
"static-cache": `static-cache-${appVersion}`, | ||
"images-cache": `images-cache-${appVersion}`, | ||
}; | ||
|
||
const currCacheNameArray = Object.values(cacheNameMapper); | ||
|
||
registerRoute(/\.(?:js|css|html|pdf)$/, new NetworkFirst({ cacheName: cacheNameMapper["static-cache"] })); | ||
registerRoute(/\.(?:png|jpg|jpeg|svg|gif|ico)$/, | ||
new CacheFirst({ | ||
cacheName: cacheNameMapper["images-cache"], | ||
plugins: [ | ||
new ExpirationPlugin({ | ||
maxEntries: 30, | ||
maxAgeSeconds: 7 * 24 * 60 * 60, | ||
}) | ||
] | ||
}) | ||
); | ||
|
||
self.addEventListener("install", () => { | ||
self.skipWaiting(); | ||
}); | ||
|
||
self.addEventListener("activate", (event) => { | ||
event.waitUntil( | ||
caches.keys().then((cacheNames) => { | ||
return Promise.all( | ||
cacheNames.map((cacheName) => { | ||
if (!currCacheNameArray.includes(cacheName)) { | ||
return caches.delete(cacheName); | ||
} | ||
}) | ||
); | ||
}) | ||
); | ||
}); | ||
|
||
self.addEventListener("message", (event) => { | ||
if (event.data.action === "getAppVersion") { | ||
event.source.postMessage({ action: "sendAppVersion", payload: appVersion }); | ||
} | ||
}); |
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