Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add character limits for anonymous name and comments

Anand Baburajan28e48dd31308
diff --git a/web/packages/gallery/components/viewer/AddNameModal.tsx b/web/packages/gallery/components/viewer/AddNameModal.tsx
index 034ffd9c74..b2f31ca436 100644
--- a/web/packages/gallery/components/viewer/AddNameModal.tsx
+++ b/web/packages/gallery/components/viewer/AddNameModal.tsx
@@ -240,6 +240,7 @@ export const AddNameModal: React.FC<AddNameModalProps> = ({
}
}}
autoFocus
+ slotProps={{ htmlInput: { maxLength: 50 } }}
/>
<SubmitButton
diff --git a/web/packages/gallery/components/viewer/CommentsSidebar.tsx b/web/packages/gallery/components/viewer/CommentsSidebar.tsx
index 87bf24500d..398ee091d2 100644
--- a/web/packages/gallery/components/viewer/CommentsSidebar.tsx
+++ b/web/packages/gallery/components/viewer/CommentsSidebar.tsx
@@ -2031,6 +2031,7 @@ export const CommentsSidebar: React.FC<CommentsSidebarProps> = ({
value={commentText}
onChange={(e) => setCommentText(e.target.value)}
inputRef={inputRef}
+ slotProps={{ htmlInput: { maxLength: 280 } }}
/>
</InputWrapper>
<SendButton onClick={handleSend} disabled={sending}>