diff --git a/src/Components/Dial.svelte b/src/Components/Dial.svelte
new file mode 100644
index 0000000..91053cf
--- /dev/null
+++ b/src/Components/Dial.svelte
@@ -0,0 +1,74 @@
+
+
+
+
+
{
+ visible = !visible;
+ updateNails();
+ }}
+ class="dial"
+>
+
+
+
+
diff --git a/src/Components/DialEmbeddings.svelte b/src/Components/DialEmbeddings.svelte
new file mode 100644
index 0000000..25e6956
--- /dev/null
+++ b/src/Components/DialEmbeddings.svelte
@@ -0,0 +1,28 @@
+
+
+
+ {#each files as file, i}
+
+
+
+ {/each}
+
+
+
diff --git a/src/Components/Nail.svelte b/src/Components/Nail.svelte
new file mode 100644
index 0000000..bb62e24
--- /dev/null
+++ b/src/Components/Nail.svelte
@@ -0,0 +1,55 @@
+
+
+
+
+{#if $state.visible}
+
+{/if}
+
+
diff --git a/src/Components/Overlay.svelte b/src/Components/Overlay.svelte
new file mode 100644
index 0000000..acc3689
--- /dev/null
+++ b/src/Components/Overlay.svelte
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/src/utils.ts b/src/utils.ts
index 5118c78..71479e2 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -162,12 +162,15 @@ export const getThreadDataCache = async (board: string, op: number) => {
return threadDataCache;
};
-export const getEmbedsFromCache = async (board: string, op: number, pid: string): Promise<[EmbeddedFile[], boolean][]> => {
+/*
+ Semantic difference: Empty array means there is nothing, undefined means it wasn't found in the cache
+*/
+export const getEmbedsFromCache = async (board: string, op: number, pid: string): Promise<[EmbeddedFile[], boolean][] | undefined> => {
await getThreadDataCache(board, op);
const target = +pid.slice(pid.match(/\d/)!.index);
const cachedData = cthreadDataCache![target];
if (!cachedData)
- return [];
+ return;
const ret: [EmbeddedFile[], boolean][] = [];
if ('pee' in cachedData.data) {
const files = await decodeCoom3Payload(Buffer.from(cachedData.data.pee.join(' ')));
@@ -228,7 +231,7 @@ export const decodeCoom3Payload = async (buff: Buffer) => {
const { domain, file } = m.groups!;
const headers = await getHeaders(pee);
const res = await ifetch(pee, {
- headers: { range: 'bytes=0-16383', 'user-agent': '' },
+ headers: { range: 'bytes=0-32767', 'user-agent': '' },
mode: 'cors',
referrerPolicy: 'no-referrer',
});