From e430645e4a637148bcf6d5846a84fe97f85bc0a9 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Thu, 28 Sep 2023 09:49:16 -0500 Subject: Make the website less ugly, especially on mobile Signed-off-by: Matt Strapp --- app/src/lib/svelte/Navigation.svelte | 42 ++++++++++++++++++++++++++++++++---- app/src/lib/ts/truncate.worker.ts | 4 +++- 2 files changed, 41 insertions(+), 5 deletions(-) (limited to 'app/src/lib') diff --git a/app/src/lib/svelte/Navigation.svelte b/app/src/lib/svelte/Navigation.svelte index fd3c914..973924a 100644 --- a/app/src/lib/svelte/Navigation.svelte +++ b/app/src/lib/svelte/Navigation.svelte @@ -1,11 +1,45 @@ - + - Home! + + + + + Home! + + + + + + + Truncate! + + + + + + + Source + - Truncate! diff --git a/app/src/lib/ts/truncate.worker.ts b/app/src/lib/ts/truncate.worker.ts index ad00011..eaa65fe 100644 --- a/app/src/lib/ts/truncate.worker.ts +++ b/app/src/lib/ts/truncate.worker.ts @@ -1,9 +1,11 @@ import type { TruncateRequest, TruncateResponse } from '../types/truncate-worker'; onmessage = async (message: MessageEvent) => { + console.log('File received. Truncating...'); const file = message.data.file; const buffer = await file.arrayBuffer(); const truncated = buffer.slice(0, message.data.size); - postMessage({ file: truncated } as TruncateResponse); }; + +console.log('Worker successfully loaded!'); -- cgit v1.2.3