This commit is contained in:
rosetta
2026-01-30 05:01:05 +02:00
commit 83f38dc63f
327 changed files with 18725 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import { Attachment, AttachmentType } from "@/app/providers/ProtocolProvider/protocol/packets/packet.message";
import { AttachImage } from "./AttachImage";
import { AttachMessages } from "./AttachMessages";
import { AttachFile } from "./AttachFile";
import { AttachAvatar } from "./AttachAvatar";
export interface DialogAttachmentProps {
attach: Attachment;
onRemove?: (attach: Attachment) => void;
}
export function DialogAttachment(props : DialogAttachmentProps) {
return (
<>
{props.attach.type == AttachmentType.IMAGE &&
<AttachImage attach={props.attach} onRemove={props.onRemove}></AttachImage>
}
{props.attach.type == AttachmentType.MESSAGES &&
<AttachMessages attach={props.attach} onRemove={props.onRemove}></AttachMessages>
}
{props.attach.type == AttachmentType.FILE &&
<AttachFile attach={props.attach} onRemove={props.onRemove}></AttachFile>
}
{props.attach.type == AttachmentType.AVATAR &&
<AttachAvatar attach={props.attach} onRemove={props.onRemove}></AttachAvatar>
}
</>
)
}