feat: redesign typed rice poster editor
Verify mini program and deploy preview / verify-deploy (push) Successful in 3m57s

This commit is contained in:
2026-09-20 16:37:35 +08:00
parent 2bf21a9f97
commit 9615add720
29 changed files with 118 additions and 72 deletions
@@ -1,5 +1,5 @@
const API_BASE = process.env.API_INTERNAL_URL || 'http://pk-lab-api:8000';
async function forward(request, context) {
async function forward(request:Request, context:{params:Promise<{path:string[]}>}):Promise<Response> {
const { path } = await context.params;
const incoming = new URL(request.url);
const target = new URL(`/api/${path.join('/')}${incoming.search}`, API_BASE);
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
export function GET() { return Response.json({ status: 'ok' }); }
+1
View File
@@ -0,0 +1 @@
export function GET():Response { return Response.json({ status: 'ok' }); }
-4
View File
@@ -1,4 +0,0 @@
import './globals.css';
export const metadata = { title: '本命饭 PK', description: '各种各样的饭,二选一。' };
export const viewport = { width: 'device-width', initialScale: 1, themeColor: '#fff8f2' };
export default function RootLayout({ children }) { return <html lang="zh-CN"><body>{children}</body></html>; }
+6
View File
@@ -0,0 +1,6 @@
import './globals.css';
import type { Metadata, Viewport } from 'next';
import type { ReactNode } from 'react';
export const metadata:Metadata = { title: '本命饭 PK', description: '各种各样的饭,二选一。' };
export const viewport:Viewport = { width: 'device-width', initialScale: 1, themeColor: '#fff8f2' };
export default function RootLayout({ children }:{children:ReactNode}) { return <html lang="zh-CN"><body>{children}</body></html>; }
-2
View File
@@ -1,2 +0,0 @@
import RiceHome from '../components/RiceHome';
export default function HomePage() { return <RiceHome />; }
+2
View File
@@ -0,0 +1,2 @@
import RiceHome from '../components/RiceHome';
export default function HomePage():React.ReactElement { return <RiceHome />; }
-2
View File
@@ -1,2 +0,0 @@
import RicePosterEditor from '../../../components/RicePosterEditor';
export default async function ResultPage({ params }) { const { id } = await params; return <RicePosterEditor runId={id} />; }
+2
View File
@@ -0,0 +1,2 @@
import RicePosterEditor from '../../../components/RicePosterEditor';
export default async function ResultPage({ params }:{params:Promise<{id:string}>}) { const { id } = await params; return <RicePosterEditor runId={id} />; }
-2
View File
@@ -1,2 +0,0 @@
import RiceArena from '../../components/RiceArena';
export default function TestPage() { return <RiceArena />; }
+2
View File
@@ -0,0 +1,2 @@
import RiceArena from '../../components/RiceArena';
export default function TestPage():React.ReactElement { return <RiceArena />; }