forked from potsda.mn/mobilizon
fix: fix some typescript issues with pwa
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
04c5ac1163
commit
e351d3cb2f
|
@ -178,7 +178,9 @@ onMounted(() => {
|
||||||
cancelText: t("Ignore"),
|
cancelText: t("Ignore"),
|
||||||
message: t("A new version is available."),
|
message: t("A new version is available."),
|
||||||
onAction: async () => {
|
onAction: async () => {
|
||||||
const registration = event.detail as ServiceWorkerRegistration;
|
const registration = (
|
||||||
|
event as unknown as { detail: ServiceWorkerRegistration }
|
||||||
|
).detail;
|
||||||
try {
|
try {
|
||||||
await refreshApp(registration);
|
await refreshApp(registration);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"types": ["webpack-env", "jest", "vite/client"],
|
"types": ["webpack-env", "jest", "vite/client", "vite-plugin-pwa/vue"],
|
||||||
"typeRoots": ["./@types", "./node_modules/@types"],
|
"typeRoots": ["./@types", "./node_modules/@types"],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["src/*"]
|
"@/*": ["src/*"]
|
||||||
|
|
Loading…
Reference in a new issue