Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
taisan11 committed Oct 18, 2024
1 parent fe30786 commit e5d84f0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Binary file modified bun.lockb
Binary file not shown.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
},
"dependencies": {
"@hono/valibot-validator": "^0.4.0",
"@taisan11/hono-shiftjis": "npm:@jsr/taisan11__hono-shiftjis",
"drizzle-orm": "^0.34.1",
"drizzle-orm": "^0.35.1",
"hono": "^4.6.5",
"iconv-cp932": "^1.2.2",
"nanoid": "^5.0.7",
Expand All @@ -14,10 +13,10 @@
"unenv": "^1.10.0",
"unix-crypt-td-js": "^1.1.4",
"unstorage": "^1.12.0",
"valibot": "^1.0.0-beta.1"
"valibot": "^0.42.1"
},
"devDependencies": {
"@types/bun": "^1.1.11",
"drizzle-kit": "^0.25.0"
"drizzle-kit": "^0.26.2"
}
}
11 changes: 8 additions & 3 deletions src/oldui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getSubject, getSubjecttxt, getThread, getdat } from "./module/storage";
import { kakikoAPI } from "./module/kakiko-api";
import { getConnInfo } from './module/unHono'
import { env } from "hono/adapter";
import {shiftjis} from "@taisan11/hono-shiftjis/src/index"
import {encode} from "iconv-cp932"

declare module "hono" {
interface ContextRenderer {
Expand All @@ -14,15 +14,20 @@ declare module "hono" {

const app = new Hono()

app.use((c,next)=>shiftjis(c,next))
app.use(async (c,next)=>{
await next()
const moto = await c.res.text()
const encoded = encode(moto)
c.res = new Response(encoded, c.res)
})

app.get(
"*",
jsxRenderer(({ children, title }) => {
return (
<html lang="ja">
<head>
<meta charset="utf-8" />
<meta charset="shift_jis" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ app.use(etag())
app.use(secureHeaders())

app.route("/admin", admin);
app.route("/", OldUI);
app.route("/old", OldUI);
app.route("/api",API)
app.route("/", BBS);

Expand Down

0 comments on commit e5d84f0

Please sign in to comment.