From d944f11581553c5e038b33fa4558566713f6d1f4 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Sat, 9 May 2026 00:46:32 +0900 Subject: Add band description/status fields and redesign index page - bands table: add description (TEXT) and status (TEXT DEFAULT 'active') via ALTER TABLE migrations (active / hiatus / disbanded) - Home page: minimal monochrome index listing name, area, status - Band detail: show description below title, status alongside area - Band new/edit forms: textarea for description, select for status Co-Authored-By: Claude Sonnet 4.6 --- app/routes/band-new.tsx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'app/routes/band-new.tsx') diff --git a/app/routes/band-new.tsx b/app/routes/band-new.tsx index b0325a3..b4d49e2 100644 --- a/app/routes/band-new.tsx +++ b/app/routes/band-new.tsx @@ -12,6 +12,8 @@ export async function action({ request }: ActionFunctionArgs) { const name = (fd.get("name") as string).trim(); const slug = (fd.get("slug") as string).trim(); const area = (fd.get("area") as string).trim() || null; + const description = (fd.get("description") as string).trim() || null; + const status = (fd.get("status") as string) || "active"; const message = (fd.get("message") as string).trim(); const links: { label: string; url: string }[] = JSON.parse( (fd.get("links") as string) || "[]" @@ -28,7 +30,7 @@ export async function action({ request }: ActionFunctionArgs) { const id = crypto.randomUUID(); try { - createBand({ id, slug, name, area, links, artists, message, ip_address: getIpAddress(request) }); + createBand({ id, slug, name, area, description, status, links, artists, message, ip_address: getIpAddress(request) }); } catch (e) { if (e instanceof Error && e.message.includes("UNIQUE constraint failed: bands.slug")) { return { errors: { slug: "このslugは既に使用されています" } }; @@ -107,6 +109,28 @@ export default function BandNew() { /> +
+ + +
+ +
+ +