Обновлен компонент MessengerAttachments: добавлено свойство aria-hidden для иконок изображений, улучшена доступность. Удалены устаревшие интерфейсы WildberriesCard и SelectedCard из компонентов create-supply-form и wb-product-cards, улучшена структура кода.
This commit is contained in:
@ -137,7 +137,7 @@ export function MessengerAttachments({ counterparty, onViewChange }: MessengerAt
|
||||
const renderFileIcon = (fileType?: string) => {
|
||||
if (!fileType) return <FileText className="h-4 w-4 text-gray-400" />
|
||||
|
||||
if (fileType.startsWith('image/')) return <Image className="h-4 w-4 text-blue-400" />
|
||||
if (fileType.startsWith('image/')) return <Image className="h-4 w-4 text-blue-400" aria-hidden="true" />
|
||||
if (fileType.startsWith('audio/')) return <Music className="h-4 w-4 text-green-400" />
|
||||
if (fileType.startsWith('video/')) return <Video className="h-4 w-4 text-purple-400" />
|
||||
return <FileText className="h-4 w-4 text-gray-400" />
|
||||
@ -207,7 +207,7 @@ export function MessengerAttachments({ counterparty, onViewChange }: MessengerAt
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-black/20 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity">
|
||||
<Image className="h-4 w-4 text-white" />
|
||||
<Image className="h-4 w-4 text-white" aria-hidden="true" />
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
@ -319,7 +319,7 @@ export function MessengerAttachments({ counterparty, onViewChange }: MessengerAt
|
||||
{imageMessages.length === 0 ? (
|
||||
<div className="flex items-center justify-center h-64">
|
||||
<div className="text-center">
|
||||
<Image className="h-12 w-12 text-white/20 mx-auto mb-4" />
|
||||
<Image className="h-12 w-12 text-white/20 mx-auto mb-4" aria-hidden="true" />
|
||||
<p className="text-white/60">Нет изображений</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -339,7 +339,7 @@ export function MessengerAttachments({ counterparty, onViewChange }: MessengerAt
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center">
|
||||
<Image className="h-6 w-6 text-white opacity-0 group-hover:opacity-100 transition-opacity" />
|
||||
<Image className="h-6 w-6 text-white opacity-0 group-hover:opacity-100 transition-opacity" aria-hidden="true" />
|
||||
</div>
|
||||
<div className="absolute bottom-2 left-2 right-2">
|
||||
<div className="text-white text-xs truncate bg-black/50 px-2 py-1 rounded">
|
||||
|
Reference in New Issue
Block a user