🤖 Adds 3D model view

This commit is contained in:
Rune Harlyk
2023-07-18 17:47:49 +02:00
parent e34c719a86
commit c8ee581715
8 changed files with 479 additions and 6 deletions
+11 -1
View File
@@ -12,13 +12,23 @@
export let url = window.location.pathname;
onMount(() => {
connect(`ws://${location}`);
registerFetchIntercept()
});
const registerFetchIntercept = () => {
const { fetch: originalFetch } = window;
window.fetch = async (...args) => {
const cache = await caches.open("files")
const [resource, config] = args;
return await cache.match(resource) ?? originalFetch(resource, config)
};
}
</script>
<Router {url}>
<TopBar />
<Sidebar />
<div class="absolute w-full h-full">
<div class="absolute w-full h-full bg-background text-on-background">
<Route path="/" component={Controller} />
<Route path="/config" component={Config} />
<Route path="/health" component={Health} />