feat: longer descriptions

This commit is contained in:
trafficlunar 2026-03-28 14:22:41 +00:00
parent 2055f61527
commit fde3480342
6 changed files with 13 additions and 8 deletions

View file

@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "miis" ALTER COLUMN "description" SET DATA TYPE VARCHAR(512);
-- AlterTable
ALTER TABLE "users" ALTER COLUMN "description" SET DATA TYPE VARCHAR(512);

View file

@ -13,7 +13,7 @@ model User {
email String @unique email String @unique
emailVerified DateTime? emailVerified DateTime?
image String? image String?
description String? @db.VarChar(256) description String? @db.VarChar(512)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
@ -73,7 +73,7 @@ model Mii {
name String @db.VarChar(64) name String @db.VarChar(64)
imageCount Int @default(0) imageCount Int @default(0)
tags String[] tags String[]
description String? @db.VarChar(256) description String? @db.VarChar(512)
platform MiiPlatform @default(THREE_DS) platform MiiPlatform @default(THREE_DS)
instructions Json? instructions Json?

View file

@ -22,7 +22,7 @@ const uploadsDirectory = path.join(process.cwd(), "uploads", "mii");
const editSchema = z.object({ const editSchema = z.object({
name: nameSchema.optional(), name: nameSchema.optional(),
tags: tagsSchema.optional(), tags: tagsSchema.optional(),
description: z.string().trim().max(256).optional(), description: z.string().trim().max(512).optional(),
makeup: z.enum(MiiMakeup).optional(), makeup: z.enum(MiiMakeup).optional(),
instructions: switchMiiInstructionsSchema, instructions: switchMiiInstructionsSchema,
image1: z.union([z.instanceof(File), z.any()]).optional(), image1: z.union([z.instanceof(File), z.any()]).optional(),

View file

@ -29,7 +29,7 @@ const submitSchema = z
platform: z.enum(MiiPlatform).default("THREE_DS"), platform: z.enum(MiiPlatform).default("THREE_DS"),
name: nameSchema, name: nameSchema,
tags: tagsSchema, tags: tagsSchema,
description: z.string().trim().max(256).optional(), description: z.string().trim().max(512).optional(),
// Switch // Switch
gender: z.enum(MiiGender).default("MALE"), gender: z.enum(MiiGender).default("MALE"),

View file

@ -182,7 +182,7 @@ export default function EditForm({ mii, likes }: Props) {
</label> </label>
<textarea <textarea
rows={5} rows={5}
maxLength={256} maxLength={512}
placeholder="(optional) Type a description..." placeholder="(optional) Type a description..."
className="pill input rounded-xl! resize-none col-span-2 text-sm" className="pill input rounded-xl! resize-none col-span-2 text-sm"
value={description ?? ""} value={description ?? ""}

View file

@ -276,7 +276,7 @@ export default function SubmitForm() {
<textarea <textarea
id="description" id="description"
rows={5} rows={5}
maxLength={256} maxLength={512}
placeholder="(optional) Type a description..." placeholder="(optional) Type a description..."
className="pill input rounded-xl! resize-none col-span-2 text-sm" className="pill input rounded-xl! resize-none col-span-2 text-sm"
value={description} value={description}
@ -285,7 +285,7 @@ export default function SubmitForm() {
</div> </div>
{/* Gender (switch only) */} {/* Gender (switch only) */}
<div className={`w-full grid grid-cols-3 items-start ${platform === "SWITCH" ? "" : "hidden"}`}> <div className={`w-full grid grid-cols-3 items-start z-10 ${platform === "SWITCH" ? "" : "hidden"}`}>
<label htmlFor="gender" className="font-semibold py-2"> <label htmlFor="gender" className="font-semibold py-2">
Gender Gender
</label> </label>
@ -429,7 +429,7 @@ export default function SubmitForm() {
<div className="flex flex-col items-center gap-2"> <div className="flex flex-col items-center gap-2">
<MiiEditor instructions={instructions} /> <MiiEditor instructions={instructions} />
<SwitchSubmitTutorialButton /> <SwitchSubmitTutorialButton />
<span className="text-xs text-zinc-400 text-center px-32"> <span className="text-xs text-zinc-400 text-center px-32 max-sm:px-8">
Mii editor may be inaccurate. Instructions are recommended, but not required - you do not have to add every instruction. Mii editor may be inaccurate. Instructions are recommended, but not required - you do not have to add every instruction.
</span> </span>
</div> </div>