forked from profectus/Profectus
Update vite dependencies
This commit is contained in:
parent
ba03b8b32b
commit
639a4c903b
6 changed files with 2949 additions and 1451 deletions
|
@ -8,6 +8,7 @@
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||||
<link rel="alternate icon" type="image/png" sizes="48x48" href="/favicon.ico">
|
<link rel="alternate icon" type="image/png" sizes="48x48" href="/favicon.ico">
|
||||||
|
<link rel="mask-icon" href="/favicon.svg" color="#2E3440">
|
||||||
<meta name="theme-color" content="#2E3440">
|
<meta name="theme-color" content="#2E3440">
|
||||||
|
|
||||||
<title>Profectus</title>
|
<title>Profectus</title>
|
||||||
|
|
4352
package-lock.json
generated
4352
package-lock.json
generated
File diff suppressed because it is too large
Load diff
12
package.json
12
package.json
|
@ -22,14 +22,14 @@
|
||||||
"@pixi/particle-emitter": "^5.0.7",
|
"@pixi/particle-emitter": "^5.0.7",
|
||||||
"@pixi/sprite": "~6.3.2",
|
"@pixi/sprite": "~6.3.2",
|
||||||
"@pixi/ticker": "~6.3.2",
|
"@pixi/ticker": "~6.3.2",
|
||||||
"@vitejs/plugin-vue": "^2.3.3",
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||||
"is-plain-object": "^5.0.0",
|
"is-plain-object": "^5.0.0",
|
||||||
"lz-string": "^1.4.4",
|
"lz-string": "^1.4.4",
|
||||||
"nanoevents": "^6.0.2",
|
"nanoevents": "^6.0.2",
|
||||||
"vite": "^2.9.12",
|
"vite": "^5.1.6",
|
||||||
"vite-plugin-pwa": "^0.12.0",
|
"vite-plugin-pwa": "^0.19.4",
|
||||||
"vite-tsconfig-paths": "^3.5.0",
|
"vite-tsconfig-paths": "^4.3.0",
|
||||||
"vue": "^3.2.26",
|
"vue": "^3.2.26",
|
||||||
"vue-next-select": "^2.10.2",
|
"vue-next-select": "^2.10.2",
|
||||||
"vue-panzoom": "https://github.com/thepaperpilot/vue-panzoom.git",
|
"vue-panzoom": "https://github.com/thepaperpilot/vue-panzoom.git",
|
||||||
|
@ -52,6 +52,6 @@
|
||||||
"vue-tsc": "^0.38.1"
|
"vue-tsc": "^0.38.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "16.x"
|
"node": "21.x"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ watch(saveToImport, importedSave => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let bankContext = import.meta.globEager("./../../saves/*.txt", { as: "raw" });
|
let bankContext = import.meta.glob("./../../saves/*.txt", { query: "?raw", eager: true });
|
||||||
let bank = ref(
|
let bank = ref(
|
||||||
Object.keys(bankContext).reduce((acc: Array<{ label: string; value: string }>, curr) => {
|
Object.keys(bankContext).reduce((acc: Array<{ label: string; value: string }>, curr) => {
|
||||||
acc.push({
|
acc.push({
|
||||||
|
|
31
src/main.ts
31
src/main.ts
|
@ -17,11 +17,6 @@ declare global {
|
||||||
vue: VueApp;
|
vue: VueApp;
|
||||||
projInfo: typeof projInfo;
|
projInfo: typeof projInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Fix for typedoc treating import functions as taking AssertOptions instead of GlobOptions. */
|
|
||||||
interface AssertOptions {
|
|
||||||
as: string;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const error = console.error;
|
const error = console.error;
|
||||||
|
@ -74,33 +69,13 @@ requestAnimationFrame(async () => {
|
||||||
// Setup PWA update prompt
|
// Setup PWA update prompt
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { updateServiceWorker } = useRegisterSW({
|
useRegisterSW({
|
||||||
onNeedRefresh() {
|
immediate: true,
|
||||||
toast.info("New content available, click here to update.", {
|
|
||||||
timeout: false,
|
|
||||||
closeOnClick: false,
|
|
||||||
draggable: false,
|
|
||||||
icon: {
|
|
||||||
iconClass: "material-icons",
|
|
||||||
iconChildren: "refresh",
|
|
||||||
iconTag: "i"
|
|
||||||
},
|
|
||||||
rtl: false,
|
|
||||||
onClick() {
|
|
||||||
updateServiceWorker();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onOfflineReady() {
|
onOfflineReady() {
|
||||||
toast.info("App ready to work offline");
|
toast.info("App ready to work offline");
|
||||||
},
|
},
|
||||||
onRegisterError: console.warn,
|
onRegisterError: console.warn,
|
||||||
onRegistered(r) {
|
onRegistered: console.info
|
||||||
if (r) {
|
|
||||||
// https://stackoverflow.com/questions/65500916/typeerror-failed-to-execute-update-on-serviceworkerregistration-illegal-in
|
|
||||||
setInterval(() => r.update(), 60 * 60 * 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default defineConfig({
|
||||||
}),
|
}),
|
||||||
tsconfigPaths(),
|
tsconfigPaths(),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
includeAssets: ["Logo.svg", "favicon.ico", "robots.txt", "apple-touch-icon.png"],
|
registerType: 'autoUpdate',
|
||||||
workbox: {
|
workbox: {
|
||||||
globPatterns: ['**/*.{js,css,html,ico,png,svg}']
|
globPatterns: ['**/*.{js,css,html,ico,png,svg}']
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue