Format and update

This commit is contained in:
2025-03-09 15:23:10 +01:00
parent 7435e91b07
commit 3fe9ecbbb8
6 changed files with 1683 additions and 3538 deletions

View File

@@ -27,14 +27,12 @@
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(data)
console.log(data);
if (data.refresh && image) {
image.src = `/background_image?${Math.random()}`;
image.src = `/background_image?${Math.random()}`;
return;
}
else {
} else {
for (const tracker of data) {
tracker.x *= width;
tracker.y *= height;
@@ -63,13 +61,11 @@
width = image?.getBoundingClientRect().width ?? 0;
height = image?.getBoundingClientRect().height ?? 0;
});
</script>
<svelte:window onresize={resize} />
<div class="flex h-screen items-center justify-center w-screen">
<div class="w-20 mr-auto"></div>
<div class="flex h-screen w-screen items-center justify-center">
<div class="mr-auto w-20"></div>
<div class="relative">
<img
src="/background_image?342038402"

View File

@@ -76,7 +76,7 @@
onpointermove={onPointerMove}
style={`transform: translate(${vis_x}px, ${vis_y}px)`}
class={`absolute flex h-24 w-24 touch-none select-none items-center justify-center rounded-full
${selected === id ? 'bg-green-400 border-green-400' : 'bg-red-400 border-red-400'}`}
${selected === id ? "border-green-400 bg-green-400" : "border-red-400 bg-red-400"}`}
>
Tracker {id}
</div>

View File

@@ -21,8 +21,8 @@
class="absolute left-0 top-0 z-50 m-0 h-full max-h-full w-full max-w-full p-0 open:bg-black/80"
>
<div class="flex h-full w-full flex-col items-center justify-center">
<h1 class="text-red-600 text-8xl">THIS GONNA FUCK THINGS UP</h1>
<div class="flex items-center justify-center gap-6">
<h1 class="text-8xl text-red-600">THIS GONNA FUCK THINGS UP</h1>
<div class="flex items-center justify-center gap-6">
<button class="rounded-md bg-gray-400 p-4" onclick={() => dialog.close()}
>Close</button
>