feat: @提及功能优化 + 默认头像改用SVG图标
- 评论区有效@提及渲染为蓝色链接跳转/space/{uid},无效@保持纯文本
- 输入@触发悬浮窗,根据输入实时搜索用户(含头像+等级)
- 无匹配时显示未搜索到用户,选中后插入为@用户名 格式(尾部空格)
- 悬浮窗定位于输入光标上方,不遮挡输入内容
- 后端Comment新增Mentions字段,批量加载提及映射供前端判断
- SearchUsers/parseMentions 统一限制LV2+用户
- 所有默认头像由首字符文字改为统一SVG人形图标(nav/home/space/mention等7处)
This commit is contained in:
@ -230,11 +230,13 @@ header {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--color-accent);
|
||||
color: #fff;
|
||||
font-size: .85rem;
|
||||
font-weight: 600;
|
||||
color: rgba(255,255,255,.75);
|
||||
object-fit: unset;
|
||||
}
|
||||
.nav-avatar-default svg {
|
||||
width: 55%;
|
||||
height: 55%;
|
||||
}
|
||||
|
||||
.nav-avatar-wrapper:hover .nav-avatar {
|
||||
border-color: var(--color-accent);
|
||||
@ -279,9 +281,11 @@ header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
color: rgba(255,255,255,.75);
|
||||
}
|
||||
.nav-dropdown-avatar svg {
|
||||
width: 52%;
|
||||
height: 52%;
|
||||
}
|
||||
|
||||
.nav-dropdown-avatar img {
|
||||
|
||||
@ -239,14 +239,15 @@
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(135deg, var(--color-accent), #2980b9);
|
||||
color: #fff;
|
||||
color: rgba(255,255,255,.75);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto .75rem;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.user-avatar-fallback svg {
|
||||
width: 55%;
|
||||
height: 55%;
|
||||
}
|
||||
|
||||
.guest-avatar {
|
||||
|
||||
@ -1127,6 +1127,18 @@
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
/* 有效@提及链接 */
|
||||
.mention-link {
|
||||
color: #6366f1;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.mention-link:hover {
|
||||
text-decoration: underline;
|
||||
color: #4f46e5;
|
||||
}
|
||||
|
||||
.comment-actions {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
@ -1238,6 +1250,9 @@
|
||||
}
|
||||
|
||||
.mention-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 14px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
@ -1250,14 +1265,47 @@
|
||||
color: #6366f1;
|
||||
}
|
||||
|
||||
.mention-item .mention-username {
|
||||
font-weight: 500;
|
||||
.mention-item-avatar {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
flex-shrink: 0;
|
||||
background: #f3f4f6;
|
||||
}
|
||||
|
||||
.mention-item .mention-uid {
|
||||
.mention-item-avatar-placeholder {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 50%;
|
||||
background: #e5e7eb;
|
||||
flex-shrink: 0;
|
||||
color: #9ca3af;
|
||||
}
|
||||
.mention-item-avatar-placeholder svg {
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
}
|
||||
|
||||
.mention-item .mention-username {
|
||||
font-weight: 500;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.mention-item .mention-level {
|
||||
color: #9ca3af;
|
||||
font-size: 11px;
|
||||
margin-left: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.mention-no-result {
|
||||
padding: 12px 14px;
|
||||
font-size: 13px;
|
||||
color: #9ca3af;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ========== 右下角悬浮操作栏 ========== */
|
||||
|
||||
@ -75,14 +75,16 @@
|
||||
width: 56px; height: 56px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,.25);
|
||||
color: #fff;
|
||||
color: rgba(255,255,255,.75);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 700;
|
||||
border: 2px solid rgba(255,255,255,.4);
|
||||
}
|
||||
.space-avatar-placeholder svg {
|
||||
width: 55%;
|
||||
height: 55%;
|
||||
}
|
||||
|
||||
.space-header-info {
|
||||
color: #fff;
|
||||
@ -377,9 +379,12 @@
|
||||
}
|
||||
.space-user-avatar-placeholder {
|
||||
width: 48px; height: 48px; border-radius: 50%;
|
||||
background: var(--color-accent); color: #fff;
|
||||
background: var(--color-accent); color: rgba(255,255,255,.75);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 1.15rem; font-weight: 700;
|
||||
}
|
||||
.space-user-avatar-placeholder svg {
|
||||
width: 55%;
|
||||
height: 55%;
|
||||
}
|
||||
|
||||
.space-user-info { flex: 1; min-width: 0; }
|
||||
|
||||
Reference in New Issue
Block a user