chore: update attachment icon alignment
This commit is contained in:
parent
cffbe1a77b
commit
067f8b5447
@ -225,11 +225,7 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => {
|
|||||||
const actualType = getFileTypeFromExtension(file.name) || detectedType
|
const actualType = getFileTypeFromExtension(file.name) || detectedType
|
||||||
|
|
||||||
// Check file type - images only
|
// Check file type - images only
|
||||||
const allowedTypes = [
|
const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png']
|
||||||
'image/jpg',
|
|
||||||
'image/jpeg',
|
|
||||||
'image/png',
|
|
||||||
]
|
|
||||||
|
|
||||||
if (!allowedTypes.includes(actualType)) {
|
if (!allowedTypes.includes(actualType)) {
|
||||||
setMessage(
|
setMessage(
|
||||||
@ -336,7 +332,7 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => {
|
|||||||
const clipboardItems = e.clipboardData?.items
|
const clipboardItems = e.clipboardData?.items
|
||||||
if (!clipboardItems) return
|
if (!clipboardItems) return
|
||||||
|
|
||||||
const imageItems = Array.from(clipboardItems).filter(item =>
|
const imageItems = Array.from(clipboardItems).filter((item) =>
|
||||||
item.type.startsWith('image/')
|
item.type.startsWith('image/')
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -494,7 +490,7 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => {
|
|||||||
)}
|
)}
|
||||||
{/* File attachment - always available */}
|
{/* File attachment - always available */}
|
||||||
<div
|
<div
|
||||||
className="h-6 p-1 items-center justify-center rounded-sm hover:bg-main-view-fg/10 transition-all duration-200 ease-in-out gap-1 ml-1"
|
className="h-6 p-1 ml-1 flex items-center justify-center rounded-sm hover:bg-main-view-fg/10 transition-all duration-200 ease-in-out gap-1"
|
||||||
onClick={handleAttachmentClick}
|
onClick={handleAttachmentClick}
|
||||||
>
|
>
|
||||||
<IconPaperclip size={18} className="text-main-view-fg/50" />
|
<IconPaperclip size={18} className="text-main-view-fg/50" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user