import { Alert, Flex, Skeleton, Text } from "@mantine/core"; import { AttachmentProps } from "./MessageAttachments"; import { useRosettaColors } from "@/app/hooks/useRosettaColors"; import { ReplyedMessage } from "../ReplyedMessage/ReplyedMessage"; import { IconX } from "@tabler/icons-react"; import { useSetting } from "@/app/providers/SettingsProvider/useSetting"; import { modals } from "@mantine/modals"; export function MessageReplyMessages(props: AttachmentProps) { const colors = useRosettaColors(); const [showAlertInReplyMessages, setShowAlertInReplyMessages] = useSetting ('showAlertInReplyMessages', true); const [bgInReplyMessages] = useSetting ('bgInReplyMessages', ''); const reply = JSON.parse(props.attachment.blob); //console.info("Mreply", reply); const closeAlert = () => { modals.openConfirmModal({ title: 'Disable Warning', centered: true, children: ( Are you sure you want to disable the warning about forged messages in replies? ), labels: { confirm: 'Yes, disable', cancel: 'No, keep it' }, onCancel: () => {}, onConfirm: () => setShowAlertInReplyMessages(false), }); } return ( {reply.length <= 0 && } {reply.map((msg, index) => ( ))} {showAlertInReplyMessages && Due to the use of encryption, these messages may be forged by the sender } ); }