@ -110,26 +110,27 @@
< / span >
< / span >
< / div >
< / div >
< div id = "no-chat-selected"
class="flex-1 flex flex-col items-center justify-center w-full p-8 z-30"
< div id = "no-chat-selected" class = "flex-1 flex flex-col items-center justify-center w-full p-8 z-30"
style="transform: translateY(64px);">
style="transform: translateY(64px);">
< div
< div
class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-[#0A522E]/10 to-[#0A522E]/20 dark:from-[#FAF6E9]/10 dark:to-[#FAF6E9]/20 rounded-full flex items-center justify-center shadow-inner">
class="w-20 h-20 mx-auto mb-6 bg-gradient-to-br from-[#0A522E]/10 to-[#0A522E]/20 dark:from-[#FAF6E9]/10 dark:to-[#FAF6E9]/20 rounded-full flex items-center justify-center shadow-inner">
< span
< span
class="material-symbols-outlined text-5xl text-[#0A522E] dark:text-[#FAF6E9] opacity-90">chat< / span >
class="material-symbols-outlined text-5xl text-[#0A522E] dark:text-[#FAF6E9] opacity-90">chat< / span >
< / div >
< / div >
< h3 class = "text-lg font-semibold text-[#052B18] dark:text-[#FAF6E9] mb-2 text-center" > No Chat Selected< / h3 >
< p class = "text-sm font-medium opacity-80 text-[#0A522E] dark:text-[#FAF6E9] text-center" > Select a chat from
the sidebar to start messaging< / p >
< h3 class = "text-lg font-semibold text-[#052B18] dark:text-[#FAF6E9] mb-2 text-center" > {% trans "No Chat Selected" %}< / h3 >
< p class = "text-sm font-medium opacity-80 text-[#0A522E] dark:text-[#FAF6E9] text-center" > {% trans "Select a chat from the sidebar to start messaging" %}< / p >
< / div >
< / div >
< div id = "chat-messages" class = "chat-messages flex-1 hidden" > < / div >
< div id = "chat-messages" class = "chat-messages flex-1 hidden" > < / div >
< div id = "chat-input-area" class = "message-input-area w-full !w-full !max-w-none flex-shrink-0 px-6 py-4 mt-auto hidden z-20" >
< div id = "chat-input-area"
class="message-input-area w-full !w-full !max-w-none flex-shrink-0 px-6 py-4 mt-auto hidden z-20">
< form id = "chat-form" class = "flex items-end gap-3 w-full !w-full !max-w-none m-0" >
< form id = "chat-form" class = "flex items-end gap-3 w-full !w-full !max-w-none m-0" >
< div class = "telegram-input-container flex-1 w-full flex items-end" >
< div class = "telegram-input-container flex-1 w-full flex items-end" >
< textarea id = "chat-input" class = "telegram-message-input w-full resize-none overflow-y-auto chat-scrollbar"
rows="1" placeholder="{% trans 'Type your message...' %}" style="min-height: 24px; max-height: 150px; line-height: 1.5;">< / textarea >
< textarea id = "chat-input"
class="telegram-message-input w-full resize-none overflow-y-auto chat-scrollbar" rows="1"
placeholder="{% trans 'Type your message...' %}"
style="min-height: 24px; max-height: 150px; line-height: 1.5;">< / textarea >
< / div >
< / div >
< button type = "submit" id = "send-btn" class = "telegram-action-btn send-btn-telegram shadow-md" >
< button type = "submit" id = "send-btn" class = "telegram-action-btn send-btn-telegram shadow-md" >
< span class = "material-symbols-outlined text-[20px] ml-1" > send< / span >
< span class = "material-symbols-outlined text-[20px] ml-1" > send< / span >
@ -147,7 +148,15 @@
apiUrlMessagesBase: '{% url "admin:live_chat_api_messages" room_id=0 %}'.replace('0/', ''),
apiUrlMessagesBase: '{% url "admin:live_chat_api_messages" room_id=0 %}'.replace('0/', ''),
apiUrlSendBase: '{% url "admin:live_chat_api_send" room_id=0 %}'.replace('0/', ''),
apiUrlSendBase: '{% url "admin:live_chat_api_send" room_id=0 %}'.replace('0/', ''),
apiUrlUsers: '{% url "admin:live_chat_api_users" %}', // روت جدید برای گرفتن کاربران
apiUrlUsers: '{% url "admin:live_chat_api_users" %}', // روت جدید برای گرفتن کاربران
apiUrlCreateRoom: '{% url "admin:live_chat_api_create_room" %}' // روت جدید برای ساخت روم
apiUrlCreateRoom: '{% url "admin:live_chat_api_create_room" %}', // روت جدید برای ساخت روم
trans: {
failedToLoadUsers: "{% trans 'Failed to load users.' %}",
noUsersFound: "{% trans 'No users found.' %}",
noActiveChatsFound: "{% trans 'No active chats found.' %}",
groupChat: "{% trans 'Group Chat' %}",
privateChat: "{% trans 'Private Chat' %}",
noMessagesYet: "{% trans 'No messages yet. Start the conversation!' %}"
}
};
};
< / script >
< / script >
< script src = "{% static 'js/live_chat.js' %}" > < / script >
< script src = "{% static 'js/live_chat.js' %}" > < / script >