From 2074c9c732f6d279f5153688b9e33bdc8c9c7674 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Fri, 15 Sep 2023 13:54:56 -0500 Subject: Here goes nothing! Signed-off-by: Matt Strapp --- app/src/app.d.ts | 3 + app/src/app.html | 4 +- app/src/lib/index.ts | 1 - app/src/lib/svelte/Navigation.svelte | 11 ++++ app/src/lib/ts/crc32.worker.ts | 8 +++ app/src/routes/+layout.svelte | 117 +++++++++++++++++------------------ app/src/routes/+page.svelte | 64 +------------------ app/src/routes/crc32/+page.svelte | 55 ++++++++++++++++ 8 files changed, 139 insertions(+), 124 deletions(-) delete mode 100644 app/src/lib/index.ts create mode 100644 app/src/lib/svelte/Navigation.svelte create mode 100644 app/src/lib/ts/crc32.worker.ts create mode 100644 app/src/routes/crc32/+page.svelte (limited to 'app/src') diff --git a/app/src/app.d.ts b/app/src/app.d.ts index 3e4ed20..bf2855f 100644 --- a/app/src/app.d.ts +++ b/app/src/app.d.ts @@ -1,6 +1,9 @@ // See https://kit.svelte.dev/docs/types#app // for information about these interfaces // and what to do when importing types + +import 'vite-plugin-pwa/info'; + declare namespace App { // interface Locals {} // interface PageData {} diff --git a/app/src/app.html b/app/src/app.html index 4480bed..54f3529 100644 --- a/app/src/app.html +++ b/app/src/app.html @@ -2,11 +2,11 @@ - + %sveltekit.head% - +
%sveltekit.body%
diff --git a/app/src/lib/index.ts b/app/src/lib/index.ts deleted file mode 100644 index 856f2b6..0000000 --- a/app/src/lib/index.ts +++ /dev/null @@ -1 +0,0 @@ -// place files you want to import through the `$lib` alias in this folder. diff --git a/app/src/lib/svelte/Navigation.svelte b/app/src/lib/svelte/Navigation.svelte new file mode 100644 index 0000000..20c7d8b --- /dev/null +++ b/app/src/lib/svelte/Navigation.svelte @@ -0,0 +1,11 @@ + + + + + Home! + + CRC32 + diff --git a/app/src/lib/ts/crc32.worker.ts b/app/src/lib/ts/crc32.worker.ts new file mode 100644 index 0000000..0d04c7c --- /dev/null +++ b/app/src/lib/ts/crc32.worker.ts @@ -0,0 +1,8 @@ +import crc32 from 'crc/crc32'; + +onmessage = async (message: MessageEvent) => { + const file = message.data; + const buffer = await file.arrayBuffer(); + const crc = crc32(buffer, 517762881); + postMessage(crc); +}; diff --git a/app/src/routes/+layout.svelte b/app/src/routes/+layout.svelte index 8a70575..a0dd68a 100644 --- a/app/src/routes/+layout.svelte +++ b/app/src/routes/+layout.svelte @@ -1,76 +1,75 @@ - - {@html webManifestLink} + + {@html webManifestLink} + + - - - - - Skeleton - - - - Discord - - - Twitter - - - GitHub - - - - - - + + + + + A! + + + + Frontend Source + + + + + + + + + diff --git a/app/src/routes/+page.svelte b/app/src/routes/+page.svelte index 7cd11ed..1f0a15d 100644 --- a/app/src/routes/+page.svelte +++ b/app/src/routes/+page.svelte @@ -1,5 +1,5 @@ - Coming Soon(TM) + Coming Soon(TM) @@ -7,69 +7,9 @@

Welcome to a placeholder.

- -
-
- - - -
- - -
-

Try editing the following:

-

/src/routes/+layout.svelte

-

/src/routes/+page.svelte

-
-
diff --git a/app/src/routes/crc32/+page.svelte b/app/src/routes/crc32/+page.svelte new file mode 100644 index 0000000..18cc515 --- /dev/null +++ b/app/src/routes/crc32/+page.svelte @@ -0,0 +1,55 @@ + + + + CRC32 + + +
+
+
+ form.requestSubmit()} + required + disabled={disableInput} + > + +

Drop a file here to get its CRC32 checksum.

+
+
+
+ + {#if disableInput} +

Calculating the checksum, this may take time!


+ + {/if} + +
+
-- cgit v1.2.3