From 0894092325fed8ed63119fcb432a8ab41a708db7 Mon Sep 17 00:00:00 2001
From: 2977094657 <2977094657@qq.com>
Date: Mon, 29 Dec 2025 13:41:34 +0800
Subject: [PATCH] =?UTF-8?q?feat(chat):=20=E5=89=8D=E7=AB=AF=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E6=B6=88=E6=81=AF=E7=B1=BB=E5=9E=8B=E7=AD=9B=E9=80=89?=
=?UTF-8?q?=E4=B8=8E=E6=8C=89=E7=B1=BB=E5=9E=8B=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 聊天页新增消息类型筛选下拉框(render_types)
- 导出弹窗新增“消息类型(导出内容)”多选与快捷项,并明确离线媒体不影响消息条数
- createChatExport 透传 message_types;图片本地 URL 可同时携带 md5+file_id
- 增加 message-filter-select 样式
---
frontend/assets/css/tailwind.css | 4 +
frontend/composables/useApi.js | 2 +
frontend/pages/chat/[[username]].vue | 146 +++++++++++++++++++++++++--
3 files changed, 146 insertions(+), 6 deletions(-)
diff --git a/frontend/assets/css/tailwind.css b/frontend/assets/css/tailwind.css
index cd5d01a..6fb94bf 100644
--- a/frontend/assets/css/tailwind.css
+++ b/frontend/assets/css/tailwind.css
@@ -584,6 +584,10 @@
@apply bg-[#03C160]/15;
}
+ .message-filter-select {
+ @apply text-xs px-2 py-1.5 rounded-lg bg-white border border-gray-200 text-gray-700 focus:outline-none focus:ring-2 focus:ring-[#03C160]/20 focus:border-[#03C160] transition-all disabled:opacity-50 disabled:cursor-not-allowed;
+ }
+
/* 搜索侧边栏样式 */
.search-sidebar {
@apply w-[420px] h-full flex flex-col bg-white border-l border-gray-200 flex-shrink-0;
diff --git a/frontend/composables/useApi.js b/frontend/composables/useApi.js
index 28e6de0..a7d7967 100644
--- a/frontend/composables/useApi.js
+++ b/frontend/composables/useApi.js
@@ -80,6 +80,7 @@ export const useApi = () => {
if (params && params.limit != null) query.set('limit', String(params.limit))
if (params && params.offset != null) query.set('offset', String(params.offset))
if (params && params.order) query.set('order', params.order)
+ if (params && params.render_types) query.set('render_types', params.render_types)
const url = '/chat/messages' + (query.toString() ? `?${query.toString()}` : '')
return await request(url)
}
@@ -209,6 +210,7 @@ export const useApi = () => {
end_time: data.end_time != null ? Number(data.end_time) : null,
include_hidden: !!data.include_hidden,
include_official: !!data.include_official,
+ message_types: Array.isArray(data.message_types) ? data.message_types : [],
include_media: data.include_media == null ? true : !!data.include_media,
media_kinds: Array.isArray(data.media_kinds) ? data.media_kinds : ['image', 'emoji', 'video', 'video_thumb', 'voice', 'file'],
allow_process_key_extract: !!data.allow_process_key_extract,
diff --git a/frontend/pages/chat/[[username]].vue b/frontend/pages/chat/[[username]].vue
index ad8a0c7..6785c96 100644
--- a/frontend/pages/chat/[[username]].vue
+++ b/frontend/pages/chat/[[username]].vue
@@ -161,6 +161,16 @@
导出
+