aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/routes/truncate
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-09-28 08:42:25 -0500
committerMatt Strapp <matt@mattstrapp.net>2023-09-28 08:42:25 -0500
commitef30f835d04038a1cbec06fbe35a70037e926cd6 (patch)
tree6cb29359fc05d6d96361c786886a8d442f3dbfc2 /app/src/routes/truncate
parentGet rid of crc32, truncate instead (diff)
downloadtrinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.gz
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.bz2
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.lz
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.xz
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.tar.zst
trinkets-ef30f835d04038a1cbec06fbe35a70037e926cd6.zip
Lint
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'app/src/routes/truncate')
-rw-r--r--app/src/routes/truncate/+page.svelte15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/src/routes/truncate/+page.svelte b/app/src/routes/truncate/+page.svelte
index 9e2545f..1b37f56 100644
--- a/app/src/routes/truncate/+page.svelte
+++ b/app/src/routes/truncate/+page.svelte
@@ -1,5 +1,5 @@
<script lang="ts">
- import saveFile from '$lib/ts/download';
+ import saveFile from '$lib/ts/download';
import type { TruncateRequest, TruncateResponse } from '$lib/types/truncate-worker';
import { FileDropzone, ProgressBar } from '@skeletonlabs/skeleton';
import { onMount } from 'svelte';
@@ -16,7 +16,7 @@
originalName = files[0].name;
worker.postMessage({
file: files[0],
- size: truncateTo,
+ size: truncateTo
} as TruncateRequest);
form.reset();
truncateTo = 1;
@@ -27,7 +27,6 @@
worker.onmessage = (e: MessageEvent<TruncateResponse>) => {
disableInput = false;
saveFile(e.data.file, `trunc-${originalName}`);
-
};
});
</script>
@@ -56,8 +55,14 @@
<br />
<label class="label">
<span>Truncate up to... (in bytes)</span>
- <input class="input" type="number" name="truncateTo" bind:value={truncateTo} min="1" required />
-
+ <input
+ class="input"
+ type="number"
+ name="truncateTo"
+ bind:value={truncateTo}
+ min="1"
+ required
+ />
</label>
<br />
<noscript>