-
Notifications
You must be signed in to change notification settings - Fork 17
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
Showing
14 changed files
with
116 additions
and
309 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,6 @@ export const About = | |
const worksheetUrl = getTablePublicUrl(tablesData[0].spreadsheetId, tablesData[0].sheetId); | ||
const email = '[email protected]'; | ||
const source = 'http://steen.free.fr/interslavic'; | ||
let version = `v${VERSION}`; | ||
const trimmedBaseUrl = BASE_URL.replace('/', ''); | ||
if (trimmedBaseUrl !== '') { | ||
version += `-${trimmedBaseUrl}`; | ||
} | ||
|
||
return ( | ||
<div className="about-page"> | ||
|
@@ -151,7 +146,7 @@ export const About = | |
)} | ||
</div> | ||
</div> | ||
<div className="about-page__release-date">{version}</div> | ||
<div className="about-page__release-date">v{VERSION}</div> | ||
</div> | ||
</div> | ||
); | ||
|
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
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,50 @@ | ||
import { addLangs } from 'consts'; | ||
|
||
export const CASH_URLS = [ | ||
'/', | ||
'/data/basic.json', | ||
'/data/translateStatistic.json', | ||
...addLangs.map((lang) => `/data/${lang}.json`), | ||
'/grammarComponent.js', | ||
'/communityComponent.js', | ||
'/index.js', | ||
'/sw.js', | ||
'/styles/grammarComponent.css', | ||
'/styles/communityComponent.css', | ||
'/styles/index.css', | ||
'/icons/android-icon-36x36.png', | ||
'/icons/android-icon-48x48.png', | ||
'/icons/android-icon-72x72.png', | ||
'/icons/android-icon-96x96.png', | ||
'/icons/android-icon-144x144.png', | ||
'/icons/android-icon-192x192.png', | ||
'/icons/apple-icon.png', | ||
'/icons/apple-icon-57x57.png', | ||
'/icons/apple-icon-60x60.png', | ||
'/icons/apple-icon-72x72.png', | ||
'/icons/apple-icon-76x76.png', | ||
'/icons/apple-icon-114x114.png', | ||
'/icons/apple-icon-120x120.png', | ||
'/icons/apple-icon-144x144.png', | ||
'/icons/apple-icon-152x152.png', | ||
'/icons/apple-icon-180x180.png', | ||
'/icons/apple-icon-precomposed.png', | ||
'/icons/discord-icon-330x102.png', | ||
'/icons/favicon.ico', | ||
'/icons/favicon-16x16.png', | ||
'/icons/favicon-32x32.png', | ||
'/icons/favicon-96x96.png', | ||
'/icons/icon-72x72.png', | ||
'/icons/icon-96x96.png', | ||
'/icons/icon-128x128.png', | ||
'/icons/icon-144x144.png', | ||
'/icons/icon-152x152.png', | ||
'/icons/icon-192x192.png', | ||
'/icons/icon-384x384.png', | ||
'/icons/icon-512x512.png', | ||
'/icons/manifest.json', | ||
'/icons/ms-icon-70x70.png', | ||
'/icons/ms-icon-144x144.png', | ||
'/icons/ms-icon-150x150.png', | ||
'/icons/ms-icon-310x310.png', | ||
]; |
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,46 @@ | ||
import { CASH_URLS } from './cashUrls'; | ||
|
||
self.addEventListener("install", (event: any) => { | ||
event.waitUntil( | ||
caches | ||
.open(`${VERSION}fundamentals`) | ||
.then((cache) => cache.addAll(CASH_URLS)) | ||
); | ||
}); | ||
|
||
self.addEventListener("fetch", (event: any) => { | ||
if (event.request.method !== 'GET') { | ||
return; | ||
} | ||
|
||
event.respondWith( | ||
caches | ||
.match(event.request) | ||
.then((cached) => { | ||
const networked = fetch(event.request) | ||
.then((response: any) => { | ||
const cacheCopy = response.clone(); | ||
|
||
caches | ||
.open(`${VERSION}pages`) | ||
.then((cache) => cache.put(event.request, cacheCopy)) | ||
|
||
return response; | ||
}); | ||
|
||
return cached || networked; | ||
}) | ||
); | ||
}); | ||
|
||
self.addEventListener("activate", (event: any) => { | ||
event.waitUntil( | ||
caches | ||
.keys() | ||
.then((keys) => Promise.all( | ||
keys | ||
.filter((key) => !key.startsWith(VERSION)) | ||
.map((key) => caches.delete(key)) | ||
)) | ||
); | ||
}); |
Oops, something went wrong.