diff --git a/package.json b/package.json index da5d0b98..1114e099 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink", - "version": "0.1.0", + "version": "0.1.1", "private": true, "workspaces": [ "packages/*" diff --git a/src/app/create/page.tsx b/src/app/create/page.tsx index bb60f7a0..61ca7b94 100644 --- a/src/app/create/page.tsx +++ b/src/app/create/page.tsx @@ -109,7 +109,8 @@ function CreatePage() { attemptRetry: newAttemptRetry, } = usePublishIntent(); const { valid: newValid, charCount: newCharCount } = validateContentLength(newContent); - const newTitleValid = newTitle.trim().length > 0; + const MAX_TITLE_LENGTH = 60; + const newTitleValid = newTitle.trim().length > 0 && newTitle.length <= MAX_TITLE_LENGTH; const newGenreValid = genre.length > 0; const newCanSubmit = newState === "idle" || newState === "error" @@ -307,11 +308,20 @@ function CreatePage() { setNewTitle(e.target.value)} + onChange={(e) => setNewTitle(e.target.value.slice(0, MAX_TITLE_LENGTH))} disabled={newBusy} placeholder="Enter storyline title" + maxLength={MAX_TITLE_LENGTH} className="border-border bg-surface text-foreground placeholder:text-muted w-full rounded border px-3 py-2 text-sm focus:border-accent focus:outline-none disabled:opacity-50" /> +