vue-chat-kit 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-chat-kit.css +1 -1
- package/dist/vue-chat-kit.es.js +4426 -2819
- package/dist/vue-chat-kit.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/AvatarCrop.vue +16 -127
- package/src/components/ChatPanel.vue +491 -2675
- package/src/components/EmojiPicker.vue +2 -73
- package/src/components/chat/ChatWindow.vue +177 -0
- package/src/components/chat/ContentList.vue +300 -0
- package/src/components/chat/ContextMenu.vue +32 -0
- package/src/components/chat/GroupSidebar.vue +284 -0
- package/src/components/chat/MainArea.vue +87 -0
- package/src/components/chat/Sidebar.vue +52 -0
- package/src/components/chat/dialogs/AddFriendDialog.vue +62 -0
- package/src/components/chat/dialogs/CreateGroupDialog.vue +86 -0
- package/src/components/chat/dialogs/GroupDetailDialog.vue +132 -0
- package/src/components/ui/Button.vue +190 -0
- package/src/components/ui/Dialog.vue +194 -0
- package/src/components/ui/Empty.vue +66 -0
- package/src/components/ui/Input.vue +166 -0
- package/src/components/ui/Message.vue +186 -0
- package/src/components/ui/MessageBox.vue +143 -0
- package/src/components/ui/MessageManager.vue +92 -0
- package/src/components/ui/Switch.vue +65 -0
- package/src/components/ui/Tag.vue +68 -0
- package/src/components/ui/icons/ArrowDown.vue +5 -0
- package/src/components/ui/icons/ArrowRight.vue +5 -0
- package/src/components/ui/icons/Bell.vue +6 -0
- package/src/components/ui/icons/Camera.vue +6 -0
- package/src/components/ui/icons/ChatDotRound.vue +5 -0
- package/src/components/ui/icons/Check.vue +5 -0
- package/src/components/ui/icons/CircleCheck.vue +6 -0
- package/src/components/ui/icons/Clock.vue +6 -0
- package/src/components/ui/icons/Close.vue +5 -0
- package/src/components/ui/icons/Delete.vue +8 -0
- package/src/components/ui/icons/Edit.vue +6 -0
- package/src/components/ui/icons/Folder.vue +5 -0
- package/src/components/ui/icons/Minus.vue +5 -0
- package/src/components/ui/icons/Monitor.vue +7 -0
- package/src/components/ui/icons/Moon.vue +5 -0
- package/src/components/ui/icons/Picture.vue +7 -0
- package/src/components/ui/icons/Plus.vue +5 -0
- package/src/components/ui/icons/Search.vue +6 -0
- package/src/components/ui/icons/Setting.vue +6 -0
- package/src/components/ui/icons/Sunny.vue +6 -0
- package/src/components/ui/icons/User.vue +6 -0
- package/src/components/ui/icons/UserFilled.vue +6 -0
- package/src/components/ui/icons/Warning.vue +5 -0
- package/src/components/ui/icons/index.js +24 -0
- package/src/components/ui/index.js +10 -0
- package/src/composables/useFriendChat.js +10 -14
- package/src/composables/useGroupChat.js +140 -48
- package/src/composables/useMessage.js +21 -0
- package/src/composables/useMessageBox.js +98 -0
- package/src/composables/useTheme.js +140 -0
- package/src/config/index.js +1 -0
- package/src/const/index.js +1 -0
- package/src/const/theme.js +19 -0
- package/src/core/api.js +13 -2
- package/src/index.js +5 -5
- package/src/styles/_base.scss +38 -0
- package/src/styles/_variables.scss +43 -0
- package/src/styles/components/_add-friend-dialog.scss +45 -0
- package/src/styles/components/_avatar-crop.scss +120 -0
- package/src/styles/components/_chat-panel.scss +546 -0
- package/src/styles/components/_chat-window.scss +239 -0
- package/src/styles/components/_content-list.scss +260 -0
- package/src/styles/components/_context-menu.scss +35 -0
- package/src/styles/components/_create-group-dialog.scss +78 -0
- package/src/styles/components/_dialogs.scss +226 -0
- package/src/styles/components/_emoji-picker.scss +74 -0
- package/src/styles/components/_group-detail-dialog.scss +110 -0
- package/src/styles/components/_group-sidebar.scss +278 -0
- package/src/styles/components/_main-area.scss +94 -0
- package/src/styles/components/_sidebar.scss +83 -0
- package/src/styles/index.scss +18 -0
- package/src/styles/themes/_dark.scss +68 -0
- package/src/styles/themes/_index.scss +7 -0
- package/src/styles/themes/_light.scss +69 -0
|
@@ -1,713 +1,146 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="chat-panel">
|
|
2
|
+
<div class="chat-panel" :data-theme="appliedTheme">
|
|
3
3
|
<!-- 左侧图标导航栏 -->
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:class="[
|
|
13
|
-
'sidebar-nav-item',
|
|
14
|
-
currentNavTab === tab.id ? 'sidebar-nav-item-active' : 'sidebar-nav-item-inactive'
|
|
15
|
-
]"
|
|
16
|
-
@click="currentNavTab = tab.id"
|
|
17
|
-
>
|
|
18
|
-
<el-icon :size="24">
|
|
19
|
-
<component :is="tab.icon" />
|
|
20
|
-
</el-icon>
|
|
21
|
-
<span v-if="tab.badge" class="sidebar-nav-badge">
|
|
22
|
-
{{ tab.badge > 99 ? '99+' : tab.badge }}
|
|
23
|
-
</span>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div class="sidebar-spacer"></div>
|
|
27
|
-
|
|
28
|
-
<div
|
|
29
|
-
v-if="config.modules.settings"
|
|
30
|
-
class="sidebar-nav-item sidebar-nav-item-inactive"
|
|
31
|
-
@click="showSettingsDialog = true"
|
|
32
|
-
title="设置"
|
|
33
|
-
>
|
|
34
|
-
<el-icon :size="24"><Setting /></el-icon>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
4
|
+
<Sidebar
|
|
5
|
+
:my-avatar="myAvatar"
|
|
6
|
+
:nav-tabs="navTabs"
|
|
7
|
+
v-model:current-nav-tab="currentNavTab"
|
|
8
|
+
:config="config"
|
|
9
|
+
@avatar-click="handleAvatarClick"
|
|
10
|
+
@settings-click="showSettingsDialog = true"
|
|
11
|
+
/>
|
|
37
12
|
|
|
38
13
|
<!-- 中间内容栏 -->
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
@click="selectChat(chat)"
|
|
62
|
-
@contextmenu.prevent.stop="showContextMenuFn($event, chat)"
|
|
63
|
-
>
|
|
64
|
-
<div class="chat-list-avatar-wrapper">
|
|
65
|
-
<img
|
|
66
|
-
:src="chat.avatar"
|
|
67
|
-
:alt="chat.name"
|
|
68
|
-
class="chat-list-avatar"
|
|
69
|
-
/>
|
|
70
|
-
<span
|
|
71
|
-
v-if="chat.online"
|
|
72
|
-
class="chat-list-online-indicator"
|
|
73
|
-
></span>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="chat-list-info">
|
|
76
|
-
<div class="chat-list-header">
|
|
77
|
-
<span class="chat-list-name">{{ chat.name }}</span>
|
|
78
|
-
<span class="chat-list-time">{{ formatLastTime(chat.lastTime) }}</span>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="chat-list-preview">
|
|
81
|
-
<span class="chat-list-last-msg">{{ chat.lastMsg }}</span>
|
|
82
|
-
<span
|
|
83
|
-
v-if="chat.unread > 0"
|
|
84
|
-
class="chat-list-unread"
|
|
85
|
-
>
|
|
86
|
-
{{ chat.unread > 99 ? '99+' : chat.unread }}
|
|
87
|
-
</span>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<!-- 好友列表 -->
|
|
94
|
-
<div v-if="currentNavTab === 'friends' && config.modules.friends">
|
|
95
|
-
<div class="add-friend-section">
|
|
96
|
-
<div
|
|
97
|
-
class="add-friend-btn"
|
|
98
|
-
@click="openAddFriendDialog"
|
|
99
|
-
>
|
|
100
|
-
<div class="add-friend-icon">
|
|
101
|
-
<el-icon class="text-white" :size="20"><Plus /></el-icon>
|
|
102
|
-
</div>
|
|
103
|
-
<span class="add-friend-text">添加好友</span>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
<div
|
|
107
|
-
v-for="friend in filteredFriendList"
|
|
108
|
-
:key="friend.id"
|
|
109
|
-
class="chat-list-item"
|
|
110
|
-
@click="selectFriend(friend)"
|
|
111
|
-
>
|
|
112
|
-
<div class="chat-list-avatar-wrapper">
|
|
113
|
-
<img
|
|
114
|
-
:src="friend.avatar"
|
|
115
|
-
:alt="friend.name"
|
|
116
|
-
class="chat-list-avatar"
|
|
117
|
-
/>
|
|
118
|
-
<span
|
|
119
|
-
:class="[
|
|
120
|
-
'chat-list-online-indicator',
|
|
121
|
-
friend.online ? 'chat-list-online' : 'chat-list-offline'
|
|
122
|
-
]"
|
|
123
|
-
></span>
|
|
124
|
-
</div>
|
|
125
|
-
<div class="chat-list-info">
|
|
126
|
-
<span class="chat-list-name">{{ friend.name }}</span>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<!-- 申请列表 -->
|
|
132
|
-
<div v-if="currentNavTab === 'apply' && config.modules.apply">
|
|
133
|
-
<el-empty v-if="loadingFriendApply" description="加载中..." />
|
|
134
|
-
<el-empty
|
|
135
|
-
v-else-if="friendApplyList.length === 0"
|
|
136
|
-
description="暂无好友申请"
|
|
137
|
-
/>
|
|
138
|
-
<div
|
|
139
|
-
v-else
|
|
140
|
-
v-for="apply in friendApplyList"
|
|
141
|
-
:key="apply.applyUser || apply.id"
|
|
142
|
-
class="friend-request-item"
|
|
143
|
-
>
|
|
144
|
-
<div class="friend-request-info">
|
|
145
|
-
<img
|
|
146
|
-
:src="`https://api.dicebear.com/7.x/avataaars/svg?seed=${apply.applyUser}`"
|
|
147
|
-
:alt="apply.applyUser"
|
|
148
|
-
class="friend-request-avatar"
|
|
149
|
-
/>
|
|
150
|
-
<div class="friend-request-details">
|
|
151
|
-
<div class="friend-request-username">{{ apply.applyUser }}</div>
|
|
152
|
-
<div class="friend-request-desc">请求添加你为好友</div>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
<el-button
|
|
156
|
-
type="primary"
|
|
157
|
-
size="small"
|
|
158
|
-
@click="agreeFriend(apply.applyUser)"
|
|
159
|
-
>同意</el-button>
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<!-- 群聊列表 -->
|
|
164
|
-
<div v-if="currentNavTab === 'groups' && config.modules.groups">
|
|
165
|
-
<div class="add-friend-section">
|
|
166
|
-
<div
|
|
167
|
-
class="add-friend-btn"
|
|
168
|
-
@click="createGroupDialogVisible = true"
|
|
169
|
-
>
|
|
170
|
-
<div class="add-friend-icon">
|
|
171
|
-
<el-icon class="text-white" :size="20"><Plus /></el-icon>
|
|
172
|
-
</div>
|
|
173
|
-
<span class="add-friend-text">创建群聊</span>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
<div
|
|
177
|
-
v-for="group in filteredGroupList"
|
|
178
|
-
:key="group.groupId"
|
|
179
|
-
:class="[
|
|
180
|
-
'chat-list-item',
|
|
181
|
-
currentSelectGroup?.groupId === group.groupId ? 'chat-list-item-active' : ''
|
|
182
|
-
]"
|
|
183
|
-
@click="selectGroupChat(group)"
|
|
184
|
-
>
|
|
185
|
-
<div class="chat-list-avatar-wrapper">
|
|
186
|
-
<!-- 多方格群聊头像 -->
|
|
187
|
-
<div v-if="group.memberAvatars && group.memberAvatars.length > 0" class="group-avatar-grid">
|
|
188
|
-
<div
|
|
189
|
-
v-for="(member, index) in group.memberAvatars"
|
|
190
|
-
:key="member.username"
|
|
191
|
-
class="group-avatar-item"
|
|
192
|
-
:style="getGroupAvatarGridStyle(group.memberAvatars.length, index)"
|
|
193
|
-
>
|
|
194
|
-
<img
|
|
195
|
-
:src="member.avatar"
|
|
196
|
-
:alt="member.username"
|
|
197
|
-
class="group-avatar-img"
|
|
198
|
-
/>
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
<!-- 单个头像作为后备 -->
|
|
202
|
-
<img
|
|
203
|
-
v-else
|
|
204
|
-
:src="group.avatar"
|
|
205
|
-
:alt="group.name"
|
|
206
|
-
class="chat-list-avatar"
|
|
207
|
-
/>
|
|
208
|
-
</div>
|
|
209
|
-
<div class="chat-list-info">
|
|
210
|
-
<div class="chat-list-header">
|
|
211
|
-
<span class="chat-list-name">{{ group.name }}</span>
|
|
212
|
-
<span class="chat-list-time">{{ formatLastTime(group.lastTime) }}</span>
|
|
213
|
-
</div>
|
|
214
|
-
<div class="chat-list-preview">
|
|
215
|
-
<span class="chat-list-last-msg">{{ group.lastMsg }}</span>
|
|
216
|
-
<span
|
|
217
|
-
v-if="group.unread > 0"
|
|
218
|
-
class="chat-list-unread"
|
|
219
|
-
>
|
|
220
|
-
{{ group.unread > 99 ? '99+' : group.unread }}
|
|
221
|
-
</span>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
14
|
+
<ContentList
|
|
15
|
+
v-model:search-text="searchText"
|
|
16
|
+
:current-nav-tab="currentNavTab"
|
|
17
|
+
:config="config"
|
|
18
|
+
:combined-chat-list="combinedChatList"
|
|
19
|
+
:filtered-friend-list="filteredFriendList"
|
|
20
|
+
:filtered-group-list="filteredGroupList"
|
|
21
|
+
:current-chat-id="currentChatId"
|
|
22
|
+
:current-select-group="currentSelectGroup"
|
|
23
|
+
:current-selected-group="currentSelectedGroup"
|
|
24
|
+
:loading-friend-apply="loadingFriendApply"
|
|
25
|
+
:friend-apply-list="friendApplyList"
|
|
26
|
+
:format-last-time="formatLastTime"
|
|
27
|
+
@add-friend="openAddFriendDialog"
|
|
28
|
+
@create-group="createGroupDialogVisible = true"
|
|
29
|
+
@select-chat="selectChat"
|
|
30
|
+
@select-group-chat="selectGroupChat"
|
|
31
|
+
@select-friend="selectFriend"
|
|
32
|
+
@select-group="selectGroup"
|
|
33
|
+
@agree-friend="agreeFriend"
|
|
34
|
+
@contextmenu="showContextMenuFn"
|
|
35
|
+
/>
|
|
228
36
|
|
|
229
37
|
<!-- 右侧聊天/详情区域 -->
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
@
|
|
252
|
-
class="profile-start-chat-btn"
|
|
253
|
-
>
|
|
254
|
-
<el-icon><ChatDotRound /></el-icon>
|
|
255
|
-
<span>发消息</span>
|
|
256
|
-
</el-button>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<!-- 聊天窗口(群聊或单聊) -->
|
|
260
|
-
<div v-if="currentChat || currentSelectGroup" class="chat-window-area">
|
|
261
|
-
<!-- 顶部标题栏 -->
|
|
262
|
-
<div class="chat-window-header">
|
|
263
|
-
<div class="chat-window-title">
|
|
264
|
-
<span class="chat-window-name">{{ currentSelectGroup ? currentSelectGroup.name : currentChat.name }}</span>
|
|
265
|
-
<span
|
|
266
|
-
v-if="!currentSelectGroup"
|
|
267
|
-
:class="[
|
|
268
|
-
'chat-window-status',
|
|
269
|
-
currentChat.online ? 'chat-window-status-online' : 'chat-window-status-offline'
|
|
270
|
-
]"
|
|
271
|
-
>
|
|
272
|
-
{{ currentChat.online ? '在线' : '离线' }}
|
|
273
|
-
</span>
|
|
274
|
-
<span v-if="currentSelectGroup" class="chat-window-status">
|
|
275
|
-
{{ groupMemberList.length }} 人
|
|
276
|
-
</span>
|
|
277
|
-
</div>
|
|
278
|
-
<div class="chat-window-actions">
|
|
279
|
-
<el-icon class="chat-action-icon"><Search /></el-icon>
|
|
280
|
-
<el-icon
|
|
281
|
-
v-if="currentSelectGroup"
|
|
282
|
-
class="chat-action-icon"
|
|
283
|
-
@click="showGroupSidebar = !showGroupSidebar"
|
|
284
|
-
><MoreFilled /></el-icon>
|
|
285
|
-
<el-icon
|
|
286
|
-
v-else
|
|
287
|
-
class="chat-action-icon"
|
|
288
|
-
@click="showChatDetail = !showChatDetail"
|
|
289
|
-
><MoreFilled /></el-icon>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
|
|
293
|
-
<!-- 聊天消息区域 -->
|
|
294
|
-
<div
|
|
295
|
-
ref="messagesContainer"
|
|
296
|
-
class="chat-messages-container"
|
|
38
|
+
<MainArea
|
|
39
|
+
:current-selected-friend="currentSelectedFriend"
|
|
40
|
+
:current-selected-group="currentSelectedGroup"
|
|
41
|
+
:current-chat="currentChat"
|
|
42
|
+
:current-select-group="currentSelectGroup"
|
|
43
|
+
:current-nav-tab="currentNavTab"
|
|
44
|
+
@start-chat="handleStartChat"
|
|
45
|
+
@start-group-chat="handleStartGroupChat"
|
|
46
|
+
>
|
|
47
|
+
<template #chat-window>
|
|
48
|
+
<ChatWindow
|
|
49
|
+
ref="chatWindowRef"
|
|
50
|
+
:current-chat="currentChat"
|
|
51
|
+
:current-select-group="currentSelectGroup"
|
|
52
|
+
:group-member-list="groupMemberList"
|
|
53
|
+
:messages="currentSelectGroup ? currentGroupMessages : currentMessages"
|
|
54
|
+
:format-time="formatTime"
|
|
55
|
+
:format-file-size="formatFileSize"
|
|
56
|
+
@toggle-group-sidebar="showGroupSidebar = !showGroupSidebar"
|
|
57
|
+
@toggle-chat-detail="showChatDetail = !showChatDetail"
|
|
58
|
+
@open-file="openFile"
|
|
59
|
+
@hide-emoji="showEmojiPicker = false"
|
|
297
60
|
>
|
|
298
|
-
<
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
>
|
|
306
|
-
<!-- 头像 -->
|
|
307
|
-
<div class="message-avatar">
|
|
308
|
-
<img
|
|
309
|
-
:src="msg.avatar"
|
|
310
|
-
class="message-avatar-img"
|
|
311
|
-
/>
|
|
312
|
-
</div>
|
|
313
|
-
|
|
314
|
-
<!-- 消息内容 -->
|
|
315
|
-
<div
|
|
316
|
-
:class="[
|
|
317
|
-
'message-content',
|
|
318
|
-
msg.isSelf ? 'message-content-self' : 'message-content-other'
|
|
319
|
-
]"
|
|
320
|
-
>
|
|
321
|
-
<div v-if="!msg.isSelf" class="message-sender-name">
|
|
322
|
-
{{ currentSelectGroup ? (msg.displayName || msg.sendUsername) : currentChat.name }}
|
|
323
|
-
</div>
|
|
324
|
-
|
|
325
|
-
<div class="message-bubble-wrapper">
|
|
326
|
-
<!-- 文本消息 -->
|
|
327
|
-
<div
|
|
328
|
-
v-if="msg.type === 'text'"
|
|
329
|
-
:class="[
|
|
330
|
-
'message-bubble',
|
|
331
|
-
msg.isSelf ? 'message-bubble-self' : 'message-bubble-other'
|
|
332
|
-
]"
|
|
333
|
-
>
|
|
334
|
-
{{ msg.text }}
|
|
335
|
-
</div>
|
|
336
|
-
|
|
337
|
-
<!-- 图片文件消息 -->
|
|
338
|
-
<div
|
|
339
|
-
v-else-if="msg.type === 'file' && msg.fileType === 'image'"
|
|
340
|
-
:class="[
|
|
341
|
-
'message-bubble',
|
|
342
|
-
'message-image-bubble',
|
|
343
|
-
msg.isSelf ? 'message-bubble-self' : 'message-bubble-other'
|
|
344
|
-
]"
|
|
345
|
-
@click="openFile(msg.fileUrl)"
|
|
346
|
-
>
|
|
347
|
-
<img
|
|
348
|
-
:src="msg.fileUrl"
|
|
349
|
-
:alt="msg.fileName"
|
|
350
|
-
class="message-image"
|
|
351
|
-
@error="handleImageError"
|
|
352
|
-
/>
|
|
353
|
-
<div v-if="msg.fileSize" class="message-image-size">{{ formatFileSize(msg.fileSize) }}</div>
|
|
61
|
+
<template #input-area>
|
|
62
|
+
<!-- 待发送文件预览 -->
|
|
63
|
+
<div v-if="pendingFiles.length > 0" class="pending-files-area">
|
|
64
|
+
<div v-for="(file, index) in pendingFiles" :key="file.id" class="pending-file-item">
|
|
65
|
+
<div v-if="file.isImage" class="pending-image-wrapper">
|
|
66
|
+
<img :src="file.previewUrl" :alt="file.name" class="pending-image" />
|
|
67
|
+
<button @click="removePendingFile(index)" class="pending-file-remove-btn">×</button>
|
|
354
68
|
</div>
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
:class="[
|
|
360
|
-
'message-bubble',
|
|
361
|
-
'message-file-bubble',
|
|
362
|
-
msg.isSelf ? 'message-bubble-self' : 'message-bubble-other'
|
|
363
|
-
]"
|
|
364
|
-
@click="openFile(msg.fileUrl)"
|
|
365
|
-
>
|
|
366
|
-
<div class="message-file-content">
|
|
367
|
-
<div class="message-file-icon">
|
|
368
|
-
<el-icon :size="28"><Document /></el-icon>
|
|
369
|
-
</div>
|
|
370
|
-
<div class="message-file-info">
|
|
371
|
-
<div class="message-file-name">{{ msg.fileName || msg.text }}</div>
|
|
372
|
-
<div class="message-file-meta">
|
|
373
|
-
<el-icon :size="12"><Download /></el-icon>
|
|
374
|
-
<span>点击下载</span>
|
|
375
|
-
<span v-if="msg.fileSize">· {{ formatFileSize(msg.fileSize) }}</span>
|
|
376
|
-
</div>
|
|
377
|
-
</div>
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
|
|
381
|
-
<!-- 时间显示在气泡下方 -->
|
|
382
|
-
<div
|
|
383
|
-
:class="[
|
|
384
|
-
'message-time',
|
|
385
|
-
msg.isSelf ? 'message-time-right' : 'message-time-left'
|
|
386
|
-
]"
|
|
387
|
-
>
|
|
388
|
-
{{ formatTime(msg.time) }}
|
|
69
|
+
<div v-else class="pending-file-wrapper">
|
|
70
|
+
<span class="pending-file-icon"><Folder /></span>
|
|
71
|
+
<span class="pending-file-name">{{ file.name }}</span>
|
|
72
|
+
<button @click="removePendingFile(index)" class="pending-file-remove-btn">×</button>
|
|
389
73
|
</div>
|
|
390
74
|
</div>
|
|
391
75
|
</div>
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
76
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
v-if="pendingFiles.length > 0"
|
|
400
|
-
class="pending-files-area"
|
|
401
|
-
>
|
|
402
|
-
<div
|
|
403
|
-
v-for="(file, index) in pendingFiles"
|
|
404
|
-
:key="file.id"
|
|
405
|
-
class="pending-file-item"
|
|
406
|
-
>
|
|
407
|
-
<!-- 图片预览 -->
|
|
408
|
-
<div
|
|
409
|
-
v-if="file.isImage"
|
|
410
|
-
class="pending-image-wrapper"
|
|
411
|
-
>
|
|
412
|
-
<img
|
|
413
|
-
:src="file.previewUrl"
|
|
414
|
-
:alt="file.name"
|
|
415
|
-
class="pending-image"
|
|
416
|
-
/>
|
|
417
|
-
<button
|
|
418
|
-
@click="removePendingFile(index)"
|
|
419
|
-
class="pending-file-remove-btn"
|
|
420
|
-
>
|
|
421
|
-
×
|
|
422
|
-
</button>
|
|
423
|
-
</div>
|
|
424
|
-
<!-- 非图片文件预览 -->
|
|
425
|
-
<div
|
|
426
|
-
v-else
|
|
427
|
-
class="pending-file-wrapper"
|
|
428
|
-
>
|
|
429
|
-
<el-icon class="pending-file-icon"><Folder /></el-icon>
|
|
430
|
-
<span class="pending-file-name">{{ file.name }}</span>
|
|
431
|
-
<button
|
|
432
|
-
@click="removePendingFile(index)"
|
|
433
|
-
class="pending-file-remove-btn"
|
|
434
|
-
>
|
|
435
|
-
×
|
|
436
|
-
</button>
|
|
77
|
+
<div v-if="config.modules.fileUpload" class="input-toolbar">
|
|
78
|
+
<div class="emoji-button-wrapper">
|
|
79
|
+
<span class="input-toolbar-icon" @click.stop="showEmojiPicker = !showEmojiPicker"><ChatDotRound /></span>
|
|
80
|
+
<EmojiPicker :visible="showEmojiPicker" @select="selectEmoji" />
|
|
437
81
|
</div>
|
|
82
|
+
<span class="input-toolbar-icon" @click="triggerFileSelect"><Folder /></span>
|
|
83
|
+
<span class="input-toolbar-icon"><Picture /></span>
|
|
438
84
|
</div>
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
<EmojiPicker
|
|
448
|
-
:visible="showEmojiPicker"
|
|
449
|
-
@select="selectEmoji"
|
|
85
|
+
<div class="input-textarea-wrapper">
|
|
86
|
+
<textarea
|
|
87
|
+
v-model="inputText"
|
|
88
|
+
@keydown.enter.prevent="handleSend"
|
|
89
|
+
@paste="handlePaste"
|
|
90
|
+
placeholder="输入消息或粘贴文件..."
|
|
91
|
+
class="message-input-textarea"
|
|
92
|
+
rows="3"
|
|
450
93
|
/>
|
|
451
94
|
</div>
|
|
452
|
-
<
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
<textarea
|
|
460
|
-
v-model="inputText"
|
|
461
|
-
@keydown.enter.prevent="handleSend"
|
|
462
|
-
@paste="handlePaste"
|
|
463
|
-
placeholder="输入消息或粘贴文件..."
|
|
464
|
-
class="message-input-textarea"
|
|
465
|
-
rows="3"
|
|
466
|
-
/>
|
|
467
|
-
</div>
|
|
468
|
-
<div class="input-send-wrapper">
|
|
469
|
-
<el-button
|
|
470
|
-
type="primary"
|
|
471
|
-
:disabled="!inputText.trim() && pendingFiles.length === 0"
|
|
472
|
-
@click="handleSend"
|
|
473
|
-
class="send-message-btn"
|
|
474
|
-
>
|
|
475
|
-
发送
|
|
476
|
-
</el-button>
|
|
477
|
-
</div>
|
|
478
|
-
|
|
479
|
-
<!-- 隐藏的文件 input -->
|
|
480
|
-
<input
|
|
481
|
-
ref="fileInputRef"
|
|
482
|
-
type="file"
|
|
483
|
-
multiple
|
|
484
|
-
class="hidden-file-input"
|
|
485
|
-
@change="handleFileSelect"
|
|
486
|
-
/>
|
|
487
|
-
</div>
|
|
488
|
-
</div>
|
|
489
|
-
|
|
490
|
-
<!-- 空状态 -->
|
|
491
|
-
<div
|
|
492
|
-
v-else-if="!currentSelectedFriend"
|
|
493
|
-
class="chat-empty-state"
|
|
494
|
-
>
|
|
495
|
-
<el-icon :size="64" class="empty-state-icon"><ChatLineRound /></el-icon>
|
|
496
|
-
<div class="empty-state-text">
|
|
497
|
-
{{ currentNavTab === 'apply' ? '在左侧选择好友申请' : '在左侧选择好友开始聊天' }}
|
|
498
|
-
</div>
|
|
499
|
-
</div>
|
|
500
|
-
</div>
|
|
501
|
-
|
|
502
|
-
<!-- 群聊侧边栏 -->
|
|
503
|
-
<transition name="slide">
|
|
504
|
-
<div
|
|
505
|
-
v-if="showGroupSidebar && currentSelectGroup"
|
|
506
|
-
class="group-sidebar"
|
|
507
|
-
>
|
|
508
|
-
<!-- 关闭按钮 -->
|
|
509
|
-
<div class="group-sidebar-header">
|
|
510
|
-
<span class="group-sidebar-title">群聊信息</span>
|
|
511
|
-
<el-icon class="group-sidebar-close" @click="showGroupSidebar = false">
|
|
512
|
-
<Close />
|
|
513
|
-
</el-icon>
|
|
514
|
-
</div>
|
|
515
|
-
|
|
516
|
-
<div class="group-sidebar-content">
|
|
517
|
-
<!-- 群成员头像展示区 -->
|
|
518
|
-
<div class="group-members-avatar-section">
|
|
519
|
-
<div class="group-members-grid">
|
|
520
|
-
<div
|
|
521
|
-
v-for="member in groupMemberList.slice(0, 12)"
|
|
522
|
-
:key="member.username"
|
|
523
|
-
class="group-member-avatar-item"
|
|
524
|
-
@click="openEditMemberNick(member)"
|
|
525
|
-
>
|
|
526
|
-
<img
|
|
527
|
-
:src="member.avatar ? `${config.api.baseUrl}${member.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${member.username}`"
|
|
528
|
-
:alt="member.username"
|
|
529
|
-
class="group-member-avatar-small"
|
|
530
|
-
/>
|
|
531
|
-
<span class="group-member-nickname">{{ member.memberNick || member.username }}</span>
|
|
532
|
-
</div>
|
|
533
|
-
<div
|
|
534
|
-
v-if="groupMemberList.length > 12"
|
|
535
|
-
class="group-member-avatar-item"
|
|
536
|
-
@click="inviteMemberDialogVisible = true"
|
|
537
|
-
>
|
|
538
|
-
<div class="group-member-add-icon">
|
|
539
|
-
<el-icon><Plus /></el-icon>
|
|
540
|
-
</div>
|
|
541
|
-
<span class="group-member-nickname">邀请</span>
|
|
542
|
-
</div>
|
|
543
|
-
<div
|
|
544
|
-
v-else
|
|
545
|
-
class="group-member-avatar-item"
|
|
546
|
-
@click="inviteMemberDialogVisible = true"
|
|
547
|
-
>
|
|
548
|
-
<div class="group-member-add-icon">
|
|
549
|
-
<el-icon><Plus /></el-icon>
|
|
550
|
-
</div>
|
|
551
|
-
<span class="group-member-nickname">邀请</span>
|
|
552
|
-
</div>
|
|
553
|
-
</div>
|
|
554
|
-
</div>
|
|
555
|
-
|
|
556
|
-
<!-- 分割线 -->
|
|
557
|
-
<div class="group-divider"></div>
|
|
558
|
-
|
|
559
|
-
<!-- 群设置项 -->
|
|
560
|
-
<div class="group-settings-section">
|
|
561
|
-
<!-- 群名称 -->
|
|
562
|
-
<div class="group-setting-item" v-if="currentSelectGroup?.owner === myUsername">
|
|
563
|
-
<span class="group-setting-label">群聊名称</span>
|
|
564
|
-
<div class="group-setting-value-wrapper">
|
|
565
|
-
<div v-if="editingFields.groupNickname" class="group-edit-wrapper">
|
|
566
|
-
<el-input
|
|
567
|
-
v-model="tempEditValues.groupNickname"
|
|
568
|
-
placeholder="请输入群聊名称"
|
|
569
|
-
@keyup.enter="handleSaveEditField('groupNickname')"
|
|
570
|
-
class="group-input-edit"
|
|
571
|
-
/>
|
|
572
|
-
<div class="group-edit-buttons">
|
|
573
|
-
<el-button size="small" @click="cancelEditField('groupNickname')">取消</el-button>
|
|
574
|
-
<el-button size="small" type="primary" @click="handleSaveEditField('groupNickname')">保存</el-button>
|
|
575
|
-
</div>
|
|
576
|
-
</div>
|
|
577
|
-
<div
|
|
578
|
-
v-else
|
|
579
|
-
class="group-setting-value"
|
|
580
|
-
@click="startEditField('groupNickname')"
|
|
581
|
-
>
|
|
582
|
-
<span>{{ currentGroupInfo?.groupNickname || currentGroupInfo?.groupName || currentSelectGroup?.name || '' }}</span>
|
|
583
|
-
<el-icon><Edit /></el-icon>
|
|
584
|
-
</div>
|
|
585
|
-
</div>
|
|
586
|
-
</div>
|
|
587
|
-
<div class="group-setting-item" v-else>
|
|
588
|
-
<span class="group-setting-label">群聊名称</span>
|
|
589
|
-
<span class="group-setting-value-text">{{ currentGroupInfo?.groupNickname || currentGroupInfo?.groupName || currentSelectGroup?.name || '' }}</span>
|
|
590
|
-
</div>
|
|
591
|
-
|
|
592
|
-
<!-- 群公告 -->
|
|
593
|
-
<div class="group-setting-item" v-if="currentSelectGroup?.owner === myUsername">
|
|
594
|
-
<span class="group-setting-label">群公告</span>
|
|
595
|
-
<div class="group-setting-value-wrapper">
|
|
596
|
-
<div v-if="editingFields.notice" class="group-edit-wrapper">
|
|
597
|
-
<el-input
|
|
598
|
-
v-model="tempEditValues.notice"
|
|
599
|
-
type="textarea"
|
|
600
|
-
:rows="3"
|
|
601
|
-
placeholder="请输入群公告"
|
|
602
|
-
class="group-input-edit"
|
|
603
|
-
/>
|
|
604
|
-
<div class="group-edit-buttons">
|
|
605
|
-
<el-button size="small" @click="cancelEditField('notice')">取消</el-button>
|
|
606
|
-
<el-button size="small" type="primary" @click="handleSaveEditField('notice')">保存</el-button>
|
|
607
|
-
</div>
|
|
608
|
-
</div>
|
|
609
|
-
<div
|
|
610
|
-
v-else
|
|
611
|
-
class="group-setting-value"
|
|
612
|
-
@click="startEditField('notice')"
|
|
613
|
-
>
|
|
614
|
-
<span class="group-setting-value-text">{{ currentGroupInfo?.notice || '暂无公告' }}</span>
|
|
615
|
-
<el-icon><Edit /></el-icon>
|
|
616
|
-
</div>
|
|
617
|
-
</div>
|
|
618
|
-
</div>
|
|
619
|
-
<div class="group-setting-item" v-else>
|
|
620
|
-
<span class="group-setting-label">群公告</span>
|
|
621
|
-
<span class="group-setting-value-text">{{ currentGroupInfo?.notice || '暂无公告' }}</span>
|
|
622
|
-
</div>
|
|
623
|
-
|
|
624
|
-
<!-- 备注 -->
|
|
625
|
-
<div class="group-setting-item" v-if="currentSelectGroup?.owner === myUsername">
|
|
626
|
-
<span class="group-setting-label">备注</span>
|
|
627
|
-
<div class="group-setting-value-wrapper">
|
|
628
|
-
<div v-if="editingFields.remark" class="group-edit-wrapper">
|
|
629
|
-
<el-input
|
|
630
|
-
v-model="tempEditValues.remark"
|
|
631
|
-
placeholder="请输入备注"
|
|
632
|
-
@keyup.enter="handleSaveEditField('remark')"
|
|
633
|
-
class="group-input-edit"
|
|
634
|
-
/>
|
|
635
|
-
<div class="group-edit-buttons">
|
|
636
|
-
<el-button size="small" @click="cancelEditField('remark')">取消</el-button>
|
|
637
|
-
<el-button size="small" type="primary" @click="handleSaveEditField('remark')">保存</el-button>
|
|
638
|
-
</div>
|
|
639
|
-
</div>
|
|
640
|
-
<div
|
|
641
|
-
v-else
|
|
642
|
-
class="group-setting-value"
|
|
643
|
-
@click="startEditField('remark')"
|
|
644
|
-
>
|
|
645
|
-
<span class="group-setting-value-text">{{ currentGroupInfo?.remark || '群聊的备注仅自己可见' }}</span>
|
|
646
|
-
<el-icon><Edit /></el-icon>
|
|
647
|
-
</div>
|
|
648
|
-
</div>
|
|
649
|
-
</div>
|
|
650
|
-
<div class="group-setting-item" v-else>
|
|
651
|
-
<span class="group-setting-label">备注</span>
|
|
652
|
-
<span class="group-setting-value-text">{{ currentGroupInfo?.remark || '群聊的备注仅自己可见' }}</span>
|
|
653
|
-
</div>
|
|
654
|
-
|
|
655
|
-
<!-- 我在本群的昵称 -->
|
|
656
|
-
<div class="group-setting-item" @click="openMyNicknameEdit">
|
|
657
|
-
<span class="group-setting-label">我在本群的昵称</span>
|
|
658
|
-
<div class="group-setting-value">
|
|
659
|
-
<span class="group-setting-value-text">{{ myNicknameInGroup || myUsername }}</span>
|
|
660
|
-
<el-icon><Edit /></el-icon>
|
|
661
|
-
</div>
|
|
662
|
-
</div>
|
|
663
|
-
|
|
664
|
-
<div class="group-divider"></div>
|
|
665
|
-
|
|
666
|
-
<!-- 查找聊天内容 -->
|
|
667
|
-
<div class="group-setting-item">
|
|
668
|
-
<span class="group-setting-label">查找聊天内容</span>
|
|
669
|
-
<el-icon><ArrowRight /></el-icon>
|
|
670
|
-
</div>
|
|
671
|
-
|
|
672
|
-
<!-- 消息免打扰 -->
|
|
673
|
-
<div class="group-setting-item">
|
|
674
|
-
<span class="group-setting-label">消息免打扰</span>
|
|
675
|
-
<el-switch v-model="muteGroup" />
|
|
95
|
+
<div class="input-send-wrapper">
|
|
96
|
+
<Button
|
|
97
|
+
type="primary"
|
|
98
|
+
:disabled="!inputText.trim() && pendingFiles.length === 0"
|
|
99
|
+
@click="handleSend"
|
|
100
|
+
class="send-message-btn"
|
|
101
|
+
>发送</Button>
|
|
676
102
|
</div>
|
|
103
|
+
<input ref="fileInputRef" type="file" multiple class="hidden-file-input" @change="handleFileSelect" />
|
|
104
|
+
</template>
|
|
105
|
+
</ChatWindow>
|
|
106
|
+
</template>
|
|
107
|
+
</MainArea>
|
|
677
108
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
109
|
+
<!-- 群聊侧边栏 -->
|
|
110
|
+
<GroupSidebar
|
|
111
|
+
:visible="showGroupSidebar && !!currentSelectGroup"
|
|
112
|
+
:current-select-group="currentSelectGroup"
|
|
113
|
+
:group-member-list="groupMemberList"
|
|
114
|
+
:is-remove-member-mode="isRemoveMemberMode"
|
|
115
|
+
:config="config"
|
|
116
|
+
:my-username="myUsername"
|
|
117
|
+
:editing-fields="editingFields"
|
|
118
|
+
:temp-edit-values="tempEditValues"
|
|
119
|
+
:current-group-info="currentGroupInfo"
|
|
120
|
+
:my-nickname-in-group="myNicknameInGroup"
|
|
121
|
+
:group-owner-username="groupOwnerUsername"
|
|
122
|
+
v-model:mute-group="muteGroup"
|
|
123
|
+
@close="showGroupSidebar = false"
|
|
124
|
+
@remove-member="handleRemoveMember"
|
|
125
|
+
@edit-member-nick="openEditMemberNick"
|
|
126
|
+
@invite-member="inviteMemberDialogVisible = true; isRemoveMemberMode = false"
|
|
127
|
+
@toggle-remove-mode="isRemoveMemberMode = !isRemoveMemberMode"
|
|
128
|
+
@start-edit="startEditField"
|
|
129
|
+
@cancel-edit="cancelEditField"
|
|
130
|
+
@save-field="handleSaveEditField"
|
|
131
|
+
@update:temp-edit-value="({ field, value }) => tempEditValues[field] = value"
|
|
132
|
+
@edit-my-nick="openMyNicknameEdit"
|
|
133
|
+
@show-group-detail="groupDetailVisible = true"
|
|
134
|
+
@delete-group="handleDeleteGroup"
|
|
135
|
+
@quit-group="handleQuitGroup"
|
|
136
|
+
/>
|
|
697
137
|
|
|
698
138
|
<!-- 右侧详情面板 -->
|
|
699
|
-
<div
|
|
700
|
-
v-if="showChatDetail"
|
|
701
|
-
class="chat-detail-panel"
|
|
702
|
-
>
|
|
139
|
+
<div v-if="showChatDetail" class="chat-detail-panel">
|
|
703
140
|
<div class="chat-detail-header">聊天详情</div>
|
|
704
141
|
<div class="chat-detail-content">
|
|
705
142
|
<div class="chat-detail-profile">
|
|
706
|
-
<img
|
|
707
|
-
:src="currentChat?.avatar"
|
|
708
|
-
:alt="currentChat?.name"
|
|
709
|
-
class="chat-detail-avatar"
|
|
710
|
-
/>
|
|
143
|
+
<img :src="currentChat?.avatar" :alt="currentChat?.name" class="chat-detail-avatar" />
|
|
711
144
|
<div class="chat-detail-name">{{ currentChat?.name }}</div>
|
|
712
145
|
<div class="chat-detail-actions">
|
|
713
146
|
<div class="chat-detail-action-item">查找聊天记录</div>
|
|
@@ -717,296 +150,164 @@
|
|
|
717
150
|
</div>
|
|
718
151
|
</div>
|
|
719
152
|
|
|
720
|
-
<!--
|
|
721
|
-
<
|
|
722
|
-
v-model="addFriendDialogVisible"
|
|
723
|
-
|
|
153
|
+
<!-- 弹窗组件 -->
|
|
154
|
+
<AddFriendDialog
|
|
155
|
+
v-model:visible="addFriendDialogVisible"
|
|
156
|
+
v-model:search-text="addFriendSearchText"
|
|
157
|
+
:loading="loadingAvailableUsers"
|
|
158
|
+
:users="filteredAvailableUsers"
|
|
159
|
+
@add="addFriend"
|
|
160
|
+
/>
|
|
161
|
+
|
|
162
|
+
<CreateGroupDialog
|
|
163
|
+
v-model:visible="createGroupDialogVisible"
|
|
164
|
+
v-model:group-name="newGroupName"
|
|
165
|
+
v-model:group-remark="newGroupRemark"
|
|
166
|
+
:friend-list="filteredFriendList"
|
|
167
|
+
:selected-members="selectedMembersForCreate"
|
|
168
|
+
@toggle-member="toggleMemberForCreate"
|
|
169
|
+
@create="handleCreateGroup"
|
|
170
|
+
/>
|
|
171
|
+
|
|
172
|
+
<GroupDetailDialog
|
|
173
|
+
v-if="currentSelectGroup"
|
|
174
|
+
v-model:visible="groupDetailVisible"
|
|
175
|
+
:current-select-group="currentSelectGroup"
|
|
176
|
+
:group-member-list="groupMemberList"
|
|
177
|
+
:my-username="myUsername"
|
|
178
|
+
:config="config"
|
|
179
|
+
:group-owner-username="groupOwnerUsername"
|
|
180
|
+
@edit-info="openEditGroupInfo"
|
|
181
|
+
@delete="handleDeleteGroup"
|
|
182
|
+
@invite="inviteMemberDialogVisible = true"
|
|
183
|
+
@edit-member-nick="openEditMemberNick"
|
|
184
|
+
@remove-member="handleRemoveMember"
|
|
185
|
+
@transfer-owner="handleTransferOwner"
|
|
186
|
+
@quit="handleQuitGroup"
|
|
187
|
+
/>
|
|
188
|
+
|
|
189
|
+
<!-- 其他弹窗(暂时保留在原处,后续可继续拆分) -->
|
|
190
|
+
<!-- 编辑群信息弹窗 -->
|
|
191
|
+
<Dialog
|
|
192
|
+
v-if="currentSelectGroup"
|
|
193
|
+
:model-value="groupInfoVisible"
|
|
194
|
+
@update:model-value="groupInfoVisible = $event"
|
|
195
|
+
title="编辑群信息"
|
|
724
196
|
width="500px"
|
|
725
|
-
append-to-body
|
|
726
|
-
>
|
|
727
|
-
<div class="add-friend-search-wrapper">
|
|
728
|
-
<el-input
|
|
729
|
-
v-model="addFriendSearchText"
|
|
730
|
-
placeholder="搜索用户"
|
|
731
|
-
:prefix-icon="Search"
|
|
732
|
-
class="add-friend-search-input"
|
|
733
|
-
/>
|
|
734
|
-
</div>
|
|
735
|
-
<div class="add-friend-users-list">
|
|
736
|
-
<el-empty v-if="loadingAvailableUsers" description="加载中..." />
|
|
737
|
-
<el-empty
|
|
738
|
-
v-else-if="filteredAvailableUsers.length === 0"
|
|
739
|
-
description="暂无用户"
|
|
740
|
-
/>
|
|
741
|
-
<div
|
|
742
|
-
v-else
|
|
743
|
-
v-for="user in filteredAvailableUsers"
|
|
744
|
-
:key="user.username"
|
|
745
|
-
class="add-friend-user-item"
|
|
746
|
-
>
|
|
747
|
-
<div class="add-friend-user-info">
|
|
748
|
-
<img
|
|
749
|
-
:src="`https://api.dicebear.com/7.x/avataaars/svg?seed=${user.username}`"
|
|
750
|
-
:alt="user.username"
|
|
751
|
-
class="add-friend-user-avatar"
|
|
752
|
-
/>
|
|
753
|
-
<div class="add-friend-user-name">{{ user.username }}</div>
|
|
754
|
-
</div>
|
|
755
|
-
<el-button type="primary" size="small" @click="addFriend(user)">添加</el-button>
|
|
756
|
-
</div>
|
|
757
|
-
</div>
|
|
758
|
-
</el-dialog>
|
|
759
|
-
|
|
760
|
-
<!-- 创建群聊弹窗 -->
|
|
761
|
-
<el-dialog
|
|
762
|
-
v-model="createGroupDialogVisible"
|
|
763
|
-
title="创建群聊"
|
|
764
|
-
width="600px"
|
|
765
|
-
append-to-body
|
|
766
197
|
>
|
|
767
|
-
<div class="
|
|
198
|
+
<div class="edit-group-form">
|
|
768
199
|
<div class="form-item">
|
|
769
200
|
<label class="form-label">群名称</label>
|
|
770
|
-
<
|
|
771
|
-
v-model="
|
|
201
|
+
<Input
|
|
202
|
+
v-model="editingGroupInfo.groupNickname"
|
|
772
203
|
placeholder="请输入群名称"
|
|
773
|
-
maxlength="50"
|
|
774
204
|
/>
|
|
775
205
|
</div>
|
|
776
206
|
<div class="form-item">
|
|
777
207
|
<label class="form-label">群备注</label>
|
|
778
|
-
<
|
|
779
|
-
v-model="
|
|
208
|
+
<Input
|
|
209
|
+
v-model="editingGroupInfo.remark"
|
|
780
210
|
type="textarea"
|
|
781
|
-
placeholder="请输入群备注(可选)"
|
|
782
211
|
:rows="3"
|
|
783
|
-
|
|
212
|
+
placeholder="请输入群备注"
|
|
784
213
|
/>
|
|
785
214
|
</div>
|
|
786
215
|
<div class="form-item">
|
|
787
|
-
<label class="form-label"
|
|
788
|
-
<
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
<div
|
|
795
|
-
v-for="friend in filteredFriendList"
|
|
796
|
-
:key="friend.id"
|
|
797
|
-
:class="[
|
|
798
|
-
'member-item',
|
|
799
|
-
selectedMembersForCreate.some(m => m.id === friend.id) ? 'member-selected' : ''
|
|
800
|
-
]"
|
|
801
|
-
@click="toggleMemberForCreate(friend)"
|
|
802
|
-
>
|
|
803
|
-
<img
|
|
804
|
-
:src="friend.avatar"
|
|
805
|
-
:alt="friend.name"
|
|
806
|
-
class="member-avatar"
|
|
807
|
-
/>
|
|
808
|
-
<span class="member-name">{{ friend.name }}</span>
|
|
809
|
-
<el-icon v-if="selectedMembersForCreate.some(m => m.id === friend.id)" class="member-check"><CircleCheck /></el-icon>
|
|
810
|
-
</div>
|
|
811
|
-
</div>
|
|
812
|
-
</div>
|
|
813
|
-
</div>
|
|
814
|
-
</div>
|
|
815
|
-
<template #footer>
|
|
816
|
-
<el-button @click="createGroupDialogVisible = false">取消</el-button>
|
|
817
|
-
<el-button type="primary" @click="handleCreateGroup" :disabled="!newGroupName.trim()">创建</el-button>
|
|
818
|
-
</template>
|
|
819
|
-
</el-dialog>
|
|
820
|
-
|
|
821
|
-
<!-- 群聊详情弹窗 -->
|
|
822
|
-
<el-dialog
|
|
823
|
-
v-if="currentSelectGroup"
|
|
824
|
-
v-model="groupDetailVisible"
|
|
825
|
-
:title="currentSelectGroup.name"
|
|
826
|
-
width="500px"
|
|
827
|
-
append-to-body
|
|
828
|
-
>
|
|
829
|
-
<div class="group-detail-content">
|
|
830
|
-
<div class="group-info-section">
|
|
831
|
-
<div class="group-info-item">
|
|
832
|
-
<span class="info-label">群ID</span>
|
|
833
|
-
<span class="info-value">{{ currentSelectGroup.groupId }}</span>
|
|
834
|
-
</div>
|
|
835
|
-
<div class="group-info-item">
|
|
836
|
-
<span class="info-label">群主</span>
|
|
837
|
-
<span class="info-value">{{ currentSelectGroup.owner }}</span>
|
|
838
|
-
</div>
|
|
839
|
-
<div class="group-info-item">
|
|
840
|
-
<span class="info-label">成员数</span>
|
|
841
|
-
<span class="info-value">{{ groupMemberList.length }}</span>
|
|
842
|
-
</div>
|
|
843
|
-
</div>
|
|
844
|
-
|
|
845
|
-
<div class="group-actions-section" v-if="currentSelectGroup.owner === myUsername">
|
|
846
|
-
<div class="section-header">
|
|
847
|
-
<span class="section-title">群管理</span>
|
|
848
|
-
</div>
|
|
849
|
-
<div class="group-actions-list">
|
|
850
|
-
<el-button type="primary" size="small" @click="openEditGroupInfo">
|
|
851
|
-
<el-icon><Edit /></el-icon>编辑群信息
|
|
852
|
-
</el-button>
|
|
853
|
-
<el-button type="danger" size="small" @click="handleDeleteGroup">
|
|
854
|
-
<el-icon><Delete /></el-icon>解散群聊
|
|
855
|
-
</el-button>
|
|
856
|
-
</div>
|
|
857
|
-
</div>
|
|
858
|
-
|
|
859
|
-
<div class="group-members-section">
|
|
860
|
-
<div class="section-header">
|
|
861
|
-
<span class="section-title">群成员</span>
|
|
862
|
-
<el-button size="small" @click="inviteMemberDialogVisible = true">
|
|
863
|
-
<el-icon><Plus /></el-icon>邀请成员
|
|
864
|
-
</el-button>
|
|
865
|
-
</div>
|
|
866
|
-
<div class="group-members-list">
|
|
867
|
-
<el-empty v-if="groupMemberList.length === 0" description="暂无成员" />
|
|
868
|
-
<div
|
|
869
|
-
v-else
|
|
870
|
-
v-for="member in groupMemberList"
|
|
871
|
-
:key="member.id || member.username"
|
|
872
|
-
class="group-member-item"
|
|
873
|
-
>
|
|
874
|
-
<img
|
|
875
|
-
:src="member.avatar ? `${props.config.api.baseUrl}${member.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${member.username}`"
|
|
876
|
-
:alt="member.username"
|
|
877
|
-
class="group-member-avatar"
|
|
878
|
-
/>
|
|
879
|
-
<div class="group-member-info">
|
|
880
|
-
<span class="group-member-name">{{ member.memberNick || member.username }}</span>
|
|
881
|
-
<span v-if="member.username === currentSelectGroup.owner" class="group-member-badge">群主</span>
|
|
882
|
-
</div>
|
|
883
|
-
<div class="group-member-actions" v-if="currentSelectGroup.owner === myUsername && member.username !== myUsername">
|
|
884
|
-
<el-button size="small" link @click="openEditMemberNick(member)">
|
|
885
|
-
改昵称
|
|
886
|
-
</el-button>
|
|
887
|
-
<el-button size="small" link type="danger" @click="handleRemoveMember(member.username)">
|
|
888
|
-
移除
|
|
889
|
-
</el-button>
|
|
890
|
-
<el-button size="small" link type="warning" @click="handleTransferOwner(member.username)">
|
|
891
|
-
转让
|
|
892
|
-
</el-button>
|
|
893
|
-
</div>
|
|
894
|
-
<div class="group-member-actions" v-else-if="member.username === myUsername">
|
|
895
|
-
<el-button size="small" link @click="openEditMemberNick(member)">
|
|
896
|
-
改昵称
|
|
897
|
-
</el-button>
|
|
898
|
-
</div>
|
|
899
|
-
</div>
|
|
900
|
-
</div>
|
|
216
|
+
<label class="form-label">群公告</label>
|
|
217
|
+
<Input
|
|
218
|
+
v-model="editingGroupInfo.notice"
|
|
219
|
+
type="textarea"
|
|
220
|
+
:rows="3"
|
|
221
|
+
placeholder="请输入群公告"
|
|
222
|
+
/>
|
|
901
223
|
</div>
|
|
902
224
|
</div>
|
|
903
225
|
<template #footer>
|
|
904
|
-
<
|
|
905
|
-
<
|
|
906
|
-
</template>
|
|
907
|
-
</el-dialog>
|
|
908
|
-
|
|
909
|
-
<!-- 编辑群信息弹窗 -->
|
|
910
|
-
<el-dialog
|
|
911
|
-
v-if="currentSelectGroup"
|
|
912
|
-
v-model="groupInfoVisible"
|
|
913
|
-
title="编辑群信息"
|
|
914
|
-
width="500px"
|
|
915
|
-
append-to-body
|
|
916
|
-
>
|
|
917
|
-
<el-form label-width="80px">
|
|
918
|
-
<el-form-item label="群名称">
|
|
919
|
-
<el-input v-model="editingGroupInfo.groupNickname" placeholder="请输入群名称" />
|
|
920
|
-
</el-form-item>
|
|
921
|
-
<el-form-item label="群备注">
|
|
922
|
-
<el-input v-model="editingGroupInfo.remark" type="textarea" :rows="3" placeholder="请输入群备注" />
|
|
923
|
-
</el-form-item>
|
|
924
|
-
<el-form-item label="群公告">
|
|
925
|
-
<el-input v-model="editingGroupInfo.notice" type="textarea" :rows="3" placeholder="请输入群公告" />
|
|
926
|
-
</el-form-item>
|
|
927
|
-
</el-form>
|
|
928
|
-
<template #footer>
|
|
929
|
-
<el-button @click="groupInfoVisible = false">取消</el-button>
|
|
930
|
-
<el-button type="primary" @click="handleUpdateGroupInfo">保存</el-button>
|
|
226
|
+
<Button @click="groupInfoVisible = false">取消</Button>
|
|
227
|
+
<Button type="primary" @click="handleUpdateGroupInfo">保存</Button>
|
|
931
228
|
</template>
|
|
932
|
-
</
|
|
229
|
+
</Dialog>
|
|
933
230
|
|
|
934
231
|
<!-- 编辑群成员昵称弹窗 -->
|
|
935
|
-
<
|
|
232
|
+
<Dialog
|
|
936
233
|
v-if="currentSelectGroup"
|
|
937
|
-
|
|
234
|
+
:model-value="memberNickDialogVisible"
|
|
235
|
+
@update:model-value="memberNickDialogVisible = $event"
|
|
938
236
|
title="编辑群昵称"
|
|
939
237
|
width="400px"
|
|
940
|
-
append-to-body
|
|
941
238
|
>
|
|
942
|
-
<
|
|
943
|
-
<
|
|
239
|
+
<div class="edit-member-nick-form">
|
|
240
|
+
<div class="form-item">
|
|
241
|
+
<label class="form-label">成员</label>
|
|
944
242
|
<span>{{ editingMemberNick.targetUsername }}</span>
|
|
945
|
-
</
|
|
946
|
-
<
|
|
947
|
-
<
|
|
948
|
-
|
|
949
|
-
|
|
243
|
+
</div>
|
|
244
|
+
<div class="form-item">
|
|
245
|
+
<label class="form-label">群昵称</label>
|
|
246
|
+
<Input
|
|
247
|
+
v-model="editingMemberNick.memberNick"
|
|
248
|
+
placeholder="请输入群昵称"
|
|
249
|
+
/>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
950
252
|
<template #footer>
|
|
951
|
-
<
|
|
952
|
-
<
|
|
253
|
+
<Button @click="memberNickDialogVisible = false">取消</Button>
|
|
254
|
+
<Button type="primary" @click="handleUpdateMemberNick">保存</Button>
|
|
953
255
|
</template>
|
|
954
|
-
</
|
|
256
|
+
</Dialog>
|
|
955
257
|
|
|
956
258
|
<!-- 消息已读成员弹窗 -->
|
|
957
|
-
<
|
|
259
|
+
<Dialog
|
|
958
260
|
v-if="currentSelectGroup"
|
|
959
|
-
|
|
261
|
+
:model-value="msgReadUserDialogVisible"
|
|
262
|
+
@update:model-value="msgReadUserDialogVisible = $event"
|
|
960
263
|
title="消息已读状态"
|
|
961
264
|
width="500px"
|
|
962
|
-
append-to-body
|
|
963
265
|
>
|
|
964
266
|
<div class="msg-read-users-content">
|
|
965
267
|
<div class="read-users-section">
|
|
966
268
|
<div class="section-title">
|
|
967
|
-
<
|
|
269
|
+
<Check />已读 ({{ currentMsgReadList.readUserList.length }})
|
|
968
270
|
</div>
|
|
969
271
|
<div class="users-list">
|
|
970
|
-
<
|
|
272
|
+
<Empty v-if="currentMsgReadList.readUserList.length === 0" description="暂无已读成员" />
|
|
971
273
|
<div v-else class="users-tag-list">
|
|
972
|
-
<
|
|
274
|
+
<Tag v-for="user in currentMsgReadList.readUserList" :key="user" class="user-tag">
|
|
973
275
|
{{ user }}
|
|
974
|
-
</
|
|
276
|
+
</Tag>
|
|
975
277
|
</div>
|
|
976
278
|
</div>
|
|
977
279
|
</div>
|
|
978
280
|
<div class="unread-users-section">
|
|
979
281
|
<div class="section-title">
|
|
980
|
-
<
|
|
282
|
+
<Clock />未读 ({{ currentMsgReadList.unreadUserList.length }})
|
|
981
283
|
</div>
|
|
982
284
|
<div class="users-list">
|
|
983
|
-
<
|
|
285
|
+
<Empty v-if="currentMsgReadList.unreadUserList.length === 0" description="全部已读" />
|
|
984
286
|
<div v-else class="users-tag-list">
|
|
985
|
-
<
|
|
287
|
+
<Tag v-for="user in currentMsgReadList.unreadUserList" :key="user" type="info" class="user-tag">
|
|
986
288
|
{{ user }}
|
|
987
|
-
</
|
|
289
|
+
</Tag>
|
|
988
290
|
</div>
|
|
989
291
|
</div>
|
|
990
292
|
</div>
|
|
991
293
|
</div>
|
|
992
294
|
<template #footer>
|
|
993
|
-
<
|
|
295
|
+
<Button @click="msgReadUserDialogVisible = false">关闭</Button>
|
|
994
296
|
</template>
|
|
995
|
-
</
|
|
297
|
+
</Dialog>
|
|
996
298
|
|
|
997
299
|
<!-- 邀请成员弹窗 -->
|
|
998
|
-
<
|
|
300
|
+
<Dialog
|
|
999
301
|
v-if="currentSelectGroup"
|
|
1000
|
-
|
|
302
|
+
:model-value="inviteMemberDialogVisible"
|
|
303
|
+
@update:model-value="inviteMemberDialogVisible = $event"
|
|
1001
304
|
title="邀请成员"
|
|
1002
305
|
width="500px"
|
|
1003
|
-
append-to-body
|
|
1004
306
|
>
|
|
1005
307
|
<div class="invite-member-content">
|
|
1006
308
|
<div class="invite-member-list">
|
|
1007
|
-
<
|
|
309
|
+
<Empty v-if="filteredFriendList.length === 0" description="暂无好友可以邀请" />
|
|
1008
310
|
<div
|
|
1009
|
-
v-else
|
|
1010
311
|
class="member-list"
|
|
1011
312
|
>
|
|
1012
313
|
<div
|
|
@@ -1024,26 +325,26 @@
|
|
|
1024
325
|
class="member-avatar"
|
|
1025
326
|
/>
|
|
1026
327
|
<span class="member-name">{{ friend.name }}</span>
|
|
1027
|
-
<
|
|
328
|
+
<CircleCheck v-if="selectedMembersForInvite.some(m => m.id === friend.id)" class="member-check" />
|
|
1028
329
|
</div>
|
|
1029
330
|
</div>
|
|
1030
331
|
</div>
|
|
1031
332
|
</div>
|
|
1032
333
|
<template #footer>
|
|
1033
|
-
<
|
|
1034
|
-
<
|
|
334
|
+
<Button @click="inviteMemberDialogVisible = false">取消</Button>
|
|
335
|
+
<Button type="primary" @click="handleInviteMember" :disabled="selectedMembersForInvite.length === 0">
|
|
1035
336
|
邀请 {{ selectedMembersForInvite.length }} 人
|
|
1036
|
-
</
|
|
337
|
+
</Button>
|
|
1037
338
|
</template>
|
|
1038
|
-
</
|
|
339
|
+
</Dialog>
|
|
1039
340
|
|
|
1040
341
|
<!-- 用户设置弹窗 -->
|
|
1041
|
-
<
|
|
1042
|
-
|
|
342
|
+
<Dialog
|
|
343
|
+
:model-value="showSettingsDialog"
|
|
344
|
+
@update:model-value="showSettingsDialog = $event"
|
|
1043
345
|
title="个人设置"
|
|
1044
346
|
width="560px"
|
|
1045
347
|
:close-on-click-modal="false"
|
|
1046
|
-
append-to-body
|
|
1047
348
|
class="chat-settings-dialog"
|
|
1048
349
|
>
|
|
1049
350
|
<div class="chat-settings-container">
|
|
@@ -1060,7 +361,7 @@
|
|
|
1060
361
|
class="chat-settings-avatar-edit"
|
|
1061
362
|
@click="triggerAvatarUpload"
|
|
1062
363
|
>
|
|
1063
|
-
<
|
|
364
|
+
<span :size="18" class="chat-settings-avatar-icon"><Camera /></span>
|
|
1064
365
|
</div>
|
|
1065
366
|
<input
|
|
1066
367
|
ref="avatarInputRef"
|
|
@@ -1076,33 +377,61 @@
|
|
|
1076
377
|
</div>
|
|
1077
378
|
</div>
|
|
1078
379
|
|
|
1079
|
-
<!--
|
|
380
|
+
<!-- 主题选择 -->
|
|
1080
381
|
<div class="chat-settings-form-section">
|
|
1081
382
|
<div class="chat-settings-form-header">
|
|
1082
383
|
<div class="chat-settings-form-title">
|
|
1083
|
-
<
|
|
1084
|
-
|
|
384
|
+
<Setting />
|
|
385
|
+
主题设置
|
|
1085
386
|
</div>
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
387
|
+
</div>
|
|
388
|
+
<div class="chat-settings-form">
|
|
389
|
+
<div class="theme-options">
|
|
390
|
+
<div
|
|
391
|
+
v-for="themeOption in THEME_OPTIONS_WITH_ICONS"
|
|
392
|
+
:key="themeOption.value"
|
|
393
|
+
:class="[
|
|
394
|
+
'theme-option',
|
|
395
|
+
currentTheme === themeOption.value ? 'theme-option-active' : ''
|
|
396
|
+
]"
|
|
397
|
+
@click="setTheme(themeOption.value)"
|
|
398
|
+
>
|
|
399
|
+
<span class="theme-option-icon">
|
|
400
|
+
<component :is="themeOption.iconComponent" />
|
|
401
|
+
</span>
|
|
402
|
+
<span class="theme-option-label">{{ themeOption.label }}</span>
|
|
403
|
+
<Check v-if="currentTheme === themeOption.value" class="theme-option-check" />
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
<!-- 用户信息表单 -->
|
|
410
|
+
<div class="chat-settings-form-section">
|
|
411
|
+
<div class="chat-settings-form-header">
|
|
412
|
+
<div class="chat-settings-form-title">
|
|
413
|
+
<UserFilled />
|
|
414
|
+
个人信息
|
|
415
|
+
</div>
|
|
416
|
+
<Button
|
|
417
|
+
v-if="!isEditingUserInfo"
|
|
418
|
+
type="primary"
|
|
1089
419
|
size="small"
|
|
1090
420
|
@click="startEditUserInfo"
|
|
1091
421
|
class="chat-settings-edit-btn"
|
|
1092
422
|
>
|
|
1093
423
|
编辑
|
|
1094
|
-
</
|
|
424
|
+
</Button>
|
|
1095
425
|
</div>
|
|
1096
426
|
|
|
1097
427
|
<div class="chat-settings-form">
|
|
1098
428
|
<!-- 昵称 -->
|
|
1099
429
|
<div class="chat-settings-form-item">
|
|
1100
430
|
<label class="chat-settings-form-label">昵称</label>
|
|
1101
|
-
<
|
|
431
|
+
<Input
|
|
1102
432
|
v-if="isEditingUserInfo"
|
|
1103
433
|
v-model="editingUserInfo.nickname"
|
|
1104
434
|
placeholder="请输入昵称"
|
|
1105
|
-
size="large"
|
|
1106
435
|
/>
|
|
1107
436
|
<div
|
|
1108
437
|
v-else
|
|
@@ -1115,11 +444,10 @@
|
|
|
1115
444
|
<!-- 邮箱 -->
|
|
1116
445
|
<div class="chat-settings-form-item">
|
|
1117
446
|
<label class="chat-settings-form-label">邮箱</label>
|
|
1118
|
-
<
|
|
447
|
+
<Input
|
|
1119
448
|
v-if="isEditingUserInfo"
|
|
1120
449
|
v-model="editingUserInfo.email"
|
|
1121
450
|
placeholder="请输入邮箱"
|
|
1122
|
-
size="large"
|
|
1123
451
|
/>
|
|
1124
452
|
<div
|
|
1125
453
|
v-else
|
|
@@ -1132,11 +460,10 @@
|
|
|
1132
460
|
<!-- 手机号 -->
|
|
1133
461
|
<div class="chat-settings-form-item">
|
|
1134
462
|
<label class="chat-settings-form-label">手机号</label>
|
|
1135
|
-
<
|
|
463
|
+
<Input
|
|
1136
464
|
v-if="isEditingUserInfo"
|
|
1137
465
|
v-model="editingUserInfo.phone"
|
|
1138
466
|
placeholder="请输入手机号"
|
|
1139
|
-
size="large"
|
|
1140
467
|
/>
|
|
1141
468
|
<div
|
|
1142
469
|
v-else
|
|
@@ -1149,13 +476,12 @@
|
|
|
1149
476
|
<!-- 个人简介 -->
|
|
1150
477
|
<div class="chat-settings-form-item">
|
|
1151
478
|
<label class="chat-settings-form-label">个人简介</label>
|
|
1152
|
-
<
|
|
479
|
+
<Input
|
|
1153
480
|
v-if="isEditingUserInfo"
|
|
1154
481
|
v-model="editingUserInfo.bio"
|
|
1155
482
|
type="textarea"
|
|
1156
483
|
:rows="4"
|
|
1157
484
|
placeholder="介绍一下自己吧..."
|
|
1158
|
-
size="large"
|
|
1159
485
|
/>
|
|
1160
486
|
<div
|
|
1161
487
|
v-else
|
|
@@ -1167,18 +493,17 @@
|
|
|
1167
493
|
|
|
1168
494
|
<!-- 编辑按钮 -->
|
|
1169
495
|
<div v-if="isEditingUserInfo" class="chat-settings-form-actions">
|
|
1170
|
-
<
|
|
1171
|
-
<
|
|
496
|
+
<Button @click="cancelEditUserInfo">取消</Button>
|
|
497
|
+
<Button
|
|
1172
498
|
type="primary"
|
|
1173
|
-
size="default"
|
|
1174
499
|
:loading="savingUserInfo"
|
|
1175
500
|
@click="saveUserInfo"
|
|
1176
|
-
>保存更改</
|
|
501
|
+
>保存更改</Button>
|
|
1177
502
|
</div>
|
|
1178
503
|
</div>
|
|
1179
504
|
</div>
|
|
1180
505
|
</div>
|
|
1181
|
-
</
|
|
506
|
+
</Dialog>
|
|
1182
507
|
|
|
1183
508
|
<!-- 头像裁剪弹窗 -->
|
|
1184
509
|
<AvatarCrop
|
|
@@ -1188,13 +513,13 @@
|
|
|
1188
513
|
/>
|
|
1189
514
|
|
|
1190
515
|
<!-- 右键菜单 -->
|
|
1191
|
-
<
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
:
|
|
516
|
+
<ContextMenu
|
|
517
|
+
:visible="contextMenu.visible"
|
|
518
|
+
:x="contextMenu.x"
|
|
519
|
+
:y="contextMenu.y"
|
|
1195
520
|
>
|
|
1196
|
-
<div class="
|
|
1197
|
-
</
|
|
521
|
+
<div class="context-menu-item danger" @click="handleRemoveChat">删除聊天</div>
|
|
522
|
+
</ContextMenu>
|
|
1198
523
|
</div>
|
|
1199
524
|
</template>
|
|
1200
525
|
|
|
@@ -1205,34 +530,77 @@ import {
|
|
|
1205
530
|
ChatDotRound,
|
|
1206
531
|
Folder,
|
|
1207
532
|
Picture,
|
|
1208
|
-
ChatLineRound,
|
|
1209
|
-
MoreFilled,
|
|
1210
|
-
Search,
|
|
1211
533
|
Plus,
|
|
534
|
+
User,
|
|
1212
535
|
UserFilled,
|
|
1213
536
|
Bell,
|
|
1214
537
|
Setting,
|
|
1215
|
-
Document,
|
|
1216
|
-
Download,
|
|
1217
538
|
CircleCheck,
|
|
1218
539
|
Edit,
|
|
1219
540
|
Delete,
|
|
1220
541
|
Check,
|
|
1221
542
|
Clock,
|
|
1222
543
|
Close,
|
|
1223
|
-
ArrowRight
|
|
1224
|
-
|
|
544
|
+
ArrowRight,
|
|
545
|
+
ArrowDown,
|
|
546
|
+
Sunny,
|
|
547
|
+
Moon,
|
|
548
|
+
Monitor
|
|
549
|
+
} from './ui/icons/index.js'
|
|
1225
550
|
import { useChat } from '../composables/useChat.js'
|
|
1226
|
-
import {
|
|
551
|
+
import { useTheme } from '../composables/useTheme.js'
|
|
552
|
+
import { THEME_OPTIONS } from '../const/theme.js'
|
|
553
|
+
import { useMessageBox } from '../composables/useMessageBox.js'
|
|
1227
554
|
import AvatarCrop from './AvatarCrop.vue'
|
|
1228
555
|
import EmojiPicker from './EmojiPicker.vue'
|
|
1229
556
|
|
|
557
|
+
// 导入自定义 UI 组件
|
|
558
|
+
import { Button, Dialog, Input, Empty, Tag } from './ui/index.js'
|
|
559
|
+
|
|
560
|
+
// 导入新拆分的子组件
|
|
561
|
+
import Sidebar from './chat/Sidebar.vue'
|
|
562
|
+
import ContentList from './chat/ContentList.vue'
|
|
563
|
+
import MainArea from './chat/MainArea.vue'
|
|
564
|
+
import ChatWindow from './chat/ChatWindow.vue'
|
|
565
|
+
import GroupSidebar from './chat/GroupSidebar.vue'
|
|
566
|
+
import AddFriendDialog from './chat/dialogs/AddFriendDialog.vue'
|
|
567
|
+
import CreateGroupDialog from './chat/dialogs/CreateGroupDialog.vue'
|
|
568
|
+
import GroupDetailDialog from './chat/dialogs/GroupDetailDialog.vue'
|
|
569
|
+
import ContextMenu from './chat/ContextMenu.vue'
|
|
570
|
+
|
|
571
|
+
// 创建 Message 工具函数(简单实现)
|
|
572
|
+
const ElMessage = {
|
|
573
|
+
success: (text) => console.log('Success:', text),
|
|
574
|
+
warning: (text) => console.warn('Warning:', text),
|
|
575
|
+
error: (text) => console.error('Error:', text),
|
|
576
|
+
info: (text) => console.info('Info:', text)
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
const ElMessageBox = useMessageBox()
|
|
580
|
+
|
|
1230
581
|
const props = defineProps({
|
|
1231
|
-
config: { type: Object, required: true }
|
|
582
|
+
config: { type: Object, required: true },
|
|
583
|
+
groupOwnerUsername: { type: String, default: '' }
|
|
1232
584
|
})
|
|
1233
585
|
|
|
1234
586
|
const emit = defineEmits(['message', 'send', 'error', 'init'])
|
|
1235
587
|
|
|
588
|
+
// 初始化主题系统
|
|
589
|
+
const { currentTheme, appliedTheme, setTheme, THEMES } = useTheme()
|
|
590
|
+
|
|
591
|
+
// 图标映射
|
|
592
|
+
const iconMap = {
|
|
593
|
+
sun: Sunny,
|
|
594
|
+
moon: Moon,
|
|
595
|
+
monitor: Monitor
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
// 为 THEME_OPTIONS 绑定图标组件
|
|
599
|
+
const THEME_OPTIONS_WITH_ICONS = THEME_OPTIONS.map(opt => ({
|
|
600
|
+
...opt,
|
|
601
|
+
iconComponent: iconMap[opt.icon]
|
|
602
|
+
}))
|
|
603
|
+
|
|
1236
604
|
const {
|
|
1237
605
|
myUsername,
|
|
1238
606
|
myAvatar,
|
|
@@ -1256,6 +624,7 @@ const {
|
|
|
1256
624
|
// ========== 群聊相关 ==========
|
|
1257
625
|
activeTab,
|
|
1258
626
|
groupList,
|
|
627
|
+
chatList: groupChatList, // 正在聊天的群聊
|
|
1259
628
|
currentSelectGroup,
|
|
1260
629
|
groupMsgList,
|
|
1261
630
|
groupMemberList,
|
|
@@ -1272,6 +641,7 @@ const {
|
|
|
1272
641
|
currentAllMessages,
|
|
1273
642
|
groupInfoVisible,
|
|
1274
643
|
editingGroupInfo,
|
|
644
|
+
isRemoveMemberMode,
|
|
1275
645
|
editingMemberNick,
|
|
1276
646
|
memberNickDialogVisible,
|
|
1277
647
|
msgReadUserDialogVisible,
|
|
@@ -1302,7 +672,7 @@ const {
|
|
|
1302
672
|
getGroupList,
|
|
1303
673
|
getGroupHistory,
|
|
1304
674
|
getGroupMembers,
|
|
1305
|
-
selectGroup,
|
|
675
|
+
selectGroup: selectGroupFromComposable,
|
|
1306
676
|
createGroup,
|
|
1307
677
|
inviteGroupMember,
|
|
1308
678
|
quitGroup,
|
|
@@ -1325,7 +695,8 @@ const {
|
|
|
1325
695
|
updateSingleGroupField,
|
|
1326
696
|
startEditField,
|
|
1327
697
|
cancelEditField,
|
|
1328
|
-
saveEditField
|
|
698
|
+
saveEditField,
|
|
699
|
+
setGroupToChatStatus
|
|
1329
700
|
|
|
1330
701
|
} = useChat(props.config, (message) => {
|
|
1331
702
|
emit('message', message)
|
|
@@ -1334,12 +705,8 @@ const {
|
|
|
1334
705
|
const navTabs = computed(() => {
|
|
1335
706
|
const tabs = [{ id: 'chat', icon: ChatDotRound, badge: 0 }]
|
|
1336
707
|
|
|
1337
|
-
if (props.config.modules.friends) {
|
|
1338
|
-
tabs.push({ id: '
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
if (props.config.modules.groups) {
|
|
1342
|
-
tabs.push({ id: 'groups', icon: UserFilled, badge: 0 })
|
|
708
|
+
if (props.config.modules.friends || props.config.modules.groups) {
|
|
709
|
+
tabs.push({ id: 'contacts', icon: UserFilled, badge: 0 })
|
|
1343
710
|
}
|
|
1344
711
|
|
|
1345
712
|
if (props.config.modules.apply) {
|
|
@@ -1353,6 +720,7 @@ const currentNavTab = ref('chat')
|
|
|
1353
720
|
const currentChatId = ref(null)
|
|
1354
721
|
const currentChat = ref(null)
|
|
1355
722
|
const currentSelectedFriend = ref(null)
|
|
723
|
+
const currentSelectedGroup = ref(null)
|
|
1356
724
|
const showChatDetail = ref(false)
|
|
1357
725
|
const isEditingUserInfo = ref(false)
|
|
1358
726
|
const editingUserInfo = ref({ nickname: '', email: '', phone: '', bio: '' })
|
|
@@ -1367,6 +735,59 @@ const pendingFiles = ref([])
|
|
|
1367
735
|
const contextMenu = ref({ visible: false, x: 0, y: 0, chat: null })
|
|
1368
736
|
const showEmojiPicker = ref(false)
|
|
1369
737
|
|
|
738
|
+
// 联系人列表折叠状态
|
|
739
|
+
const friendsCollapsed = ref(false)
|
|
740
|
+
const groupsCollapsed = ref(false)
|
|
741
|
+
|
|
742
|
+
const chatWindowRef = ref(null)
|
|
743
|
+
|
|
744
|
+
// 组合的聊天列表(好友+群聊)
|
|
745
|
+
const combinedChatList = computed(() => {
|
|
746
|
+
const friends = filteredUsers.value.map(u => ({ ...u, type: 'friend' }))
|
|
747
|
+
|
|
748
|
+
const groups = groupChatList.value.map(g => {
|
|
749
|
+
// 使用接口返回的 groupAvatarList 来生成 memberAvatars
|
|
750
|
+
const memberAvatars = (g.groupAvatarList || []).map((avatarPath, index) => ({
|
|
751
|
+
username: `member-${index}`,
|
|
752
|
+
avatar: `${props.config.api.baseUrl}${avatarPath}`
|
|
753
|
+
})).slice(0, 4)
|
|
754
|
+
|
|
755
|
+
// 获取最后一条消息
|
|
756
|
+
const lastMsg = g.lastMsgContent || '暂无消息'
|
|
757
|
+
|
|
758
|
+
// 获取最后消息发送者
|
|
759
|
+
const lastMsgSender = g.lastMsgSender || ''
|
|
760
|
+
|
|
761
|
+
// 获取未读数
|
|
762
|
+
const unread = g.unreadCount || 0
|
|
763
|
+
|
|
764
|
+
// 获取最后时间
|
|
765
|
+
const lastTime = g.lastMsgTime
|
|
766
|
+
|
|
767
|
+
return {
|
|
768
|
+
id: g.groupId,
|
|
769
|
+
groupId: g.groupId,
|
|
770
|
+
name: g.groupName,
|
|
771
|
+
avatar: `https://api.dicebear.com/7.x/avataaars/svg?seed=${g.groupId}`,
|
|
772
|
+
memberAvatars,
|
|
773
|
+
lastMsg: lastMsg,
|
|
774
|
+
lastMsgSender: lastMsgSender,
|
|
775
|
+
lastTime: lastTime,
|
|
776
|
+
unread: unread,
|
|
777
|
+
type: 'group'
|
|
778
|
+
}
|
|
779
|
+
})
|
|
780
|
+
|
|
781
|
+
const result = [...friends, ...groups].sort((a, b) => {
|
|
782
|
+
// 按时间排序
|
|
783
|
+
if (!a.lastTime) return 1
|
|
784
|
+
if (!b.lastTime) return -1
|
|
785
|
+
return new Date(b.lastTime) - new Date(a.lastTime)
|
|
786
|
+
})
|
|
787
|
+
|
|
788
|
+
return result
|
|
789
|
+
})
|
|
790
|
+
|
|
1370
791
|
// 群聊侧边栏相关
|
|
1371
792
|
const showGroupSidebar = ref(false)
|
|
1372
793
|
const muteGroup = ref(false)
|
|
@@ -1405,13 +826,53 @@ const hideContextMenu = () => {
|
|
|
1405
826
|
|
|
1406
827
|
const handleRemoveChat = async () => {
|
|
1407
828
|
if (!contextMenu.value.chat) return
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
829
|
+
|
|
830
|
+
const chat = contextMenu.value.chat
|
|
831
|
+
|
|
832
|
+
try {
|
|
833
|
+
// 确认对话框
|
|
834
|
+
const confirmText = chat.type === 'group'
|
|
835
|
+
? `确定要删除与「${chat.name}」的群聊吗?`
|
|
836
|
+
: `确定要删除与「${chat.name}」的聊天吗?`
|
|
837
|
+
|
|
838
|
+
await ElMessageBox.confirm(confirmText, '删除聊天', {
|
|
839
|
+
confirmButtonText: '确定',
|
|
840
|
+
cancelButtonText: '取消',
|
|
841
|
+
type: 'warning'
|
|
842
|
+
})
|
|
843
|
+
|
|
844
|
+
let success = false
|
|
845
|
+
|
|
846
|
+
if (chat.type === 'group') {
|
|
847
|
+
// 群聊,使用 setGroupToChatStatus
|
|
848
|
+
success = await setGroupToChatStatus(chat.groupId, 0)
|
|
849
|
+
if (success) {
|
|
850
|
+
if (currentSelectGroup.value?.groupId === chat.groupId) {
|
|
851
|
+
currentSelectGroup.value = null
|
|
852
|
+
currentSelectedGroup.value = null
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
} else {
|
|
856
|
+
// 好友,使用 setFriendToChatStatus
|
|
857
|
+
success = await setFriendToChatStatus(chat.id, 0)
|
|
858
|
+
if (success) {
|
|
859
|
+
if (currentChatId.value === chat.id) {
|
|
860
|
+
currentChatId.value = null
|
|
861
|
+
currentChat.value = null
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
if (success) {
|
|
867
|
+
ElMessage.success('删除聊天成功')
|
|
868
|
+
}
|
|
869
|
+
} catch (error) {
|
|
870
|
+
if (error !== 'cancel') {
|
|
871
|
+
console.error('删除聊天失败:', error)
|
|
872
|
+
ElMessage.error('删除聊天失败')
|
|
1413
873
|
}
|
|
1414
874
|
}
|
|
875
|
+
|
|
1415
876
|
hideContextMenu()
|
|
1416
877
|
}
|
|
1417
878
|
|
|
@@ -1432,19 +893,18 @@ const selectChat = (chat) => {
|
|
|
1432
893
|
|
|
1433
894
|
const selectFriend = (friend) => {
|
|
1434
895
|
currentSelectedFriend.value = friend
|
|
896
|
+
currentSelectedGroup.value = null
|
|
1435
897
|
currentChatId.value = null
|
|
1436
898
|
currentChat.value = null
|
|
1437
899
|
currentSelectGroup.value = null
|
|
1438
900
|
}
|
|
1439
901
|
|
|
1440
|
-
const
|
|
1441
|
-
|
|
902
|
+
const selectGroup = (group) => {
|
|
903
|
+
currentSelectedGroup.value = group
|
|
904
|
+
currentSelectedFriend.value = null
|
|
1442
905
|
currentChatId.value = null
|
|
1443
906
|
currentChat.value = null
|
|
1444
|
-
|
|
1445
|
-
showChatDetail.value = false
|
|
1446
|
-
groupDetailVisible.value = false
|
|
1447
|
-
selectGroup(group)
|
|
907
|
+
currentSelectGroup.value = null
|
|
1448
908
|
}
|
|
1449
909
|
|
|
1450
910
|
const handleStartChat = async () => {
|
|
@@ -1462,6 +922,42 @@ const handleStartChat = async () => {
|
|
|
1462
922
|
}
|
|
1463
923
|
}
|
|
1464
924
|
|
|
925
|
+
const handleStartGroupChat = async () => {
|
|
926
|
+
if (!currentSelectedGroup.value) return
|
|
927
|
+
|
|
928
|
+
const success = await setGroupToChatStatus(currentSelectedGroup.value.groupId, 1)
|
|
929
|
+
if (success) {
|
|
930
|
+
currentNavTab.value = 'chat'
|
|
931
|
+
await nextTick()
|
|
932
|
+
const chatItem = combinedChatList.value.find(item => item.type === 'group' && item.groupId === currentSelectedGroup.value.groupId)
|
|
933
|
+
if (chatItem) {
|
|
934
|
+
selectGroupChat(chatItem)
|
|
935
|
+
} else {
|
|
936
|
+
// 如果在组合列表中没找到,直接选择
|
|
937
|
+
selectGroupChat(currentSelectedGroup.value)
|
|
938
|
+
}
|
|
939
|
+
currentSelectedGroup.value = null
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
const selectGroupChat = async (group) => {
|
|
944
|
+
currentSelectGroup.value = group
|
|
945
|
+
currentChatId.value = null
|
|
946
|
+
currentChat.value = null
|
|
947
|
+
currentSelectedFriend.value = null
|
|
948
|
+
currentSelectedGroup.value = null
|
|
949
|
+
showChatDetail.value = false
|
|
950
|
+
groupDetailVisible.value = false
|
|
951
|
+
|
|
952
|
+
// 如果群聊还不在聊天列表中,设置为聊天状态
|
|
953
|
+
const isInChatList = groupChatList.value.some(g => g.groupId === group.groupId)
|
|
954
|
+
if (!isInChatList) {
|
|
955
|
+
await setGroupToChatStatus(group.groupId, 1)
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
selectGroupFromComposable(group)
|
|
959
|
+
}
|
|
960
|
+
|
|
1465
961
|
const handleAvatarClick = () => {
|
|
1466
962
|
showSettingsDialog.value = true
|
|
1467
963
|
}
|
|
@@ -1588,32 +1084,6 @@ const selectEmoji = (emoji) => {
|
|
|
1588
1084
|
showEmojiPicker.value = false
|
|
1589
1085
|
}
|
|
1590
1086
|
|
|
1591
|
-
// 获取群聊头像网格样式
|
|
1592
|
-
const getGroupAvatarGridStyle = (count, index) => {
|
|
1593
|
-
const styles = {}
|
|
1594
|
-
|
|
1595
|
-
if (count === 1) {
|
|
1596
|
-
styles.width = '100%'
|
|
1597
|
-
styles.height = '100%'
|
|
1598
|
-
} else if (count === 2) {
|
|
1599
|
-
styles.width = '50%'
|
|
1600
|
-
styles.height = '100%'
|
|
1601
|
-
} else if (count === 3) {
|
|
1602
|
-
if (index === 0) {
|
|
1603
|
-
styles.width = '100%'
|
|
1604
|
-
styles.height = '50%'
|
|
1605
|
-
} else {
|
|
1606
|
-
styles.width = '50%'
|
|
1607
|
-
styles.height = '50%'
|
|
1608
|
-
}
|
|
1609
|
-
} else {
|
|
1610
|
-
styles.width = '50%'
|
|
1611
|
-
styles.height = '50%'
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
return styles
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
1087
|
// ========== 群聊相关方法 ==========
|
|
1618
1088
|
const toggleMemberForCreate = (friend) => {
|
|
1619
1089
|
const index = selectedMembersForCreate.value.findIndex(m => m.id === friend.id)
|
|
@@ -1675,9 +1145,24 @@ const handleQuitGroup = async () => {
|
|
|
1675
1145
|
// 处理移除群成员
|
|
1676
1146
|
const handleRemoveMember = async (username) => {
|
|
1677
1147
|
try {
|
|
1678
|
-
await
|
|
1148
|
+
await ElMessageBox.confirm(
|
|
1149
|
+
`确定要将成员“${username}”移出群聊吗?`,
|
|
1150
|
+
'移除成员',
|
|
1151
|
+
{
|
|
1152
|
+
confirmButtonText: '确定',
|
|
1153
|
+
cancelButtonText: '取消',
|
|
1154
|
+
type: 'warning'
|
|
1155
|
+
}
|
|
1156
|
+
)
|
|
1157
|
+
const success = await removeGroupMember(username, false)
|
|
1158
|
+
if (success) {
|
|
1159
|
+
ElMessage.success('移除成功')
|
|
1160
|
+
}
|
|
1679
1161
|
} catch (error) {
|
|
1680
|
-
|
|
1162
|
+
if (error !== 'cancel') {
|
|
1163
|
+
console.error('移除失败', error)
|
|
1164
|
+
ElMessage.error('移除失败')
|
|
1165
|
+
}
|
|
1681
1166
|
}
|
|
1682
1167
|
}
|
|
1683
1168
|
|
|
@@ -1803,1675 +1288,6 @@ onUnmounted(() => {
|
|
|
1803
1288
|
})
|
|
1804
1289
|
</script>
|
|
1805
1290
|
|
|
1806
|
-
<style scoped>
|
|
1807
|
-
|
|
1808
|
-
.chat-panel {
|
|
1809
|
-
display: flex;
|
|
1810
|
-
height: 680px;
|
|
1811
|
-
background: rgba(255, 255, 255, 0.7);
|
|
1812
|
-
backdrop-filter: blur(20px);
|
|
1813
|
-
-webkit-backdrop-filter: blur(20px);
|
|
1814
|
-
overflow: hidden;
|
|
1815
|
-
border-radius: 20px;
|
|
1816
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
|
|
1817
|
-
0 2px 12px rgba(0, 0, 0, 0.08);
|
|
1818
|
-
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
1819
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
/* ========== 左侧导航栏 ========== */
|
|
1823
|
-
.chat-sidebar {
|
|
1824
|
-
width: 64px;
|
|
1825
|
-
display: flex;
|
|
1826
|
-
flex-direction: column;
|
|
1827
|
-
align-items: center;
|
|
1828
|
-
gap: 8px;
|
|
1829
|
-
background: rgba(249, 250, 251, 0.6);
|
|
1830
|
-
backdrop-filter: blur(10px);
|
|
1831
|
-
-webkit-backdrop-filter: blur(10px);
|
|
1832
|
-
border-right: 1px solid rgba(229, 231, 235, 0.5);
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
.sidebar-avatar {
|
|
1836
|
-
margin-top: 16px;
|
|
1837
|
-
margin-bottom: 16px;
|
|
1838
|
-
cursor: pointer;
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
.sidebar-avatar-img {
|
|
1842
|
-
width: 40px;
|
|
1843
|
-
height: 40px;
|
|
1844
|
-
border-radius: 50%;
|
|
1845
|
-
border: 2px solid #e5e7eb;
|
|
1846
|
-
object-fit: cover;
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
.sidebar-nav-item {
|
|
1850
|
-
width: 40px;
|
|
1851
|
-
height: 40px;
|
|
1852
|
-
display: flex;
|
|
1853
|
-
align-items: center;
|
|
1854
|
-
justify-content: center;
|
|
1855
|
-
cursor: pointer;
|
|
1856
|
-
border-radius: 8px;
|
|
1857
|
-
transition: all 0.2s;
|
|
1858
|
-
position: relative;
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
.sidebar-nav-item-active {
|
|
1862
|
-
background-color: #dcfce7;
|
|
1863
|
-
color: #07c160;
|
|
1864
|
-
}
|
|
1865
|
-
|
|
1866
|
-
.sidebar-nav-item-inactive {
|
|
1867
|
-
color: #6b7280;
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
.sidebar-nav-item-inactive:hover {
|
|
1871
|
-
background-color: #f3f4f6;
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
.sidebar-nav-badge {
|
|
1875
|
-
position: absolute;
|
|
1876
|
-
top: -4px;
|
|
1877
|
-
right: -4px;
|
|
1878
|
-
width: 16px;
|
|
1879
|
-
height: 16px;
|
|
1880
|
-
background-color: #ef4444;
|
|
1881
|
-
border-radius: 50%;
|
|
1882
|
-
font-size: 10px;
|
|
1883
|
-
color: white;
|
|
1884
|
-
display: flex;
|
|
1885
|
-
align-items: center;
|
|
1886
|
-
justify-content: center;
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
.sidebar-spacer {
|
|
1890
|
-
flex: 1;
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
/* ========== 中间内容面板 ========== */
|
|
1894
|
-
.chat-content-panel {
|
|
1895
|
-
width: 288px;
|
|
1896
|
-
background: rgba(245, 245, 245, 0.5);
|
|
1897
|
-
backdrop-filter: blur(10px);
|
|
1898
|
-
-webkit-backdrop-filter: blur(10px);
|
|
1899
|
-
border-right: 1px solid rgba(229, 231, 235, 0.5);
|
|
1900
|
-
display: flex;
|
|
1901
|
-
flex-direction: column;
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
.chat-search-bar {
|
|
1905
|
-
padding: 12px;
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
.chat-search-input {
|
|
1909
|
-
width: 100%;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
.chat-content-scroll {
|
|
1913
|
-
flex: 1;
|
|
1914
|
-
overflow-y: auto;
|
|
1915
|
-
min-height: 0;
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
/* 聊天列表项 */
|
|
1919
|
-
.chat-list-item {
|
|
1920
|
-
display: flex;
|
|
1921
|
-
align-items: center;
|
|
1922
|
-
padding: 12px;
|
|
1923
|
-
cursor: pointer;
|
|
1924
|
-
transition: background-color 0.2s;
|
|
1925
|
-
border-radius: 8px;
|
|
1926
|
-
margin: 0 8px;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
.chat-list-item:hover {
|
|
1930
|
-
background: rgba(229, 229, 229, 0.6);
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
.chat-list-item-active {
|
|
1934
|
-
background: rgba(7, 193, 96, 0.15);
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
|
-
.chat-list-avatar-wrapper {
|
|
1938
|
-
position: relative;
|
|
1939
|
-
flex-shrink: 0;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
.chat-list-avatar {
|
|
1943
|
-
width: 44px;
|
|
1944
|
-
height: 44px;
|
|
1945
|
-
border-radius: 50%;
|
|
1946
|
-
object-fit: cover;
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
/* 多方格群聊头像 */
|
|
1950
|
-
.group-avatar-grid {
|
|
1951
|
-
width: 44px;
|
|
1952
|
-
height: 44px;
|
|
1953
|
-
border-radius: 8px;
|
|
1954
|
-
overflow: hidden;
|
|
1955
|
-
display: flex;
|
|
1956
|
-
flex-wrap: wrap;
|
|
1957
|
-
background-color: #f3f4f6;
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
.group-avatar-item {
|
|
1961
|
-
overflow: hidden;
|
|
1962
|
-
box-sizing: border-box;
|
|
1963
|
-
border: 0.5px solid rgba(255, 255, 255, 0.3);
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
.group-avatar-img {
|
|
1967
|
-
width: 100%;
|
|
1968
|
-
height: 100%;
|
|
1969
|
-
object-fit: cover;
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
.chat-list-online-indicator {
|
|
1973
|
-
position: absolute;
|
|
1974
|
-
bottom: 0;
|
|
1975
|
-
right: 0;
|
|
1976
|
-
width: 12px;
|
|
1977
|
-
height: 12px;
|
|
1978
|
-
background-color: #22c55e;
|
|
1979
|
-
border-radius: 50%;
|
|
1980
|
-
border: 2px solid white;
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
.chat-list-online-indicator.chat-list-offline {
|
|
1984
|
-
background-color: #9ca3af;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
.chat-list-info {
|
|
1988
|
-
margin-left: 12px;
|
|
1989
|
-
flex: 1;
|
|
1990
|
-
overflow: hidden;
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
.chat-list-header {
|
|
1994
|
-
display: flex;
|
|
1995
|
-
justify-content: space-between;
|
|
1996
|
-
align-items: center;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
.chat-list-name {
|
|
2000
|
-
font-weight: 500;
|
|
2001
|
-
color: #1f2937;
|
|
2002
|
-
font-size: 14px;
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
.chat-list-time {
|
|
2006
|
-
font-size: 12px;
|
|
2007
|
-
color: #9ca3af;
|
|
2008
|
-
}
|
|
2009
|
-
|
|
2010
|
-
.chat-list-preview {
|
|
2011
|
-
display: flex;
|
|
2012
|
-
justify-content: space-between;
|
|
2013
|
-
align-items: center;
|
|
2014
|
-
margin-top: 4px;
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
.chat-list-last-msg {
|
|
2018
|
-
font-size: 12px;
|
|
2019
|
-
color: #6b7280;
|
|
2020
|
-
overflow: hidden;
|
|
2021
|
-
text-overflow: ellipsis;
|
|
2022
|
-
white-space: nowrap;
|
|
2023
|
-
padding-right: 8px;
|
|
2024
|
-
flex: 1;
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
.chat-list-unread {
|
|
2028
|
-
background-color: #ef4444;
|
|
2029
|
-
color: white;
|
|
2030
|
-
font-size: 10px;
|
|
2031
|
-
border-radius: 9999px;
|
|
2032
|
-
padding: 2px 6px;
|
|
2033
|
-
min-width: 18px;
|
|
2034
|
-
min-height: 18px;
|
|
2035
|
-
height: 18px;
|
|
2036
|
-
display: inline-flex;
|
|
2037
|
-
align-items: center;
|
|
2038
|
-
justify-content: center;
|
|
2039
|
-
text-align: center;
|
|
2040
|
-
line-height: 1;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
/* 添加好友 */
|
|
2044
|
-
.add-friend-section {
|
|
2045
|
-
padding: 12px;
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
.add-friend-btn {
|
|
2049
|
-
display: flex;
|
|
2050
|
-
align-items: center;
|
|
2051
|
-
gap: 8px;
|
|
2052
|
-
padding: 8px;
|
|
2053
|
-
border-radius: 8px;
|
|
2054
|
-
cursor: pointer;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
.add-friend-btn:hover {
|
|
2058
|
-
background-color: #e5e5e5;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
.add-friend-icon {
|
|
2062
|
-
width: 44px;
|
|
2063
|
-
height: 44px;
|
|
2064
|
-
background-color: #07c160;
|
|
2065
|
-
border-radius: 8px;
|
|
2066
|
-
display: flex;
|
|
2067
|
-
align-items: center;
|
|
2068
|
-
justify-content: center;
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
.add-friend-text {
|
|
2072
|
-
font-size: 14px;
|
|
2073
|
-
color: #1f2937;
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
/* 好友申请 */
|
|
2077
|
-
.friend-request-item {
|
|
2078
|
-
display: flex;
|
|
2079
|
-
align-items: center;
|
|
2080
|
-
justify-content: space-between;
|
|
2081
|
-
padding: 12px;
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
.friend-request-item:hover {
|
|
2085
|
-
background-color: #e5e5e5;
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2088
|
-
.friend-request-info {
|
|
2089
|
-
display: flex;
|
|
2090
|
-
align-items: center;
|
|
2091
|
-
}
|
|
2092
|
-
|
|
2093
|
-
.friend-request-avatar {
|
|
2094
|
-
width: 44px;
|
|
2095
|
-
height: 44px;
|
|
2096
|
-
border-radius: 50%;
|
|
2097
|
-
object-fit: cover;
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
.friend-request-details {
|
|
2101
|
-
margin-left: 12px;
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
.friend-request-username {
|
|
2105
|
-
font-weight: 500;
|
|
2106
|
-
color: #1f2937;
|
|
2107
|
-
font-size: 14px;
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
.friend-request-desc {
|
|
2111
|
-
font-size: 12px;
|
|
2112
|
-
color: #6b7280;
|
|
2113
|
-
margin-top: 4px;
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
/* ========== 右侧聊天区域 ========== */
|
|
2117
|
-
.chat-main-area {
|
|
2118
|
-
flex: 1;
|
|
2119
|
-
display: flex;
|
|
2120
|
-
flex-direction: column;
|
|
2121
|
-
min-width: 0;
|
|
2122
|
-
background: rgba(255, 255, 255, 0.5);
|
|
2123
|
-
backdrop-filter: blur(10px);
|
|
2124
|
-
-webkit-backdrop-filter: blur(10px);
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
/* 好友信息 */
|
|
2128
|
-
.friend-profile-area {
|
|
2129
|
-
flex: 1;
|
|
2130
|
-
display: flex;
|
|
2131
|
-
flex-direction: column;
|
|
2132
|
-
align-items: center;
|
|
2133
|
-
justify-content: center;
|
|
2134
|
-
padding: 32px;
|
|
2135
|
-
background: rgba(245, 245, 245, 0.4);
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2138
|
-
.profile-avatar {
|
|
2139
|
-
width: 96px;
|
|
2140
|
-
height: 96px;
|
|
2141
|
-
border-radius: 50%;
|
|
2142
|
-
object-fit: cover;
|
|
2143
|
-
margin-bottom: 24px;
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
.profile-name {
|
|
2147
|
-
font-size: 20px;
|
|
2148
|
-
font-weight: 500;
|
|
2149
|
-
color: #1f2937;
|
|
2150
|
-
margin-bottom: 8px;
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
|
-
.profile-status {
|
|
2154
|
-
display: flex;
|
|
2155
|
-
align-items: center;
|
|
2156
|
-
gap: 8px;
|
|
2157
|
-
margin-bottom: 32px;
|
|
2158
|
-
}
|
|
2159
|
-
|
|
2160
|
-
.profile-status-dot {
|
|
2161
|
-
width: 8px;
|
|
2162
|
-
height: 8px;
|
|
2163
|
-
border-radius: 50%;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
.profile-status-online {
|
|
2167
|
-
background-color: #22c55e;
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
.profile-status-offline {
|
|
2171
|
-
background-color: #9ca3af;
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
.profile-start-chat-btn {
|
|
2175
|
-
width: 160px;
|
|
2176
|
-
}
|
|
2177
|
-
|
|
2178
|
-
/* 聊天窗口 */
|
|
2179
|
-
.chat-window-area {
|
|
2180
|
-
flex: 1;
|
|
2181
|
-
display: flex;
|
|
2182
|
-
flex-direction: column;
|
|
2183
|
-
min-height: 0;
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
.chat-window-header {
|
|
2187
|
-
height: 56px;
|
|
2188
|
-
border-bottom: 1px solid rgba(229, 231, 235, 0.5);
|
|
2189
|
-
display: flex;
|
|
2190
|
-
align-items: center;
|
|
2191
|
-
justify-content: space-between;
|
|
2192
|
-
padding: 0 16px;
|
|
2193
|
-
background: rgba(255, 255, 255, 0.3);
|
|
2194
|
-
backdrop-filter: blur(10px);
|
|
2195
|
-
-webkit-backdrop-filter: blur(10px);
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
.chat-window-title {
|
|
2199
|
-
display: flex;
|
|
2200
|
-
align-items: center;
|
|
2201
|
-
gap: 12px;
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
.chat-window-name {
|
|
2205
|
-
font-weight: 500;
|
|
2206
|
-
color: #1f2937;
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
.chat-window-status {
|
|
2210
|
-
font-size: 12px;
|
|
2211
|
-
padding: 2px 8px;
|
|
2212
|
-
border-radius: 4px;
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
.chat-window-status-online {
|
|
2216
|
-
background-color: #dcfce7;
|
|
2217
|
-
color: #16a34a;
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
.chat-window-status-offline {
|
|
2221
|
-
background-color: #f3f4f6;
|
|
2222
|
-
color: #6b7280;
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
.chat-window-actions {
|
|
2226
|
-
display: flex;
|
|
2227
|
-
align-items: center;
|
|
2228
|
-
gap: 12px;
|
|
2229
|
-
color: #6b7280;
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
.chat-action-icon {
|
|
2233
|
-
cursor: pointer;
|
|
2234
|
-
}
|
|
2235
|
-
|
|
2236
|
-
.chat-action-icon:hover {
|
|
2237
|
-
color: #374151;
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
/* 消息容器 */
|
|
2241
|
-
.chat-messages-container {
|
|
2242
|
-
flex: 1;
|
|
2243
|
-
overflow-y: auto;
|
|
2244
|
-
padding: 16px;
|
|
2245
|
-
background: rgba(245, 245, 245, 0.3);
|
|
2246
|
-
min-height: 0;
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
.chat-messages-container::-webkit-scrollbar {
|
|
2250
|
-
width: 6px;
|
|
2251
|
-
}
|
|
2252
|
-
|
|
2253
|
-
.chat-messages-container::-webkit-scrollbar-thumb {
|
|
2254
|
-
background: #ccc;
|
|
2255
|
-
border-radius: 3px;
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
.chat-messages-container::-webkit-scrollbar-track {
|
|
2259
|
-
background: transparent;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
/* 消息样式 */
|
|
2263
|
-
.message-wrapper {
|
|
2264
|
-
display: flex;
|
|
2265
|
-
margin-bottom: 24px;
|
|
2266
|
-
align-items: flex-start;
|
|
2267
|
-
}
|
|
2268
|
-
|
|
2269
|
-
.message-self {
|
|
2270
|
-
flex-direction: row-reverse;
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
.message-other {
|
|
2274
|
-
flex-direction: row;
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
.message-avatar {
|
|
2278
|
-
flex-shrink: 0;
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
.message-avatar-img {
|
|
2282
|
-
width: 40px;
|
|
2283
|
-
height: 40px;
|
|
2284
|
-
border-radius: 8px;
|
|
2285
|
-
object-fit: cover;
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
.message-content {
|
|
2289
|
-
display: flex;
|
|
2290
|
-
flex-direction: column;
|
|
2291
|
-
max-width: 75%;
|
|
2292
|
-
}
|
|
2293
|
-
|
|
2294
|
-
.message-content-self {
|
|
2295
|
-
margin-right: 12px;
|
|
2296
|
-
align-items: flex-end;
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
.message-content-other {
|
|
2300
|
-
margin-left: 12px;
|
|
2301
|
-
align-items: flex-start;
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
.message-sender-name {
|
|
2305
|
-
font-size: 12px;
|
|
2306
|
-
color: #6b7280;
|
|
2307
|
-
margin-bottom: 4px;
|
|
2308
|
-
margin-left: 4px;
|
|
2309
|
-
}
|
|
2310
|
-
|
|
2311
|
-
.message-bubble-wrapper {
|
|
2312
|
-
position: relative;
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
.message-bubble {
|
|
2316
|
-
padding: 8px 12px;
|
|
2317
|
-
font-size: 14px;
|
|
2318
|
-
word-break: break-all;
|
|
2319
|
-
white-space: pre-wrap;
|
|
2320
|
-
border-radius: 8px;
|
|
2321
|
-
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
.message-bubble-self {
|
|
2325
|
-
background-color: #95ec69;
|
|
2326
|
-
color: #1f2937;
|
|
2327
|
-
position: relative;
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2330
|
-
.message-bubble-self::after {
|
|
2331
|
-
content: '';
|
|
2332
|
-
position: absolute;
|
|
2333
|
-
right: -5px;
|
|
2334
|
-
top: 10px;
|
|
2335
|
-
width: 10px;
|
|
2336
|
-
height: 10px;
|
|
2337
|
-
background-color: #95ec69;
|
|
2338
|
-
transform: rotate(45deg);
|
|
2339
|
-
box-shadow: 2px -2px 2px 0 rgba(0, 0, 0, 0.05);
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
.message-bubble-other {
|
|
2343
|
-
background-color: white;
|
|
2344
|
-
color: #1f2937;
|
|
2345
|
-
position: relative;
|
|
2346
|
-
}
|
|
2347
|
-
|
|
2348
|
-
.message-bubble-other::after {
|
|
2349
|
-
content: '';
|
|
2350
|
-
position: absolute;
|
|
2351
|
-
left: -5px;
|
|
2352
|
-
top: 10px;
|
|
2353
|
-
width: 10px;
|
|
2354
|
-
height: 10px;
|
|
2355
|
-
background-color: white;
|
|
2356
|
-
transform: rotate(45deg);
|
|
2357
|
-
box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.05);
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
|
-
/* 图片消息 */
|
|
2361
|
-
.message-image-bubble {
|
|
2362
|
-
border-radius: 8px;
|
|
2363
|
-
position: relative;
|
|
2364
|
-
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
2365
|
-
cursor: pointer;
|
|
2366
|
-
overflow: hidden;
|
|
2367
|
-
max-width: 300px;
|
|
2368
|
-
padding: 0;
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
.message-image {
|
|
2372
|
-
width: 100%;
|
|
2373
|
-
height: auto;
|
|
2374
|
-
display: block;
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
.message-image-size {
|
|
2378
|
-
position: absolute;
|
|
2379
|
-
left: 4px;
|
|
2380
|
-
bottom: 0;
|
|
2381
|
-
color: white;
|
|
2382
|
-
font-size: 10px;
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
|
-
/* 文件消息 */
|
|
2386
|
-
.message-file-bubble {
|
|
2387
|
-
border-radius: 8px;
|
|
2388
|
-
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
2389
|
-
cursor: pointer;
|
|
2390
|
-
overflow: hidden;
|
|
2391
|
-
min-width: 200px;
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
.message-file-content {
|
|
2395
|
-
display: flex;
|
|
2396
|
-
align-items: center;
|
|
2397
|
-
gap: 12px;
|
|
2398
|
-
padding: 12px 16px;
|
|
2399
|
-
}
|
|
2400
|
-
|
|
2401
|
-
.message-file-icon {
|
|
2402
|
-
width: 40px;
|
|
2403
|
-
height: 40px;
|
|
2404
|
-
display: flex;
|
|
2405
|
-
align-items: center;
|
|
2406
|
-
justify-content: center;
|
|
2407
|
-
border-radius: 8px;
|
|
2408
|
-
flex-shrink: 0;
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
.message-bubble-self .message-file-icon {
|
|
2412
|
-
color: #374151;
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2415
|
-
.message-bubble-other .message-file-icon {
|
|
2416
|
-
color: #6b7280;
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
.message-file-info {
|
|
2420
|
-
flex: 1;
|
|
2421
|
-
min-width: 0;
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
.message-file-name {
|
|
2425
|
-
overflow: hidden;
|
|
2426
|
-
text-overflow: ellipsis;
|
|
2427
|
-
font-size: 14px;
|
|
2428
|
-
font-weight: 500;
|
|
2429
|
-
line-height: 1.2;
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
.message-bubble-self .message-file-name {
|
|
2433
|
-
color: #1f2937;
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
.message-bubble-other .message-file-name {
|
|
2437
|
-
color: #1f2937;
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
.message-file-meta {
|
|
2441
|
-
font-size: 12px;
|
|
2442
|
-
margin-top: 4px;
|
|
2443
|
-
display: flex;
|
|
2444
|
-
align-items: center;
|
|
2445
|
-
gap: 8px;
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
|
-
.message-bubble-self .message-file-meta {
|
|
2449
|
-
color: #4b5563;
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
.message-bubble-other .message-file-meta {
|
|
2453
|
-
color: #6b7280;
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
.message-time {
|
|
2457
|
-
font-size: 10px;
|
|
2458
|
-
color: #9ca3af;
|
|
2459
|
-
margin-top: 4px;
|
|
2460
|
-
}
|
|
2461
|
-
|
|
2462
|
-
.message-time-right {
|
|
2463
|
-
text-align: right;
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
.message-time-left {
|
|
2467
|
-
text-align: left;
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
/* 输入区域 */
|
|
2471
|
-
.chat-input-area {
|
|
2472
|
-
background: rgba(255, 255, 255, 0.6);
|
|
2473
|
-
backdrop-filter: blur(10px);
|
|
2474
|
-
-webkit-backdrop-filter: blur(10px);
|
|
2475
|
-
border-top: 1px solid rgba(229, 231, 235, 0.5);
|
|
2476
|
-
position: relative;
|
|
2477
|
-
}
|
|
2478
|
-
|
|
2479
|
-
/* 表情按钮包装 */
|
|
2480
|
-
.emoji-button-wrapper {
|
|
2481
|
-
position: relative;
|
|
2482
|
-
display: inline-block;
|
|
2483
|
-
}
|
|
2484
|
-
|
|
2485
|
-
.pending-files-area {
|
|
2486
|
-
padding: 8px 12px;
|
|
2487
|
-
border-bottom: 1px solid #f3f4f6;
|
|
2488
|
-
display: flex;
|
|
2489
|
-
flex-wrap: wrap;
|
|
2490
|
-
gap: 8px;
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
|
-
.pending-file-item {
|
|
2494
|
-
position: relative;
|
|
2495
|
-
}
|
|
2496
|
-
|
|
2497
|
-
.pending-image-wrapper {
|
|
2498
|
-
position: relative;
|
|
2499
|
-
width: 80px;
|
|
2500
|
-
height: 80px;
|
|
2501
|
-
border-radius: 8px;
|
|
2502
|
-
overflow: hidden;
|
|
2503
|
-
border: 1px solid #e5e7eb;
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
.pending-image {
|
|
2507
|
-
width: 100%;
|
|
2508
|
-
height: 100%;
|
|
2509
|
-
object-fit: cover;
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
|
-
.pending-file-wrapper {
|
|
2513
|
-
position: relative;
|
|
2514
|
-
width: 96px;
|
|
2515
|
-
height: 80px;
|
|
2516
|
-
border-radius: 8px;
|
|
2517
|
-
border: 1px solid #e5e7eb;
|
|
2518
|
-
background-color: #f9fafb;
|
|
2519
|
-
display: flex;
|
|
2520
|
-
flex-direction: column;
|
|
2521
|
-
align-items: center;
|
|
2522
|
-
justify-content: center;
|
|
2523
|
-
padding: 4px;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
.pending-file-icon {
|
|
2527
|
-
color: #9ca3af;
|
|
2528
|
-
font-size: 28px;
|
|
2529
|
-
margin-bottom: 4px;
|
|
2530
|
-
}
|
|
2531
|
-
|
|
2532
|
-
.pending-file-name {
|
|
2533
|
-
font-size: 10px;
|
|
2534
|
-
color: #6b7280;
|
|
2535
|
-
overflow: hidden;
|
|
2536
|
-
text-overflow: ellipsis;
|
|
2537
|
-
white-space: nowrap;
|
|
2538
|
-
width: 100%;
|
|
2539
|
-
text-align: center;
|
|
2540
|
-
padding: 0 4px;
|
|
2541
|
-
}
|
|
2542
|
-
|
|
2543
|
-
.pending-file-remove-btn {
|
|
2544
|
-
position: absolute;
|
|
2545
|
-
top: 4px;
|
|
2546
|
-
right: 4px;
|
|
2547
|
-
width: 20px;
|
|
2548
|
-
height: 20px;
|
|
2549
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
2550
|
-
color: white;
|
|
2551
|
-
border-radius: 50%;
|
|
2552
|
-
display: flex;
|
|
2553
|
-
align-items: center;
|
|
2554
|
-
justify-content: center;
|
|
2555
|
-
cursor: pointer;
|
|
2556
|
-
transition: background-color 0.2s;
|
|
2557
|
-
font-size: 14px;
|
|
2558
|
-
border: none;
|
|
2559
|
-
}
|
|
2560
|
-
|
|
2561
|
-
.pending-file-remove-btn:hover {
|
|
2562
|
-
background-color: rgba(0, 0, 0, 0.7);
|
|
2563
|
-
}
|
|
2564
|
-
|
|
2565
|
-
.input-toolbar {
|
|
2566
|
-
display: flex;
|
|
2567
|
-
align-items: center;
|
|
2568
|
-
padding: 12px;
|
|
2569
|
-
gap: 8px;
|
|
2570
|
-
}
|
|
2571
|
-
|
|
2572
|
-
.input-toolbar-icon {
|
|
2573
|
-
color: #6b7280;
|
|
2574
|
-
cursor: pointer;
|
|
2575
|
-
font-size: 20px;
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
|
-
.input-toolbar-icon:hover {
|
|
2579
|
-
color: #374151;
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2582
|
-
.input-textarea-wrapper {
|
|
2583
|
-
padding: 0 12px 12px;
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2586
|
-
.message-input-textarea {
|
|
2587
|
-
width: 100%;
|
|
2588
|
-
resize: none;
|
|
2589
|
-
border: none;
|
|
2590
|
-
outline: none;
|
|
2591
|
-
font-size: 14px;
|
|
2592
|
-
height: 80px;
|
|
2593
|
-
font-family: inherit;
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
.input-send-wrapper {
|
|
2597
|
-
display: flex;
|
|
2598
|
-
justify-content: flex-end;
|
|
2599
|
-
padding: 0 12px 12px;
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
.send-message-btn {
|
|
2603
|
-
background-color: #07c160;
|
|
2604
|
-
border: none;
|
|
2605
|
-
font-size: 14px;
|
|
2606
|
-
padding: 8px 24px;
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
.send-message-btn:hover {
|
|
2610
|
-
background-color: #06ad56;
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
.hidden-file-input {
|
|
2614
|
-
display: none;
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
|
-
/* 空状态 */
|
|
2618
|
-
.chat-empty-state {
|
|
2619
|
-
flex: 1;
|
|
2620
|
-
display: flex;
|
|
2621
|
-
align-items: center;
|
|
2622
|
-
justify-content: center;
|
|
2623
|
-
flex-direction: column;
|
|
2624
|
-
background-color: #f5f5f5;
|
|
2625
|
-
}
|
|
2626
|
-
|
|
2627
|
-
.empty-state-icon {
|
|
2628
|
-
color: #d1d5db;
|
|
2629
|
-
margin-bottom: 8px;
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
.empty-state-text {
|
|
2633
|
-
color: #9ca3af;
|
|
2634
|
-
font-size: 14px;
|
|
2635
|
-
}
|
|
2636
|
-
|
|
2637
|
-
/* ========== 右侧详情面板 ========== */
|
|
2638
|
-
.chat-detail-panel {
|
|
2639
|
-
width: 256px;
|
|
2640
|
-
background: rgba(245, 245, 245, 0.5);
|
|
2641
|
-
backdrop-filter: blur(10px);
|
|
2642
|
-
-webkit-backdrop-filter: blur(10px);
|
|
2643
|
-
border-left: 1px solid rgba(229, 231, 235, 0.5);
|
|
2644
|
-
display: flex;
|
|
2645
|
-
flex-direction: column;
|
|
2646
|
-
}
|
|
2647
|
-
|
|
2648
|
-
.chat-detail-header {
|
|
2649
|
-
height: 56px;
|
|
2650
|
-
display: flex;
|
|
2651
|
-
align-items: center;
|
|
2652
|
-
justify-content: center;
|
|
2653
|
-
border-bottom: 1px solid rgba(229, 231, 235, 0.5);
|
|
2654
|
-
font-weight: 500;
|
|
2655
|
-
color: #374151;
|
|
2656
|
-
font-size: 14px;
|
|
2657
|
-
}
|
|
2658
|
-
|
|
2659
|
-
.chat-detail-content {
|
|
2660
|
-
flex: 1;
|
|
2661
|
-
padding: 16px;
|
|
2662
|
-
}
|
|
2663
|
-
|
|
2664
|
-
.chat-detail-profile {
|
|
2665
|
-
display: flex;
|
|
2666
|
-
flex-direction: column;
|
|
2667
|
-
align-items: center;
|
|
2668
|
-
}
|
|
2669
|
-
|
|
2670
|
-
.chat-detail-avatar {
|
|
2671
|
-
width: 80px;
|
|
2672
|
-
height: 80px;
|
|
2673
|
-
border-radius: 50%;
|
|
2674
|
-
object-fit: cover;
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
.chat-detail-name {
|
|
2678
|
-
margin-top: 12px;
|
|
2679
|
-
font-weight: 500;
|
|
2680
|
-
color: #1f2937;
|
|
2681
|
-
font-size: 18px;
|
|
2682
|
-
}
|
|
2683
|
-
|
|
2684
|
-
.chat-detail-actions {
|
|
2685
|
-
margin-top: 24px;
|
|
2686
|
-
width: 100%;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
.chat-detail-action-item {
|
|
2690
|
-
padding: 12px;
|
|
2691
|
-
border-bottom: 1px solid #f3f4f6;
|
|
2692
|
-
cursor: pointer;
|
|
2693
|
-
background-color: white;
|
|
2694
|
-
font-size: 14px;
|
|
2695
|
-
color: #374151;
|
|
2696
|
-
}
|
|
2697
|
-
|
|
2698
|
-
.chat-detail-action-item:hover {
|
|
2699
|
-
background-color: #f9fafb;
|
|
2700
|
-
}
|
|
2701
|
-
|
|
2702
|
-
.chat-detail-action-item:first-child {
|
|
2703
|
-
border-radius: 8px 8px 0 0;
|
|
2704
|
-
}
|
|
2705
|
-
|
|
2706
|
-
.chat-detail-action-item:last-child {
|
|
2707
|
-
border-bottom: none;
|
|
2708
|
-
border-radius: 0 0 8px 8px;
|
|
2709
|
-
}
|
|
2710
|
-
|
|
2711
|
-
/* ========== 添加好友搜索 ========== */
|
|
2712
|
-
.add-friend-search-wrapper {
|
|
2713
|
-
margin-bottom: 16px;
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
.add-friend-search-input {
|
|
2717
|
-
width: 100%;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
.add-friend-users-list {
|
|
2721
|
-
max-height: 400px;
|
|
2722
|
-
overflow-y: auto;
|
|
2723
|
-
}
|
|
2724
|
-
|
|
2725
|
-
.add-friend-user-item {
|
|
2726
|
-
display: flex;
|
|
2727
|
-
align-items: center;
|
|
2728
|
-
justify-content: space-between;
|
|
2729
|
-
padding: 12px;
|
|
2730
|
-
margin-bottom: 8px;
|
|
2731
|
-
border-radius: 8px;
|
|
2732
|
-
transition: background-color 0.2s;
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
.add-friend-user-item:hover {
|
|
2736
|
-
background-color: #f9fafb;
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
.add-friend-user-info {
|
|
2740
|
-
display: flex;
|
|
2741
|
-
align-items: center;
|
|
2742
|
-
}
|
|
2743
|
-
|
|
2744
|
-
.add-friend-user-avatar {
|
|
2745
|
-
width: 40px;
|
|
2746
|
-
height: 40px;
|
|
2747
|
-
border-radius: 50%;
|
|
2748
|
-
object-fit: cover;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
.add-friend-user-name {
|
|
2752
|
-
margin-left: 12px;
|
|
2753
|
-
font-weight: 500;
|
|
2754
|
-
color: #1f2937;
|
|
2755
|
-
font-size: 14px;
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
/* ========== 设置弹窗 ========== */
|
|
2759
|
-
.chat-settings-dialog :deep(.el-dialog) {
|
|
2760
|
-
border-radius: 16px;
|
|
2761
|
-
overflow: hidden;
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
.chat-settings-dialog :deep(.el-dialog__header) {
|
|
2765
|
-
padding: 24px 24px 0;
|
|
2766
|
-
margin: 0;
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
.chat-settings-dialog :deep(.el-dialog__title) {
|
|
2770
|
-
font-size: 20px;
|
|
2771
|
-
font-weight: 600;
|
|
2772
|
-
color: #1f2937;
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
.chat-settings-container {
|
|
2776
|
-
display: flex;
|
|
2777
|
-
flex-direction: column;
|
|
2778
|
-
}
|
|
2779
|
-
|
|
2780
|
-
.chat-settings-avatar-section {
|
|
2781
|
-
display: flex;
|
|
2782
|
-
flex-direction: column;
|
|
2783
|
-
align-items: center;
|
|
2784
|
-
margin-bottom: 32px;
|
|
2785
|
-
padding-bottom: 24px;
|
|
2786
|
-
border-bottom: 1px solid #f3f4f6;
|
|
2787
|
-
}
|
|
2788
|
-
|
|
2789
|
-
.chat-settings-avatar-wrapper {
|
|
2790
|
-
position: relative;
|
|
2791
|
-
margin-bottom: 16px;
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
.chat-settings-avatar {
|
|
2795
|
-
width: 112px;
|
|
2796
|
-
height: 112px;
|
|
2797
|
-
border-radius: 50%;
|
|
2798
|
-
object-fit: cover;
|
|
2799
|
-
border: 4px solid white;
|
|
2800
|
-
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
|
-
.chat-settings-avatar-edit {
|
|
2804
|
-
position: absolute;
|
|
2805
|
-
bottom: -4px;
|
|
2806
|
-
right: -4px;
|
|
2807
|
-
width: 40px;
|
|
2808
|
-
height: 40px;
|
|
2809
|
-
background-color: #07c160;
|
|
2810
|
-
border-radius: 50%;
|
|
2811
|
-
display: flex;
|
|
2812
|
-
align-items: center;
|
|
2813
|
-
justify-content: center;
|
|
2814
|
-
cursor: pointer;
|
|
2815
|
-
transition: background-color 0.2s;
|
|
2816
|
-
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
.chat-settings-avatar-edit:hover {
|
|
2820
|
-
background-color: #06ad56;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
.chat-settings-avatar-icon {
|
|
2824
|
-
color: white;
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
.hidden-avatar-input {
|
|
2828
|
-
display: none;
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
.chat-settings-user-display {
|
|
2832
|
-
text-align: center;
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
.chat-settings-nickname {
|
|
2836
|
-
font-weight: 600;
|
|
2837
|
-
color: #1f2937;
|
|
2838
|
-
font-size: 20px;
|
|
2839
|
-
}
|
|
2840
|
-
|
|
2841
|
-
.chat-settings-username {
|
|
2842
|
-
font-size: 14px;
|
|
2843
|
-
color: #6b7280;
|
|
2844
|
-
margin-top: 4px;
|
|
2845
|
-
}
|
|
2846
|
-
|
|
2847
|
-
.chat-settings-form-section {
|
|
2848
|
-
gap: 20px;
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2851
|
-
.chat-settings-form-header {
|
|
2852
|
-
display: flex;
|
|
2853
|
-
align-items: center;
|
|
2854
|
-
justify-content: space-between;
|
|
2855
|
-
margin-bottom: 8px;
|
|
2856
|
-
}
|
|
2857
|
-
|
|
2858
|
-
.chat-settings-form-title {
|
|
2859
|
-
color: #374151;
|
|
2860
|
-
font-weight: 600;
|
|
2861
|
-
display: flex;
|
|
2862
|
-
align-items: center;
|
|
2863
|
-
gap: 8px;
|
|
2864
|
-
font-size: 14px;
|
|
2865
|
-
}
|
|
2866
|
-
|
|
2867
|
-
.chat-settings-edit-btn {
|
|
2868
|
-
border-radius: 9999px;
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
|
-
.chat-settings-form {
|
|
2872
|
-
background-color: #f9fafb;
|
|
2873
|
-
border-radius: 16px;
|
|
2874
|
-
padding: 24px;
|
|
2875
|
-
gap: 20px;
|
|
2876
|
-
display: flex;
|
|
2877
|
-
flex-direction: column;
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2880
|
-
.chat-settings-form-item {
|
|
2881
|
-
display: flex;
|
|
2882
|
-
flex-direction: column;
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
|
-
.chat-settings-form-label {
|
|
2886
|
-
display: block;
|
|
2887
|
-
font-size: 14px;
|
|
2888
|
-
color: #4b5563;
|
|
2889
|
-
margin-bottom: 8px;
|
|
2890
|
-
font-weight: 500;
|
|
2891
|
-
}
|
|
2892
|
-
|
|
2893
|
-
.chat-settings-form-value {
|
|
2894
|
-
color: #1f2937;
|
|
2895
|
-
background-color: white;
|
|
2896
|
-
border-radius: 8px;
|
|
2897
|
-
padding: 12px 16px;
|
|
2898
|
-
border: 1px solid #e5e7eb;
|
|
2899
|
-
font-size: 14px;
|
|
2900
|
-
}
|
|
2901
|
-
|
|
2902
|
-
.chat-settings-form-value.bio-value {
|
|
2903
|
-
min-height: 80px;
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
|
-
.chat-settings-form-actions {
|
|
2907
|
-
display: flex;
|
|
2908
|
-
gap: 12px;
|
|
2909
|
-
justify-content: flex-end;
|
|
2910
|
-
padding-top: 8px;
|
|
2911
|
-
}
|
|
2912
|
-
|
|
2913
|
-
/* ========== 右键菜单 ========== */
|
|
2914
|
-
.chat-context-menu {
|
|
2915
|
-
position: fixed;
|
|
2916
|
-
background: rgba(255, 255, 255, 0.9);
|
|
2917
|
-
backdrop-filter: blur(20px);
|
|
2918
|
-
-webkit-backdrop-filter: blur(20px);
|
|
2919
|
-
border-radius: 12px;
|
|
2920
|
-
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
|
|
2921
|
-
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
2922
|
-
padding: 4px 0;
|
|
2923
|
-
z-index: 1000;
|
|
2924
|
-
}
|
|
2925
|
-
|
|
2926
|
-
.chat-context-menu-item {
|
|
2927
|
-
padding: 8px 16px;
|
|
2928
|
-
cursor: pointer;
|
|
2929
|
-
font-size: 14px;
|
|
2930
|
-
color: #374151;
|
|
2931
|
-
margin: 2px 4px;
|
|
2932
|
-
border-radius: 8px;
|
|
2933
|
-
transition: background-color 0.2s;
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
|
-
.chat-context-menu-item:hover {
|
|
2937
|
-
background-color: rgba(243, 244, 246, 0.8);
|
|
2938
|
-
}
|
|
2939
|
-
|
|
2940
|
-
/* ========== 群聊相关样式 ========== */
|
|
2941
|
-
.create-group-form {
|
|
2942
|
-
display: flex;
|
|
2943
|
-
flex-direction: column;
|
|
2944
|
-
gap: 20px;
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
.form-item {
|
|
2948
|
-
display: flex;
|
|
2949
|
-
flex-direction: column;
|
|
2950
|
-
gap: 8px;
|
|
2951
|
-
}
|
|
2952
|
-
|
|
2953
|
-
.form-label {
|
|
2954
|
-
font-size: 14px;
|
|
2955
|
-
font-weight: 500;
|
|
2956
|
-
color: #374151;
|
|
2957
|
-
}
|
|
2958
|
-
|
|
2959
|
-
.member-selection {
|
|
2960
|
-
border: 1px solid #e5e7eb;
|
|
2961
|
-
border-radius: 8px;
|
|
2962
|
-
padding: 12px;
|
|
2963
|
-
background-color: #f9fafb;
|
|
2964
|
-
}
|
|
2965
|
-
|
|
2966
|
-
.member-list {
|
|
2967
|
-
display: grid;
|
|
2968
|
-
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
|
|
2969
|
-
gap: 12px;
|
|
2970
|
-
}
|
|
2971
|
-
|
|
2972
|
-
.member-item {
|
|
2973
|
-
display: flex;
|
|
2974
|
-
flex-direction: column;
|
|
2975
|
-
align-items: center;
|
|
2976
|
-
padding: 12px 8px;
|
|
2977
|
-
border-radius: 8px;
|
|
2978
|
-
cursor: pointer;
|
|
2979
|
-
transition: background-color 0.2s;
|
|
2980
|
-
border: 2px solid transparent;
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
|
-
.member-item:hover {
|
|
2984
|
-
background-color: rgba(243, 244, 246, 0.8);
|
|
2985
|
-
}
|
|
2986
|
-
|
|
2987
|
-
.member-item.member-selected {
|
|
2988
|
-
border-color: #07c160;
|
|
2989
|
-
background-color: rgba(7, 193, 96, 0.05);
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
.member-item img {
|
|
2993
|
-
width: 56px;
|
|
2994
|
-
height: 56px;
|
|
2995
|
-
border-radius: 50%;
|
|
2996
|
-
object-fit: cover;
|
|
2997
|
-
margin-bottom: 8px;
|
|
2998
|
-
}
|
|
2999
|
-
|
|
3000
|
-
.member-item span {
|
|
3001
|
-
font-size: 13px;
|
|
3002
|
-
color: #374151;
|
|
3003
|
-
text-align: center;
|
|
3004
|
-
overflow: hidden;
|
|
3005
|
-
text-overflow: ellipsis;
|
|
3006
|
-
white-space: nowrap;
|
|
3007
|
-
max-width: 100%;
|
|
3008
|
-
}
|
|
3009
|
-
|
|
3010
|
-
.member-check {
|
|
3011
|
-
color: #07c160;
|
|
3012
|
-
margin-top: 4px;
|
|
3013
|
-
}
|
|
3014
|
-
|
|
3015
|
-
.group-detail-content {
|
|
3016
|
-
display: flex;
|
|
3017
|
-
flex-direction: column;
|
|
3018
|
-
gap: 16px;
|
|
3019
|
-
}
|
|
3020
|
-
|
|
3021
|
-
.group-info-section {
|
|
3022
|
-
display: flex;
|
|
3023
|
-
flex-direction: column;
|
|
3024
|
-
gap: 12px;
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
.group-info-item {
|
|
3028
|
-
display: flex;
|
|
3029
|
-
justify-content: space-between;
|
|
3030
|
-
align-items: center;
|
|
3031
|
-
padding: 8px 0;
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
.info-label {
|
|
3035
|
-
font-size: 14px;
|
|
3036
|
-
color: #6b7280;
|
|
3037
|
-
}
|
|
3038
|
-
|
|
3039
|
-
.info-value {
|
|
3040
|
-
font-size: 14px;
|
|
3041
|
-
color: #1f2937;
|
|
3042
|
-
font-weight: 500;
|
|
3043
|
-
}
|
|
3044
|
-
|
|
3045
|
-
.group-members-section {
|
|
3046
|
-
display: flex;
|
|
3047
|
-
flex-direction: column;
|
|
3048
|
-
gap: 12px;
|
|
3049
|
-
}
|
|
3050
|
-
|
|
3051
|
-
.section-header {
|
|
3052
|
-
display: flex;
|
|
3053
|
-
justify-content: space-between;
|
|
3054
|
-
align-items: center;
|
|
3055
|
-
}
|
|
3056
|
-
|
|
3057
|
-
.section-title {
|
|
3058
|
-
font-size: 14px;
|
|
3059
|
-
font-weight: 500;
|
|
3060
|
-
color: #374151;
|
|
3061
|
-
}
|
|
3062
|
-
|
|
3063
|
-
.group-members-list {
|
|
3064
|
-
display: flex;
|
|
3065
|
-
flex-direction: column;
|
|
3066
|
-
gap: 8px;
|
|
3067
|
-
max-height: 300px;
|
|
3068
|
-
overflow-y: auto;
|
|
3069
|
-
}
|
|
3070
|
-
|
|
3071
|
-
.group-member-item {
|
|
3072
|
-
display: flex;
|
|
3073
|
-
align-items: center;
|
|
3074
|
-
gap: 12px;
|
|
3075
|
-
padding: 8px 12px;
|
|
3076
|
-
border-radius: 8px;
|
|
3077
|
-
background-color: white;
|
|
3078
|
-
transition: background-color 0.2s;
|
|
3079
|
-
}
|
|
3080
|
-
|
|
3081
|
-
.group-member-item:hover {
|
|
3082
|
-
background-color: #f9fafb;
|
|
3083
|
-
}
|
|
3084
|
-
|
|
3085
|
-
.group-member-avatar {
|
|
3086
|
-
width: 40px;
|
|
3087
|
-
height: 40px;
|
|
3088
|
-
border-radius: 50%;
|
|
3089
|
-
object-fit: cover;
|
|
3090
|
-
flex-shrink: 0;
|
|
3091
|
-
}
|
|
3092
|
-
|
|
3093
|
-
.group-member-name {
|
|
3094
|
-
font-size: 14px;
|
|
3095
|
-
color: #1f2937;
|
|
3096
|
-
flex: 1;
|
|
3097
|
-
overflow: hidden;
|
|
3098
|
-
text-overflow: ellipsis;
|
|
3099
|
-
white-space: nowrap;
|
|
3100
|
-
}
|
|
3101
|
-
|
|
3102
|
-
/* ========== 群聊侧边栏样式 ========== */
|
|
3103
|
-
.group-sidebar {
|
|
3104
|
-
width: 320px;
|
|
3105
|
-
background-color: #f5f5f5;
|
|
3106
|
-
border-left: 1px solid #e5e7eb;
|
|
3107
|
-
display: flex;
|
|
3108
|
-
flex-direction: column;
|
|
3109
|
-
height: 100%;
|
|
3110
|
-
overflow: hidden;
|
|
3111
|
-
}
|
|
3112
|
-
|
|
3113
|
-
.slide-enter-active,
|
|
3114
|
-
.slide-leave-active {
|
|
3115
|
-
transition: transform 0.3s ease;
|
|
3116
|
-
}
|
|
3117
|
-
|
|
3118
|
-
.slide-enter-from,
|
|
3119
|
-
.slide-leave-to {
|
|
3120
|
-
transform: translateX(100%);
|
|
3121
|
-
}
|
|
3122
|
-
|
|
3123
|
-
.group-sidebar-header {
|
|
3124
|
-
height: 56px;
|
|
3125
|
-
display: flex;
|
|
3126
|
-
justify-content: space-between;
|
|
3127
|
-
align-items: center;
|
|
3128
|
-
padding: 0 16px;
|
|
3129
|
-
border-bottom: 1px solid #e5e7eb;
|
|
3130
|
-
background-color: white;
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
|
-
.group-sidebar-title {
|
|
3134
|
-
font-size: 16px;
|
|
3135
|
-
font-weight: 500;
|
|
3136
|
-
color: #1f2937;
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
|
-
.group-sidebar-close {
|
|
3140
|
-
width: 32px;
|
|
3141
|
-
height: 32px;
|
|
3142
|
-
display: flex;
|
|
3143
|
-
align-items: center;
|
|
3144
|
-
justify-content: center;
|
|
3145
|
-
border-radius: 50%;
|
|
3146
|
-
cursor: pointer;
|
|
3147
|
-
transition: background-color 0.2s;
|
|
3148
|
-
color: #6b7280;
|
|
3149
|
-
}
|
|
3150
|
-
|
|
3151
|
-
.group-sidebar-close:hover {
|
|
3152
|
-
background-color: #f3f4f6;
|
|
3153
|
-
color: #374151;
|
|
3154
|
-
}
|
|
3155
|
-
|
|
3156
|
-
.group-sidebar-content {
|
|
3157
|
-
flex: 1;
|
|
3158
|
-
overflow-y: auto;
|
|
3159
|
-
padding: 16px;
|
|
3160
|
-
}
|
|
3161
|
-
|
|
3162
|
-
.group-members-avatar-section {
|
|
3163
|
-
margin-bottom: 16px;
|
|
3164
|
-
}
|
|
3165
|
-
|
|
3166
|
-
.group-members-grid {
|
|
3167
|
-
display: grid;
|
|
3168
|
-
grid-template-columns: repeat(4, 1fr);
|
|
3169
|
-
gap: 16px;
|
|
3170
|
-
}
|
|
3171
|
-
|
|
3172
|
-
.group-member-avatar-item {
|
|
3173
|
-
display: flex;
|
|
3174
|
-
flex-direction: column;
|
|
3175
|
-
align-items: center;
|
|
3176
|
-
cursor: pointer;
|
|
3177
|
-
padding: 4px;
|
|
3178
|
-
border-radius: 8px;
|
|
3179
|
-
transition: background-color 0.2s;
|
|
3180
|
-
}
|
|
3181
|
-
|
|
3182
|
-
.group-member-avatar-item:hover {
|
|
3183
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
3184
|
-
}
|
|
3185
|
-
|
|
3186
|
-
.group-member-avatar-small {
|
|
3187
|
-
width: 48px;
|
|
3188
|
-
height: 48px;
|
|
3189
|
-
border-radius: 50%;
|
|
3190
|
-
object-fit: cover;
|
|
3191
|
-
margin-bottom: 4px;
|
|
3192
|
-
}
|
|
3193
|
-
|
|
3194
|
-
.group-member-add-icon {
|
|
3195
|
-
width: 48px;
|
|
3196
|
-
height: 48px;
|
|
3197
|
-
border-radius: 50%;
|
|
3198
|
-
background-color: #f3f4f6;
|
|
3199
|
-
display: flex;
|
|
3200
|
-
align-items: center;
|
|
3201
|
-
justify-content: center;
|
|
3202
|
-
color: #6b7280;
|
|
3203
|
-
margin-bottom: 4px;
|
|
3204
|
-
}
|
|
3205
|
-
|
|
3206
|
-
.group-member-nickname {
|
|
3207
|
-
font-size: 12px;
|
|
3208
|
-
color: #6b7280;
|
|
3209
|
-
text-align: center;
|
|
3210
|
-
overflow: hidden;
|
|
3211
|
-
text-overflow: ellipsis;
|
|
3212
|
-
white-space: nowrap;
|
|
3213
|
-
max-width: 100%;
|
|
3214
|
-
}
|
|
3215
|
-
|
|
3216
|
-
.group-divider {
|
|
3217
|
-
height: 12px;
|
|
3218
|
-
background-color: transparent;
|
|
3219
|
-
border-top: 1px solid #e5e7eb;
|
|
3220
|
-
margin: 16px 0;
|
|
3221
|
-
}
|
|
3222
|
-
|
|
3223
|
-
.group-settings-section {
|
|
3224
|
-
display: flex;
|
|
3225
|
-
flex-direction: column;
|
|
3226
|
-
gap: 4px;
|
|
3227
|
-
}
|
|
3228
|
-
|
|
3229
|
-
.group-setting-item {
|
|
3230
|
-
display: flex;
|
|
3231
|
-
justify-content: space-between;
|
|
3232
|
-
align-items: center;
|
|
3233
|
-
padding: 14px 16px;
|
|
3234
|
-
background-color: white;
|
|
3235
|
-
cursor: pointer;
|
|
3236
|
-
transition: background-color 0.2s;
|
|
3237
|
-
border-radius: 8px;
|
|
3238
|
-
margin-bottom: 4px;
|
|
3239
|
-
}
|
|
3240
|
-
|
|
3241
|
-
.group-setting-item:hover {
|
|
3242
|
-
background-color: #f9fafb;
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3245
|
-
.group-setting-item.danger {
|
|
3246
|
-
color: #ef4444;
|
|
3247
|
-
margin-top: 8px;
|
|
3248
|
-
}
|
|
3249
|
-
|
|
3250
|
-
.group-setting-item.danger:hover {
|
|
3251
|
-
background-color: #fef2f2;
|
|
3252
|
-
}
|
|
3253
|
-
|
|
3254
|
-
.group-setting-label {
|
|
3255
|
-
font-size: 14px;
|
|
3256
|
-
color: #1f2937;
|
|
3257
|
-
}
|
|
3258
|
-
|
|
3259
|
-
.group-setting-item.danger .group-setting-label {
|
|
3260
|
-
color: #ef4444;
|
|
3261
|
-
}
|
|
3262
|
-
|
|
3263
|
-
.group-setting-value {
|
|
3264
|
-
display: flex;
|
|
3265
|
-
align-items: center;
|
|
3266
|
-
gap: 8px;
|
|
3267
|
-
color: #6b7280;
|
|
3268
|
-
font-size: 14px;
|
|
3269
|
-
}
|
|
3270
|
-
|
|
3271
|
-
.group-setting-value-text {
|
|
3272
|
-
max-width: 160px;
|
|
3273
|
-
overflow: hidden;
|
|
3274
|
-
text-overflow: ellipsis;
|
|
3275
|
-
white-space: nowrap;
|
|
3276
|
-
}
|
|
3277
|
-
|
|
3278
|
-
.group-setting-value-wrapper {
|
|
3279
|
-
display: flex;
|
|
3280
|
-
flex: 1;
|
|
3281
|
-
justify-content: flex-end;
|
|
3282
|
-
}
|
|
3283
|
-
|
|
3284
|
-
.group-edit-wrapper {
|
|
3285
|
-
width: 100%;
|
|
3286
|
-
display: flex;
|
|
3287
|
-
flex-direction: column;
|
|
3288
|
-
gap: 12px;
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
.group-edit-buttons {
|
|
3292
|
-
display: flex;
|
|
3293
|
-
justify-content: flex-end;
|
|
3294
|
-
gap: 8px;
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
|
-
.group-input-edit {
|
|
3298
|
-
flex: 1;
|
|
3299
|
-
}
|
|
3300
|
-
|
|
3301
|
-
.group-edit-actions {
|
|
3302
|
-
display: flex;
|
|
3303
|
-
gap: 8px;
|
|
3304
|
-
justify-content: flex-end;
|
|
3305
|
-
margin-top: 8px;
|
|
3306
|
-
}
|
|
3307
|
-
|
|
3308
|
-
/* ========== 消息已读成员弹窗样式 ========== */
|
|
3309
|
-
.msg-read-users-content {
|
|
3310
|
-
display: flex;
|
|
3311
|
-
flex-direction: column;
|
|
3312
|
-
gap: 20px;
|
|
3313
|
-
}
|
|
3314
|
-
|
|
3315
|
-
.read-users-section,
|
|
3316
|
-
.unread-users-section {
|
|
3317
|
-
display: flex;
|
|
3318
|
-
flex-direction: column;
|
|
3319
|
-
gap: 12px;
|
|
3320
|
-
}
|
|
3321
|
-
|
|
3322
|
-
.users-list {
|
|
3323
|
-
display: flex;
|
|
3324
|
-
flex-direction: column;
|
|
3325
|
-
gap: 8px;
|
|
3326
|
-
}
|
|
3327
|
-
|
|
3328
|
-
.users-tag-list {
|
|
3329
|
-
display: flex;
|
|
3330
|
-
flex-wrap: wrap;
|
|
3331
|
-
gap: 8px;
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
.user-tag {
|
|
3335
|
-
padding: 6px 12px;
|
|
3336
|
-
background-color: #f3f4f6;
|
|
3337
|
-
border-radius: 9999px;
|
|
3338
|
-
font-size: 13px;
|
|
3339
|
-
color: #374151;
|
|
3340
|
-
|
|
3341
|
-
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
3342
|
-
gap: 12px;
|
|
3343
|
-
}
|
|
3344
|
-
|
|
3345
|
-
.member-item {
|
|
3346
|
-
display: flex;
|
|
3347
|
-
align-items: center;
|
|
3348
|
-
gap: 8px;
|
|
3349
|
-
padding: 8px 12px;
|
|
3350
|
-
border-radius: 8px;
|
|
3351
|
-
cursor: pointer;
|
|
3352
|
-
transition: all 0.2s;
|
|
3353
|
-
border: 2px solid transparent;
|
|
3354
|
-
background-color: white;
|
|
3355
|
-
}
|
|
3356
|
-
|
|
3357
|
-
.member-item:hover {
|
|
3358
|
-
background-color: #f3f4f6;
|
|
3359
|
-
}
|
|
3360
|
-
|
|
3361
|
-
.member-selected {
|
|
3362
|
-
background-color: rgba(7, 193, 96, 0.1);
|
|
3363
|
-
border-color: #07c160;
|
|
3364
|
-
}
|
|
3365
|
-
|
|
3366
|
-
.member-avatar {
|
|
3367
|
-
width: 40px;
|
|
3368
|
-
height: 40px;
|
|
3369
|
-
border-radius: 50%;
|
|
3370
|
-
object-fit: cover;
|
|
3371
|
-
}
|
|
3372
|
-
|
|
3373
|
-
.member-name {
|
|
3374
|
-
flex: 1;
|
|
3375
|
-
font-size: 14px;
|
|
3376
|
-
color: #374151;
|
|
3377
|
-
overflow: hidden;
|
|
3378
|
-
text-overflow: ellipsis;
|
|
3379
|
-
white-space: nowrap;
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
|
-
.member-check {
|
|
3383
|
-
color: #07c160;
|
|
3384
|
-
font-size: 20px;
|
|
3385
|
-
}
|
|
3386
|
-
|
|
3387
|
-
.group-detail-content {
|
|
3388
|
-
display: flex;
|
|
3389
|
-
flex-direction: column;
|
|
3390
|
-
gap: 20px;
|
|
3391
|
-
}
|
|
3392
|
-
|
|
3393
|
-
.group-info-section {
|
|
3394
|
-
display: flex;
|
|
3395
|
-
flex-direction: column;
|
|
3396
|
-
gap: 12px;
|
|
3397
|
-
}
|
|
3398
|
-
|
|
3399
|
-
.group-info-item {
|
|
3400
|
-
display: flex;
|
|
3401
|
-
justify-content: space-between;
|
|
3402
|
-
align-items: center;
|
|
3403
|
-
padding: 12px;
|
|
3404
|
-
background-color: #f9fafb;
|
|
3405
|
-
border-radius: 8px;
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
.info-label {
|
|
3409
|
-
font-size: 14px;
|
|
3410
|
-
color: #6b7280;
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
.info-value {
|
|
3414
|
-
font-size: 14px;
|
|
3415
|
-
color: #374151;
|
|
3416
|
-
font-weight: 500;
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
.group-members-section {
|
|
3420
|
-
display: flex;
|
|
3421
|
-
flex-direction: column;
|
|
3422
|
-
gap: 12px;
|
|
3423
|
-
}
|
|
3424
|
-
|
|
3425
|
-
.section-header {
|
|
3426
|
-
display: flex;
|
|
3427
|
-
justify-content: space-between;
|
|
3428
|
-
align-items: center;
|
|
3429
|
-
}
|
|
3430
|
-
|
|
3431
|
-
.section-title {
|
|
3432
|
-
font-size: 14px;
|
|
3433
|
-
font-weight: 500;
|
|
3434
|
-
color: #374151;
|
|
3435
|
-
}
|
|
3436
|
-
|
|
3437
|
-
.group-members-list {
|
|
3438
|
-
display: grid;
|
|
3439
|
-
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
|
|
3440
|
-
gap: 12px;
|
|
3441
|
-
max-height: 300px;
|
|
3442
|
-
overflow-y: auto;
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
.group-member-item {
|
|
3446
|
-
display: flex;
|
|
3447
|
-
flex-direction: column;
|
|
3448
|
-
align-items: center;
|
|
3449
|
-
gap: 8px;
|
|
3450
|
-
padding: 12px;
|
|
3451
|
-
border-radius: 8px;
|
|
3452
|
-
background-color: #f9fafb;
|
|
3453
|
-
text-align: center;
|
|
3454
|
-
}
|
|
3455
|
-
|
|
3456
|
-
.group-member-avatar {
|
|
3457
|
-
width: 50px;
|
|
3458
|
-
height: 50px;
|
|
3459
|
-
border-radius: 50%;
|
|
3460
|
-
object-fit: cover;
|
|
3461
|
-
}
|
|
3462
|
-
|
|
3463
|
-
.group-member-name {
|
|
3464
|
-
font-size: 12px;
|
|
3465
|
-
color: #374151;
|
|
3466
|
-
overflow: hidden;
|
|
3467
|
-
text-overflow: ellipsis;
|
|
3468
|
-
white-space: nowrap;
|
|
3469
|
-
width: 100%;
|
|
3470
|
-
}
|
|
3471
|
-
|
|
3472
|
-
.invite-member-content {
|
|
3473
|
-
display: flex;
|
|
3474
|
-
flex-direction: column;
|
|
3475
|
-
gap: 16px;
|
|
3476
|
-
}
|
|
1291
|
+
<style scoped lang="scss">
|
|
1292
|
+
@use '../styles/components/chat-panel';
|
|
3477
1293
|
</style>
|