Compare commits

..

2 Commits

2 changed files with 5 additions and 1 deletions

3
app.js
View File

@ -631,6 +631,7 @@ function addFileMessage(from, fileName, fileUrl, fileType, avatar, topic) {
const $img = document.createElement('img'); const $img = document.createElement('img');
$img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; $img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40';
$img.classList.add('avatar'); $img.classList.add('avatar');
$img.draggable = false;
$div.appendChild($img); $div.appendChild($img);
const $content = document.createElement('div'); const $content = document.createElement('div');
@ -695,6 +696,7 @@ function onMessageAdded(from, message, avatar, topic, timestamp) {
const $img = document.createElement('img'); const $img = document.createElement('img');
$img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; // Default to a placeholder image if avatar URL is not provided $img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; // Default to a placeholder image if avatar URL is not provided
$img.classList.add('avatar'); $img.classList.add('avatar');
$img.draggable = false;
$div.appendChild($img); $div.appendChild($img);
const $content = document.createElement('div'); const $content = document.createElement('div');
@ -777,6 +779,7 @@ function addAudioMessage(from, audioUrl, avatar, topic) {
const $img = document.createElement('img'); const $img = document.createElement('img');
$img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; $img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40';
$img.classList.add('avatar'); $img.classList.add('avatar');
$img.draggable = false;
$div.appendChild($img); $div.appendChild($img);
const $content = document.createElement('div'); const $content = document.createElement('div');

View File

@ -444,6 +444,7 @@ main {
border-radius: 50%; border-radius: 50%;
margin-right: 0.5rem; margin-right: 0.5rem;
border: 2px solid #464343; border: 2px solid #464343;
user-select: none;
} }
.message-content { .message-content {