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-by-uuid.tsx | 14 ++++++++++++- app/routes/band-edit.tsx | 27 ++++++++++++++++++++++++- app/routes/band-new.tsx | 26 +++++++++++++++++++++++- app/routes/home.tsx | 48 +++++++++++++++++++++++++-------------------- 4 files changed, 91 insertions(+), 24 deletions(-) (limited to 'app/routes') diff --git a/app/routes/band-by-uuid.tsx b/app/routes/band-by-uuid.tsx index c55472e..1945a57 100644 --- a/app/routes/band-by-uuid.tsx +++ b/app/routes/band-by-uuid.tsx @@ -16,6 +16,12 @@ export async function loader({ params }: LoaderFunctionArgs) { return { band, links, artists, latest: revisions[0] ?? null }; } +const STATUS_LABEL: Record = { + active: "活動中", + hiatus: "活動休止", + disbanded: "解散", +}; + export default function BandDetail() { const { band, links, artists, latest } = useLoaderData(); return ( @@ -23,7 +29,13 @@ export default function BandDetail() {

{band.name}

- {band.area &&

{band.area}

} +
+ {band.area && {band.area}} + {STATUS_LABEL[band.status] ?? band.status} +
+ {band.description && ( +

{band.description}

+ )}
0) return { errors }; try { - updateBand(band.id, { slug, name, area, links, artists, message, ip_address: getIpAddress(request) }); + updateBand(band.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は既に使用されています" } }; @@ -129,6 +131,29 @@ export default function BandEdit() { />
+
+ + +
+ +
+ +