Compare commits
No commits in common. "b9aa00e8dea840d97f40a1974be93ecd6e8d8acc" and "ded31980bfbf9f09afa2818bdcc8cc3e40748441" have entirely different histories.
b9aa00e8de
...
ded31980bf
@ -47,11 +47,28 @@
|
|||||||
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
|
||||||
import UserDetail from "./components/UserDetail.svelte";
|
import UserDetail from "./components/UserDetail.svelte";
|
||||||
OpenAPI.BASE = config.baseurl;
|
OpenAPI.BASE = config.baseurl;
|
||||||
import { register as registerSW } from "./swmodule";
|
|
||||||
store.init();
|
store.init();
|
||||||
// registerSW();
|
|
||||||
|
if ("serviceWorker" in navigator) {
|
||||||
|
window.addEventListener("load", () => {
|
||||||
|
navigator.serviceWorker.register("/sw.js").then(
|
||||||
|
(registration) => {
|
||||||
|
// console.log(`sw successful with scope: ${registration.scope}`);
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
// console.log(`sw failed: ${err}`);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.bg-gray-900 {
|
||||||
|
background-color: #121317;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<Route>
|
<Route>
|
||||||
{#if $router.path === '/forgot_password'}
|
{#if $router.path === '/forgot_password'}
|
||||||
<Route path="/forgot_password">
|
<Route path="/forgot_password">
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
export const register = () => {
|
|
||||||
if ('serviceWorker' in navigator) {
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
navigator.serviceWorker.register('/sw.js').then(
|
|
||||||
(registration) => {
|
|
||||||
// console.log(`sw successful with scope: ${registration.scope}`);
|
|
||||||
},
|
|
||||||
(err) => {
|
|
||||||
// console.log(`sw failed: ${err}`);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
Loading…
x
Reference in New Issue
Block a user