-
-
Rispondi:
-
- {replyTrg.message}
-
+
+
+
+ {showScrollDown && (
+ )}
+
+ {files.map((file, index) => (
+ // biome-ignore lint/suspicious/noArrayIndexKey:
+
+
+
+ {isLoading ? (
+
+
+
+ ) : (
+
+
+
+ )}
+
+ ))}
+
+ {replyTrg && (
+
+
+
Rispondi:
+
+ {replyTrg.message}
+
+
+
+
+ )}
+
+
+
+
+
+
+
setIsFocused(false)}
+ onChange={(e: ChangeEvent) => {
+ setMessage(e.target.value);
+ }}
+ onFocus={() => setIsFocused(true)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ if (e.shiftKey) {
+ setMessage((prev) => `${prev}\n`);
+ } else {
+ handleSend();
+ }
+ }
+ }}
+ placeholder="Aa"
+ ref={inputRef}
+ value={message}
+ />
+ {isMobile && (
+
+
+
+
+
+
+ {
+ setMessage(message + emoji);
+ }}
+ >
+
+
+
+
+
+
+ )}
+
+
- )}
-
-
-
-
-
-
setIsFocused(false)}
- onChange={(e: ChangeEvent) => {
- setMessage(e.target.value);
- }}
- onFocus={() => setIsFocused(true)}
- onKeyDown={(e) => {
- if (e.key === "Enter") {
- e.preventDefault();
- if (e.shiftKey) {
- setMessage((prev) => `${prev}\n`);
- } else {
- handleSend();
- }
- }
- }}
- placeholder="Aa"
- ref={inputRef}
- value={message}
- />
- {isMobile && (
-
-
-
-
-
-
- {
- setMessage(message + emoji);
- }}
- >
-
-
-
-
-
-
- )}
-
-
-
+
);
}
diff --git a/apps/infoalloggi/src/components/chat/chat-list.tsx b/apps/infoalloggi/src/components/chat/chat-list.tsx
index 017a943..570524e 100644
--- a/apps/infoalloggi/src/components/chat/chat-list.tsx
+++ b/apps/infoalloggi/src/components/chat/chat-list.tsx
@@ -10,6 +10,7 @@ import {
useState,
} from "react";
import toast from "react-hot-toast";
+import { ChatAttachments } from "~/components/chat/chat-attachments";
import {
ChatBubble,
ChatBubbleMessage,
@@ -245,7 +246,7 @@ export const ChatList = () => {
key={message.messageid}
>
{!isPrevSameDay && (
-
+
{new Date(message.time).toLocaleDateString("it", {
day: "2-digit",
month: "2-digit",
@@ -291,7 +292,7 @@ export const ChatList = () => {
{
)}
+ {message.has_attachments && (
+
+ )}
{message.message}
diff --git a/apps/infoalloggi/src/components/chat/chat-topbar.tsx b/apps/infoalloggi/src/components/chat/chat-topbar.tsx
index 4c7267b..936d7d3 100644
--- a/apps/infoalloggi/src/components/chat/chat-topbar.tsx
+++ b/apps/infoalloggi/src/components/chat/chat-topbar.tsx
@@ -83,7 +83,18 @@ export default function ChatTopbar() {