diff --git a/src/views/stream/stats.tsx b/src/views/stream/stats.tsx
index 1647e3a..1fbdd0d 100644
--- a/src/views/stream/stats.tsx
+++ b/src/views/stream/stats.tsx
@@ -1,4 +1,5 @@
import { For, Show } from "solid-js";
+
import { STREAM_CONFIGS, StreamType } from "./config";
const TOP_COLLECTION_LIMIT = 5;
diff --git a/src/worker.js b/src/worker.js
index c607ec9..3b8c912 100644
--- a/src/worker.js
+++ b/src/worker.js
@@ -1,4 +1,5 @@
import { ImageResponse } from "@takumi-rs/image-response/wasm";
+
import wasmModule from "./takumi_wasm_bg.wasm";
// Minimal createElement helper — avoids pulling in React
@@ -8,10 +9,7 @@ function h(type, props, ...children) {
type,
props: {
...props,
- children:
- flat.length === 0 ? undefined
- : flat.length === 1 ? flat[0]
- : flat,
+ children: flat.length === 0 ? undefined : flat.length === 1 ? flat[0] : flat,
},
};
}
@@ -82,18 +80,16 @@ function truncateToWidth(str, maxWidth) {
for (; i < chars.length; i++) {
const cp = chars[i].codePointAt(0);
const cw =
- (
- (cp >= 0x1100 && cp <= 0x115f) ||
- (cp >= 0x2e80 && cp <= 0x9fff) ||
- (cp >= 0xac00 && cp <= 0xd7af) ||
- (cp >= 0xf900 && cp <= 0xfaff) ||
- (cp >= 0xfe10 && cp <= 0xfe6f) ||
- (cp >= 0xff01 && cp <= 0xff60) ||
- (cp >= 0xffe0 && cp <= 0xffe6) ||
- (cp >= 0x20000 && cp <= 0x2fa1f)
- ) ?
- 2
- : 1;
+ (cp >= 0x1100 && cp <= 0x115f) ||
+ (cp >= 0x2e80 && cp <= 0x9fff) ||
+ (cp >= 0xac00 && cp <= 0xd7af) ||
+ (cp >= 0xf900 && cp <= 0xfaff) ||
+ (cp >= 0xfe10 && cp <= 0xfe6f) ||
+ (cp >= 0xff01 && cp <= 0xff60) ||
+ (cp >= 0xffe0 && cp <= 0xffe6) ||
+ (cp >= 0x20000 && cp <= 0x2fa1f)
+ ? 2
+ : 1;
if (w + cw > maxWidth) break;
w += cw;
}
@@ -460,9 +456,8 @@ class HeadEndRewriter {
const d = esc(this.ogData.description);
const i = this.imageUrl ? esc(this.imageUrl) : null;
- const imageTags =
- i ?
- `\n
+ const imageTags = i
+ ? `\n
`
: `\n `;
@@ -661,9 +656,8 @@ export default {
return env.ASSETS.fetch(request);
}
- const imageUrl =
- ogData.generateImage ?
- `${url.origin}/og-image?` +
+ const imageUrl = ogData.generateImage
+ ? `${url.origin}/og-image?` +
new URLSearchParams({ did: ogData.did, collection: ogData.collection, rkey: ogData.rkey })
: null;
diff --git a/vite.config.ts b/vite.config.ts
index 4c2d26e..762fc3e 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,7 +1,9 @@
-import tailwindcss from "@tailwindcss/vite";
import { execSync } from "child_process";
+
+import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid";
+
import metadata from "./public/oauth-client-metadata.json";
const SERVER_HOST = "127.0.0.1";