From 870da3838a5660b55efac5ef7233eb2ec839871d Mon Sep 17 00:00:00 2001 From: mota Date: Sun, 2 Nov 2025 12:06:55 +0900 Subject: [PATCH] =?UTF-8?q?=EB=84=A4=EB=B8=8C=EB=B0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/20251102030623_/migration.sql | 43 +++++++++++++++++++ src/app/components/AppHeader.tsx | 15 +++++++ src/app/components/SearchBar.tsx | 40 +++++++++-------- 3 files changed, 80 insertions(+), 18 deletions(-) create mode 100644 prisma/migrations/20251102030623_/migration.sql diff --git a/prisma/migrations/20251102030623_/migration.sql b/prisma/migrations/20251102030623_/migration.sql new file mode 100644 index 0000000..3b058d5 --- /dev/null +++ b/prisma/migrations/20251102030623_/migration.sql @@ -0,0 +1,43 @@ +/* + Warnings: + + - You are about to drop the column `requiresApproval` on the `boards` table. All the data in the column will be lost. + - You are about to drop the column `type` on the `boards` table. All the data in the column will be lost. + +*/ +-- RedefineTables +PRAGMA defer_foreign_keys=ON; +PRAGMA foreign_keys=OFF; +CREATE TABLE "new_boards" ( + "id" TEXT NOT NULL PRIMARY KEY, + "name" TEXT NOT NULL, + "slug" TEXT NOT NULL, + "description" TEXT, + "sortOrder" INTEGER NOT NULL DEFAULT 0, + "status" TEXT NOT NULL DEFAULT 'active', + "allowAnonymousPost" BOOLEAN NOT NULL DEFAULT false, + "allowSecretComment" BOOLEAN NOT NULL DEFAULT false, + "isAdultOnly" BOOLEAN NOT NULL DEFAULT false, + "requiredTags" JSONB, + "requiredFields" JSONB, + "readLevel" TEXT NOT NULL DEFAULT 'public', + "writeLevel" TEXT NOT NULL DEFAULT 'member', + "categoryId" TEXT, + "mainPageViewTypeId" TEXT, + "listViewTypeId" TEXT, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + CONSTRAINT "boards_categoryId_fkey" FOREIGN KEY ("categoryId") REFERENCES "board_categories" ("id") ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT "boards_mainPageViewTypeId_fkey" FOREIGN KEY ("mainPageViewTypeId") REFERENCES "board_view_types" ("id") ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT "boards_listViewTypeId_fkey" FOREIGN KEY ("listViewTypeId") REFERENCES "board_view_types" ("id") ON DELETE SET NULL ON UPDATE CASCADE +); +INSERT INTO "new_boards" ("allowAnonymousPost", "allowSecretComment", "categoryId", "createdAt", "description", "id", "isAdultOnly", "listViewTypeId", "mainPageViewTypeId", "name", "readLevel", "requiredFields", "requiredTags", "slug", "sortOrder", "status", "updatedAt", "writeLevel") SELECT "allowAnonymousPost", "allowSecretComment", "categoryId", "createdAt", "description", "id", "isAdultOnly", "listViewTypeId", "mainPageViewTypeId", "name", "readLevel", "requiredFields", "requiredTags", "slug", "sortOrder", "status", "updatedAt", "writeLevel" FROM "boards"; +DROP TABLE "boards"; +ALTER TABLE "new_boards" RENAME TO "boards"; +CREATE UNIQUE INDEX "boards_slug_key" ON "boards"("slug"); +CREATE INDEX "boards_status_sortOrder_idx" ON "boards"("status", "sortOrder"); +CREATE INDEX "boards_categoryId_idx" ON "boards"("categoryId"); +CREATE INDEX "boards_mainPageViewTypeId_idx" ON "boards"("mainPageViewTypeId"); +CREATE INDEX "boards_listViewTypeId_idx" ON "boards"("listViewTypeId"); +PRAGMA foreign_keys=ON; +PRAGMA defer_foreign_keys=OFF; diff --git a/src/app/components/AppHeader.tsx b/src/app/components/AppHeader.tsx index 845af95..7e8a53f 100644 --- a/src/app/components/AppHeader.tsx +++ b/src/app/components/AppHeader.tsx @@ -401,6 +401,13 @@ export function AppHeader() {
+ + 어드민(임시) +
{mobileOpen && ( @@ -410,6 +417,14 @@ export function AppHeader() {
+ setMobileOpen(false)} + className="inline-flex items-center justify-center h-10 rounded-md border border-neutral-300 text-neutral-700 hover:bg-neutral-100" + aria-label="어드민(임시)" + > + 어드민(임시) +
{categories.map((cat) => (
diff --git a/src/app/components/SearchBar.tsx b/src/app/components/SearchBar.tsx index 896ba1c..54ce981 100644 --- a/src/app/components/SearchBar.tsx +++ b/src/app/components/SearchBar.tsx @@ -16,23 +16,29 @@ export function SearchBar() { aria-label="사이트 검색" className="relative w-full max-w-[384px]" > - - - + + + + - {/* 접근성용 제출 버튼 (시각적으로는 숨김) */} -