mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-03-29 03:29:13 +00:00
feat: longer descriptions
This commit is contained in:
parent
2055f61527
commit
fde3480342
6 changed files with 13 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
@ -13,7 +13,7 @@ model User {
|
|||
email String @unique
|
||||
emailVerified DateTime?
|
||||
image String?
|
||||
description String? @db.VarChar(256)
|
||||
description String? @db.VarChar(512)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
|
@ -73,7 +73,7 @@ model Mii {
|
|||
name String @db.VarChar(64)
|
||||
imageCount Int @default(0)
|
||||
tags String[]
|
||||
description String? @db.VarChar(256)
|
||||
description String? @db.VarChar(512)
|
||||
platform MiiPlatform @default(THREE_DS)
|
||||
|
||||
instructions Json?
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const uploadsDirectory = path.join(process.cwd(), "uploads", "mii");
|
|||
const editSchema = z.object({
|
||||
name: nameSchema.optional(),
|
||||
tags: tagsSchema.optional(),
|
||||
description: z.string().trim().max(256).optional(),
|
||||
description: z.string().trim().max(512).optional(),
|
||||
makeup: z.enum(MiiMakeup).optional(),
|
||||
instructions: switchMiiInstructionsSchema,
|
||||
image1: z.union([z.instanceof(File), z.any()]).optional(),
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const submitSchema = z
|
|||
platform: z.enum(MiiPlatform).default("THREE_DS"),
|
||||
name: nameSchema,
|
||||
tags: tagsSchema,
|
||||
description: z.string().trim().max(256).optional(),
|
||||
description: z.string().trim().max(512).optional(),
|
||||
|
||||
// Switch
|
||||
gender: z.enum(MiiGender).default("MALE"),
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ export default function EditForm({ mii, likes }: Props) {
|
|||
</label>
|
||||
<textarea
|
||||
rows={5}
|
||||
maxLength={256}
|
||||
maxLength={512}
|
||||
placeholder="(optional) Type a description..."
|
||||
className="pill input rounded-xl! resize-none col-span-2 text-sm"
|
||||
value={description ?? ""}
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ export default function SubmitForm() {
|
|||
<textarea
|
||||
id="description"
|
||||
rows={5}
|
||||
maxLength={256}
|
||||
maxLength={512}
|
||||
placeholder="(optional) Type a description..."
|
||||
className="pill input rounded-xl! resize-none col-span-2 text-sm"
|
||||
value={description}
|
||||
|
|
@ -285,7 +285,7 @@ export default function SubmitForm() {
|
|||
</div>
|
||||
|
||||
{/* 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">
|
||||
Gender
|
||||
</label>
|
||||
|
|
@ -429,7 +429,7 @@ export default function SubmitForm() {
|
|||
<div className="flex flex-col items-center gap-2">
|
||||
<MiiEditor instructions={instructions} />
|
||||
<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.
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue