Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8ca15422f | ||
| eee419c0d4 |
@@ -104,12 +104,6 @@ export function DialogInput() {
|
|||||||
}, [dialog, editableDivRef]);
|
}, [dialog, editableDivRef]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(systemAccounts.find((acc) => acc.publicKey == dialog)){
|
|
||||||
/**
|
|
||||||
* У системных аккаунтов нельзя отвечать на сообщения
|
|
||||||
*/
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(replyMessages.inDialogInput && replyMessages.inDialogInput == dialog){
|
if(replyMessages.inDialogInput && replyMessages.inDialogInput == dialog){
|
||||||
setAttachments([{
|
setAttachments([{
|
||||||
type: AttachmentType.MESSAGES,
|
type: AttachmentType.MESSAGES,
|
||||||
@@ -117,9 +111,7 @@ export function DialogInput() {
|
|||||||
blob: JSON.stringify([...replyMessages.messages]),
|
blob: JSON.stringify([...replyMessages.messages]),
|
||||||
preview: ""
|
preview: ""
|
||||||
}]);
|
}]);
|
||||||
if(editableDivRef.current){
|
editableDivRef.current.focus();
|
||||||
editableDivRef.current.focus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, [dialog, replyMessages]);
|
}, [dialog, replyMessages]);
|
||||||
|
|
||||||
@@ -216,12 +208,6 @@ export function DialogInput() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onClickCamera = async () => {
|
const onClickCamera = async () => {
|
||||||
if(systemAccounts.find((acc) => acc.publicKey == dialog)){
|
|
||||||
/**
|
|
||||||
* У системных аккаунтов нельзя вызывать вложения
|
|
||||||
*/
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(avatars.length == 0){
|
if(avatars.length == 0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -231,9 +217,7 @@ export function DialogInput() {
|
|||||||
type: AttachmentType.AVATAR,
|
type: AttachmentType.AVATAR,
|
||||||
preview: await base64ImageToBlurhash(avatars[0].avatar)
|
preview: await base64ImageToBlurhash(avatars[0].avatar)
|
||||||
}]);
|
}]);
|
||||||
if(editableDivRef.current){
|
editableDivRef.current.focus();
|
||||||
editableDivRef.current.focus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const sendTypeingPacket = () => {
|
const sendTypeingPacket = () => {
|
||||||
@@ -245,12 +229,6 @@ export function DialogInput() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onPaste = async (event: React.ClipboardEvent) => {
|
const onPaste = async (event: React.ClipboardEvent) => {
|
||||||
if(systemAccounts.find((acc) => acc.publicKey == dialog)){
|
|
||||||
/**
|
|
||||||
* У системных аккаунтов нельзя вызывать вложения
|
|
||||||
*/
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(attachments.length >= MAX_ATTACHMENTS_IN_MESSAGE){
|
if(attachments.length >= MAX_ATTACHMENTS_IN_MESSAGE){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -271,9 +249,7 @@ export function DialogInput() {
|
|||||||
preview: await base64ImageToBlurhash(base64Image)
|
preview: await base64ImageToBlurhash(base64Image)
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
if(editableDivRef.current){
|
editableDivRef.current.focus();
|
||||||
editableDivRef.current.focus();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ export function MentionRow(props : MentionRowProps) {
|
|||||||
{props.username == 'all' && <Avatar title="@" variant="filled" color={colors.brandColor}>@</Avatar>}
|
{props.username == 'all' && <Avatar title="@" variant="filled" color={colors.brandColor}>@</Avatar>}
|
||||||
{props.username == 'admin' && <Avatar title="@" variant="filled" color={colors.error}>@</Avatar>}
|
{props.username == 'admin' && <Avatar title="@" variant="filled" color={colors.error}>@</Avatar>}
|
||||||
{props.username != 'all' && props.username != 'admin' && <Avatar
|
{props.username != 'all' && props.username != 'admin' && <Avatar
|
||||||
name={props.title}
|
title={props.title}
|
||||||
variant="light"
|
variant="filled"
|
||||||
color="initials"
|
color="initials"
|
||||||
src={avatars.length > 0 ? avatars[0].avatar : null}
|
src={avatars.length > 0 ? avatars[0].avatar : null}
|
||||||
></Avatar>}
|
></Avatar>}
|
||||||
|
|||||||
Reference in New Issue
Block a user