WIP: Feature Rewrite #87

Draft
thepaperpilot wants to merge 35 commits from feat/ure-rewrite into main
6 changed files with 2958 additions and 1424 deletions
Showing only changes of commit 8a9e106157 - Show all commits

View file

@ -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>

4326
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -24,15 +24,15 @@
"@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",
"unofficial-galaxy-sdk": "git+https://code.incremental.social/thepaperpilot/unofficial-galaxy-sdk.git#1.0.1", "unofficial-galaxy-sdk": "git+https://code.incremental.social/thepaperpilot/unofficial-galaxy-sdk.git#1.0.1",
"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",
@ -55,6 +55,6 @@
"vue-tsc": "^0.38.1" "vue-tsc": "^0.38.1"
}, },
"engines": { "engines": {
"node": "16.x" "node": "21.x"
} }
} }

View file

@ -130,7 +130,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({

View file

@ -18,11 +18,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;
@ -75,33 +70,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);
}
}
}); });
}); });

View file

@ -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}']
}, },