diff --git a/app/resources/template.html b/app/resources/template.html
index 931b25c..5f37bb8 100644
--- a/app/resources/template.html
+++ b/app/resources/template.html
@@ -161,7 +161,7 @@ body{
color: darkgray;
}
-.chat-image img{
+.chat-image img,.chat-file img{
margin-right: 18px;
margin-left: 18px;
max-width: 300px;
@@ -184,6 +184,29 @@ audio{
margin-left: 9px;
margin-right: 9px;
}
+
+.chat-file {
+ width: 300px;
+ background-color: #fff;
+ margin-right: 20px;
+}
+.chat-file a ,.chat-file div{
+ display: flex;
+ color: #000;
+ outline: none;
+ text-decoration: none;
+ margin: 0 20px 20px 20px;
+}
+.chat-file div{
+ margin: 20px;
+}
+.chat-file a span ,.chat-file div span{
+ /* flex-grow: 1; */
+ width: 200px;
+}
+.chat-file a img,.chat-file div img{
+ width: 100px;
+}
.input-area{
border-top:0.5px solid #e0e0e0;
height: 150px;
@@ -361,9 +384,9 @@ input {
// 计算当前页应该显示的元素范围
const startIndex = (page - 1) * itemsPerPage;
const endIndex = startIndex + itemsPerPage;
-
+
function replaceEmoji(text){
-
+
// 定义替换规则,可以根据需要添加更多规则
var replacementRules = [
{ pattern: /\[微笑\]/g, replacement: '' },
@@ -534,8 +557,19 @@ input {
messageAudioTag.innerHTML = ``;
return messageAudioTag;
}
+ function messageFileBox(message) {
+ const messageFileTag = document.createElement('div');
+ messageFileTag.className = `chat-file`;
+ if (message.link !== ''){
+ messageFileTag.innerHTML = `
+ ${message.file_name}
`
+ }else{
+ messageFileTag.innerHTML = `