From d944f11581553c5e038b33fa4558566713f6d1f4 Mon Sep 17 00:00:00 2001
From: yyamashita <yyamashita@mosquit.one>
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 <noreply@anthropic.com>
---
 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() {
           />
         </div>
 
+        <div>
+          <label className="block text-sm font-medium text-gray-300 mb-1">ステータス</label>
+          <select
+            name="status"
+            defaultValue="active"
+            className="bg-gray-800 border border-gray-700 rounded px-3 py-2 text-gray-100 focus:outline-none focus:border-blue-500"
+          >
+            <option value="active">活動中</option>
+            <option value="hiatus">活動休止</option>
+            <option value="disbanded">解散</option>
+          </select>
+        </div>
+
+        <div>
+          <label className="block text-sm font-medium text-gray-300 mb-1">説明</label>
+          <textarea
+            name="description"
+            rows={3}
+            className="w-full bg-gray-800 border border-gray-700 rounded px-3 py-2 text-gray-100 focus:outline-none focus:border-blue-500 resize-none"
+          />
+        </div>
+
         <div>
           <label className="block text-sm font-medium text-gray-300 mb-2">リンク</label>
           <div className="space-y-2">
-- 
cgit v1.2.3

