Skip to content

Commit

Permalink
PWA fixes (#130)
Browse files Browse the repository at this point in the history
* Don't use paths relative to root since on GitHub it's not located in the root

* Remove non-existed files from urls to cache

* Add missed files to urls to cache
  • Loading branch information
bashor authored May 19, 2024
1 parent edf2ff8 commit 99aed62
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 111 deletions.
4 changes: 2 additions & 2 deletions shared/src/webMain/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="manifest" href="manifest.json"/>
<link rel="icon" type="image/x-icon" sizes="120x120" href="/images/[email protected]">
<link rel="icon" type="image/x-icon" sizes="120x120" href="./images/[email protected]">

<title>KotlinConf</title>

Expand Down Expand Up @@ -170,7 +170,7 @@
</script>
<script type="application/javascript">
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => navigator.serviceWorker.register("/service-worker.js"));
window.addEventListener("load", () => navigator.serviceWorker.register("./service-worker.js"));
}
</script>
</body>
Expand Down
6 changes: 3 additions & 3 deletions shared/src/webMain/resources/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"name": "KotlinConf",
"icons": [
{
"src": "/images/[email protected]",
"src": "./images/[email protected]",
"type": "image/png",
"sizes": "120x120"
},
{
"src": "/images/AppIcon~ios-marketing.png",
"src": "./images/AppIcon~ios-marketing.png",
"type": "image/png",
"sizes": "1024x1024"
}
],
"start_url": "/",
"start_url": "./",
"display": "standalone",
"background_color": "white"
}
212 changes: 106 additions & 106 deletions shared/src/webMain/resources/service-worker.js
Original file line number Diff line number Diff line change
@@ -1,111 +1,111 @@
const KOTLIN_CONF_CACHE = 'kotlin-conf-cache';
const staticUrlsToCache = [
'/',
'/kotlin-app-wasm-js.js',
'/kotlin_skiko_mjs.js',
'/vendors-node_modules_js-joda_core_dist_js-joda_esm_js.js',
'/8433c6b69bfa201b0895.wasm',
'/KotlinConfApp-shared-wasm-js.wasm',
'/manifest.json',
'/images/[email protected]',
'/images/AppIcon~ios-marketing.png',
'/images/splash-screen.svg',
'/images/splash-screen.png',
'/images/bird_splash-screen.svg',
'/images/bird_splash-screen.png',
'/images/menu_banner.svg',
'/font/jetbrains_sans_bold.ttf',
'/font/jetbrains_sans_semibold.ttf',
'/font/jetbrains_sans_regular.ttf',
'/files/app-description.md',
'/files/app-privacy-policy.md',
'/files/app-terms.md',
'/files/code-of-conduct.md',
'/files/first-floor-dark.svg',
'/files/first-floor.svg',
'/files/ground-floor-dark.svg',
'/files/ground-floor.svg',
'/files/visitors-privacy-policy.md',
'/files/visitors-terms.md',
'/values/strings.commonMain.cvr',
'/drawable/about_conf_bottom_banner.xml',
'/drawable/about_conf_top_banner.xml',
'/drawable/academy.png',
'/drawable/android.png',
'/drawable/arrow_right.xml',
'/drawable/back.xml',
'/drawable/bookmark.xml',
'/drawable/bookmark_active.xml',
'/drawable/btsystems.xml',
'/drawable/close.xml',
'/drawable/cloud_inject.xml',
'/drawable/cup.xml',
'/drawable/cup_active.xml',
'/drawable/express.png',
'/drawable/foundation.xml',
'/drawable/google.xml',
'/drawable/gradle.xml',
'/drawable/kodein.xml',
'/drawable/kt_weekly.xml',
'/drawable/light.xml',
'/drawable/location.xml',
'/drawable/location_active.xml',
'/drawable/lunch.xml',
'/drawable/lunch_active.xml',
'/drawable/menu.xml',
'/drawable/menu_active.xml',
'/drawable/menu_banner.xml',
'/drawable/mercari.xml',
'/drawable/monta.xml',
'/drawable/mytalks.xml',
'/drawable/mytalks_active.xml',
'/drawable/notifications_bird.xml',
'/drawable/pretix.xml',
'/drawable/privacy_policy_bird.xml',
'/drawable/schedule_day_1_banner.xml',
'/drawable/schedule_day_2_banner.xml',
'/drawable/schedule_day_3_banner.xml',
'/drawable/schedule_party_section_bird.xml',
'/drawable/search.xml',
'/drawable/sentry.xml',
'/drawable/shape.xml',
'/drawable/slack.xml',
'/drawable/smilehappy.xml',
'/drawable/smilehappy_active.xml',
'/drawable/smileneutral.xml',
'/drawable/smileneutral_active.xml',
'/drawable/smilesad.xml',
'/drawable/smilesad_active.xml',
'/drawable/speakers.xml',
'/drawable/speakers_active.xml',
'/drawable/stickermule.xml',
'/drawable/time.xml',
'/drawable/time_active.xml',
'/drawable/touchlab.xml',
'/drawable/uber.xml',
'/drawable/worldline.xml',
'/drawable/x.xml',
'/drawable-dark/about.xml',
'/drawable-dark/academy.png',
'/drawable-dark/android.png',
'/drawable-dark/btsystems.xml',
'/drawable-dark/closing.xml',
'/drawable-dark/cloud_inject.xml',
'/drawable-dark/express.png',
'/drawable-dark/foundation.xml',
'/drawable-dark/google.xml',
'/drawable-dark/gradle.xml',
'/drawable-dark/kodein.xml',
'/drawable-dark/kt_weekly.xml',
'/drawable-dark/mercari.xml',
'/drawable-dark/monta.xml',
'/drawable-dark/pretix.xml',
'/drawable-dark/sentry.xml',
'/drawable-dark/shape.xml',
'/drawable-dark/stickermule.xml',
'/drawable-dark/touchlab.xml',
'/drawable-dark/uber.xml',
'/drawable-dark/worldline.xml'
'./',
'./kotlin-app-wasm-js.js',
'./135.js',
'./273.js',
'./8433c6b69bfa201b0895.wasm',
'./KotlinConfApp-shared-wasm-js.wasm',
'./manifest.json',
'./images/[email protected]',
'./images/AppIcon~ios-marketing.png',
'./images/splash-screen.svg',
'./images/splash-screen.png',
'./images/bird_splash-screen.svg',
'./images/bird_splash-screen.png',
'./images/menu_banner.svg',
'./font/jetbrains_sans_bold.ttf',
'./font/jetbrains_sans_semibold.ttf',
'./font/jetbrains_sans_regular.ttf',
'./files/app-description.md',
'./files/app-privacy-policy.md',
'./files/app-terms.md',
'./files/code-of-conduct.md',
'./files/first-floor-dark.svg',
'./files/first-floor.svg',
'./files/ground-floor-dark.svg',
'./files/ground-floor.svg',
'./files/visitors-privacy-policy.md',
'./files/visitors-terms.md',
'./values/strings.commonMain.cvr',
'./drawable/about_conf_bottom_banner.xml',
'./drawable/about_conf_top_banner.xml',
'./drawable/academy.png',
'./drawable/android.png',
'./drawable/arrow_right.xml',
'./drawable/back.xml',
'./drawable/bookmark.xml',
'./drawable/bookmark_active.xml',
'./drawable/btsystems.xml',
'./drawable/close.xml',
'./drawable/cloud_inject.xml',
'./drawable/cup.xml',
'./drawable/cup_active.xml',
'./drawable/express.png',
'./drawable/foundation.xml',
'./drawable/google.xml',
'./drawable/gradle.xml',
'./drawable/kodein.xml',
'./drawable/kt_weekly.xml',
'./drawable/light.xml',
'./drawable/location.xml',
'./drawable/location_active.xml',
'./drawable/lunch.xml',
'./drawable/lunch_active.xml',
'./drawable/menu.xml',
'./drawable/menu_active.xml',
'./drawable/menu_banner.xml',
'./drawable/mercari.xml',
'./drawable/monta.xml',
'./drawable/mytalks.xml',
'./drawable/mytalks_active.xml',
'./drawable/notifications_bird.xml',
'./drawable/pretix.xml',
'./drawable/privacy_policy_bird.xml',
'./drawable/schedule_day_1_banner.xml',
'./drawable/schedule_day_2_banner.xml',
'./drawable/schedule_day_3_banner.xml',
'./drawable/schedule_party_section_bird.xml',
'./drawable/search.xml',
'./drawable/sentry.xml',
'./drawable/shape.xml',
'./drawable/slack.xml',
'./drawable/smilehappy.xml',
'./drawable/smilehappy_active.xml',
'./drawable/smileneutral.xml',
'./drawable/smileneutral_active.xml',
'./drawable/smilesad.xml',
'./drawable/smilesad_active.xml',
'./drawable/speakers.xml',
'./drawable/speakers_active.xml',
'./drawable/stickermule.xml',
'./drawable/time.xml',
'./drawable/time_active.xml',
'./drawable/touchlab.xml',
'./drawable/uber.xml',
'./drawable/worldline.xml',
'./drawable/x.xml',
'./drawable-dark/about.xml',
'./drawable-dark/academy.png',
'./drawable-dark/android.png',
'./drawable-dark/btsystems.xml',
'./drawable-dark/closing.xml',
'./drawable-dark/cloud_inject.xml',
'./drawable-dark/express.png',
'./drawable-dark/foundation.xml',
'./drawable-dark/google.xml',
'./drawable-dark/gradle.xml',
'./drawable-dark/kodein.xml',
'./drawable-dark/kt_weekly.xml',
'./drawable-dark/mercari.xml',
'./drawable-dark/monta.xml',
'./drawable-dark/pretix.xml',
'./drawable-dark/sentry.xml',
'./drawable-dark/shape.xml',
'./drawable-dark/stickermule.xml',
'./drawable-dark/touchlab.xml',
'./drawable-dark/uber.xml',
'./drawable-dark/worldline.xml'
];

self.addEventListener('install', function (event) {
Expand Down

0 comments on commit 99aed62

Please sign in to comment.