fix and update

This commit is contained in:
lendry
2026-06-29 23:10:59 +03:00
parent 57cb58347b
commit 0d43f9943f

View File

@@ -234,10 +234,6 @@ function familyMemberRoleLabel(role: string) {
return role === 'owner' ? 'Создатель семьи' : 'Участник';
}
/** Desktop: зона под fixed UserMenu + колокольчик (IdShell), на mobile не применяется */
const DESKTOP_CHAT_RIGHT_GUTTER = 'lg:pr-64';
const DESKTOP_CHAT_TOP_GUTTER = 'lg:pt-14';
function shouldSkipGroupedAlbumMessage(messages: ChatMessage[], index: number) {
const message = messages[index];
if (!message) return false;
@@ -1563,8 +1559,8 @@ export function FamilyGroupView({ groupId }: { groupId: string }) {
<div
className={cn(
'flex w-full min-w-0 max-w-full overflow-hidden bg-[#eef2f8]',
'h-[calc(100dvh-4.5rem-env(safe-area-inset-bottom))] min-h-0 lg:h-[calc(100vh-120px)] lg:min-h-[640px]',
'pt-[env(safe-area-inset-top)] lg:pt-0',
'h-[calc(100dvh-4.5rem-env(safe-area-inset-bottom))] min-h-0 lg:h-[calc(100vh-168px)] lg:min-h-[640px]',
'pt-[env(safe-area-inset-top)] lg:mt-12 lg:pt-0',
'rounded-none border-0 lg:rounded-[28px] lg:border lg:border-[#eceef4]'
)}
>
@@ -1710,7 +1706,7 @@ export function FamilyGroupView({ groupId }: { groupId: string }) {
>
{activeRoom ? (
<>
<div className={cn('flex items-center justify-between gap-2 border-b border-[#dce3ec] bg-white px-3 py-3 sm:px-4', DESKTOP_CHAT_RIGHT_GUTTER)}>
<div className="flex items-center justify-between gap-2 border-b border-[#dce3ec] bg-white px-3 py-3 sm:px-4">
<div className="flex min-w-0 flex-1 items-center gap-2 sm:gap-3">
<button
type="button"
@@ -1914,7 +1910,6 @@ export function FamilyGroupView({ groupId }: { groupId: string }) {
<ChatPinnedMessageBanner
senderName={pinnedMessage.senderName}
preview={pinnedPreview}
className={DESKTOP_CHAT_RIGHT_GUTTER}
onClick={() => {
if (!scrollToChatMessage(pinnedMessage.id)) {
showToast('Закреплённое сообщение пока не загружено в ленте');
@@ -1922,7 +1917,7 @@ export function FamilyGroupView({ groupId }: { groupId: string }) {
}}
/>
) : null}
<div className={cn('flex-1 space-y-2 overflow-y-auto px-4 py-4', DESKTOP_CHAT_RIGHT_GUTTER, DESKTOP_CHAT_TOP_GUTTER, isDragging && 'select-none')}>
<div className={cn('flex-1 space-y-2 overflow-y-auto px-4 py-4', isDragging && 'select-none')}>
{visibleMessages.map((message, messageIndex) => {
if (shouldSkipGroupedAlbumMessage(visibleMessages, messageIndex)) {
return null;
@@ -2265,7 +2260,7 @@ export function FamilyGroupView({ groupId }: { groupId: string }) {
onDelete={() => void handleBulkDelete()}
/>
) : (
<div className={cn('border-t border-[#dce3ec] bg-white px-2 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] sm:px-3 sm:py-3', DESKTOP_CHAT_RIGHT_GUTTER)}>
<div className="border-t border-[#dce3ec] bg-white px-2 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))] sm:px-3 sm:py-3">
{editingMessageId ? (
<ChatMessageEditBanner
preview={draft.trim() || messages.find((item) => item.id === editingMessageId)?.content || undefined}