Опросы
This commit is contained in:
@@ -35,7 +35,7 @@ import { getCroppedImg } from '../../../../core/infrastructure/imageCrop';
|
||||
interface GroupSettingsProps {
|
||||
chat: Chat;
|
||||
onClose: () => void;
|
||||
onGoToMessage?: (messageId: string) => void;
|
||||
onGoToMessage?: (messageId: string, sequenceId?: number) => void;
|
||||
}
|
||||
|
||||
export default function GroupSettings({ chat, onClose, onGoToMessage }: GroupSettingsProps) {
|
||||
@@ -256,7 +256,8 @@ export default function GroupSettings({ chat, onClose, onGoToMessage }: GroupSet
|
||||
url: getMediaUrl(m.url),
|
||||
thumbnail: m.thumbnail ? getMediaUrl(m.thumbnail) : undefined,
|
||||
messageId: msg.id,
|
||||
createdAt: msg.createdAt
|
||||
createdAt: msg.createdAt,
|
||||
sequenceId: msg.sequenceId
|
||||
})));
|
||||
|
||||
const allGifs = sharedGifs.flatMap(msg => (msg.media || []).map(m => ({
|
||||
@@ -264,7 +265,8 @@ export default function GroupSettings({ chat, onClose, onGoToMessage }: GroupSet
|
||||
url: getMediaUrl(m.url),
|
||||
thumbnail: m.thumbnail ? getMediaUrl(m.thumbnail) : undefined,
|
||||
messageId: msg.id,
|
||||
createdAt: msg.createdAt
|
||||
createdAt: msg.createdAt,
|
||||
sequenceId: msg.sequenceId
|
||||
})));
|
||||
|
||||
const sortedMedia = [...allMedia].sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime());
|
||||
@@ -669,7 +671,7 @@ export default function GroupSettings({ chat, onClose, onGoToMessage }: GroupSet
|
||||
/>
|
||||
)}
|
||||
<button
|
||||
onClick={(e) => { e.stopPropagation(); onGoToMessage?.(m.messageId); }}
|
||||
onClick={(e) => { e.stopPropagation(); onGoToMessage?.(m.messageId, m.sequenceId); }}
|
||||
className="absolute bottom-2 right-2 px-2 py-1 rounded-md bg-black/60 backdrop-blur-sm flex items-center justify-center text-white text-[10px] font-medium opacity-0 group-hover:opacity-100 transition-opacity hover:bg-black/80 shadow-md"
|
||||
>
|
||||
{t('showInChat')}
|
||||
@@ -714,7 +716,7 @@ export default function GroupSettings({ chat, onClose, onGoToMessage }: GroupSet
|
||||
/>
|
||||
)}
|
||||
<button
|
||||
onClick={(e) => { e.stopPropagation(); onGoToMessage?.(m.messageId); }}
|
||||
onClick={(e) => { e.stopPropagation(); onGoToMessage?.(m.messageId, m.sequenceId); }}
|
||||
className="absolute bottom-2 right-2 px-2 py-1 rounded-md bg-black/60 backdrop-blur-sm flex items-center justify-center text-white text-[10px] font-medium opacity-0 group-hover:opacity-100 transition-opacity hover:bg-black/80 shadow-md"
|
||||
>
|
||||
{t('showInChat')}
|
||||
@@ -749,7 +751,7 @@ export default function GroupSettings({ chat, onClose, onGoToMessage }: GroupSet
|
||||
<Download size={14} className="text-zinc-600" />
|
||||
</a>
|
||||
<button
|
||||
onClick={() => onGoToMessage?.(msg.id)}
|
||||
onClick={() => onGoToMessage?.(msg.id, msg.sequenceId)}
|
||||
className="absolute right-10 top-1/2 -translate-y-1/2 px-3 py-1.5 rounded-lg hover:bg-white/10 flex items-center justify-center text-zinc-300 text-[11px] font-medium opacity-0 group-hover/file:opacity-100 transition-opacity"
|
||||
>
|
||||
{t('showInChat')}
|
||||
@@ -781,7 +783,7 @@ export default function GroupSettings({ chat, onClose, onGoToMessage }: GroupSet
|
||||
))}
|
||||
{msg.content && <p className="text-[11px] text-zinc-500 line-clamp-1">{msg.content}</p>}
|
||||
<button
|
||||
onClick={() => onGoToMessage?.(msg.id)}
|
||||
onClick={() => onGoToMessage?.(msg.id, msg.sequenceId)}
|
||||
className="absolute right-4 top-1/2 -translate-y-1/2 px-3 py-1.5 rounded-lg bg-black/40 hover:bg-knot-500/20 text-zinc-300 hover:text-white text-[11px] font-medium opacity-0 group-hover:opacity-100 transition-all shadow-md z-10"
|
||||
>
|
||||
{t('showInChat')}
|
||||
|
||||
Reference in New Issue
Block a user