对齐 Zibll 消息中心主 tab 语义,补齐 messages/conversation 资源 enqueue,按 message_s/private_s 门控私信与总开关,并收束页面壳层与作者栏入口。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
620 lines
12 KiB
CSS
620 lines
12 KiB
CSS
/* ============================================================
|
|
* Messages Center — 独立消息中心页面
|
|
* ============================================================ */
|
|
|
|
.messages-center {
|
|
display: grid;
|
|
grid-template-columns: 220px 1fr;
|
|
gap: 24px;
|
|
min-height: 60vh;
|
|
padding-top: 24px;
|
|
padding-bottom: 48px;
|
|
}
|
|
|
|
/* ---- 左侧导航 ---- */
|
|
.messages-center__nav {
|
|
position: sticky;
|
|
top: calc(var(--nav-height, 60px) + 24px);
|
|
align-self: start;
|
|
background: var(--surface-card, #fff);
|
|
border-radius: 12px;
|
|
padding: 16px 12px;
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.messages-nav__list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.messages-nav__item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
color: var(--color-ink);
|
|
text-decoration: none;
|
|
font-size: 14px;
|
|
transition: background 0.15s, color 0.15s;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.messages-nav__item:hover {
|
|
background: var(--surface-hover, rgba(0, 0, 0, 0.04));
|
|
}
|
|
|
|
.messages-nav__item.is-active {
|
|
background: var(--color-primary-light, rgba(59, 130, 246, 0.08));
|
|
color: var(--color-primary, #3b82f6);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.messages-nav__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 20px;
|
|
height: 20px;
|
|
padding: 0 6px;
|
|
border-radius: 10px;
|
|
background: var(--color-primary, #3b82f6);
|
|
color: #fff;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
line-height: 1;
|
|
}
|
|
|
|
.messages-nav__badge:empty,
|
|
.messages-nav__badge[data-count="0"] {
|
|
display: none;
|
|
}
|
|
|
|
.messages-nav__actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
margin-top: 16px;
|
|
padding-top: 12px;
|
|
border-top: 1px solid var(--color-line);
|
|
}
|
|
|
|
.messages-nav__action-btn {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
background: var(--surface-hover, rgba(0, 0, 0, 0.04));
|
|
color: var(--color-ink-3, #666);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.messages-nav__action-btn:hover {
|
|
background: var(--surface-active, rgba(0, 0, 0, 0.08));
|
|
}
|
|
|
|
/* ---- 右侧内容 ---- */
|
|
.messages-center__content {
|
|
min-width: 0;
|
|
}
|
|
|
|
.messages-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1px;
|
|
background: var(--surface-card, #fff);
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.message-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
padding: 16px 20px;
|
|
background: var(--surface-card, #fff);
|
|
border-bottom: 1px solid var(--color-border-light, #f3f4f6);
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.message-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.message-item:hover {
|
|
background: var(--surface-hover, rgba(0, 0, 0, 0.02));
|
|
}
|
|
|
|
.message-item.is-unread {
|
|
border-left: 3px solid var(--color-primary, #3b82f6);
|
|
}
|
|
|
|
.message-item.is-unread .message-item__title {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.message-item__icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
min-width: 36px;
|
|
border-radius: 50%;
|
|
background: var(--color-primary-light, rgba(59, 130, 246, 0.1));
|
|
color: var(--color-primary, #3b82f6);
|
|
font-size: 14px;
|
|
}
|
|
|
|
.message-item__body {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.message-item__title {
|
|
font-size: 14px;
|
|
color: var(--color-ink);
|
|
margin-bottom: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.message-item__new-badge {
|
|
display: inline-block;
|
|
padding: 1px 6px;
|
|
border-radius: 3px;
|
|
background: var(--color-danger, #ef4444);
|
|
color: #fff;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.message-item__desc {
|
|
font-size: 13px;
|
|
color: var(--color-ink-3, #666);
|
|
margin-bottom: 4px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.message-item__time {
|
|
font-size: 12px;
|
|
color: var(--color-ink-4, #999);
|
|
}
|
|
|
|
.message-item__actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.message-item__action-btn {
|
|
padding: 4px 10px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
background: transparent;
|
|
color: var(--color-ink-3, #666);
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
transition: background 0.15s, color 0.15s;
|
|
}
|
|
|
|
.message-item__action-btn:hover {
|
|
background: var(--surface-hover, rgba(0, 0, 0, 0.06));
|
|
color: var(--color-primary, #3b82f6);
|
|
}
|
|
|
|
.message-item__action-btn--danger:hover {
|
|
color: var(--color-danger, #ef4444);
|
|
}
|
|
|
|
/* ---- 空状态 ---- */
|
|
.messages-empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 64px 24px;
|
|
background: var(--surface-card, #fff);
|
|
border-radius: 12px;
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.messages-empty__icon {
|
|
font-size: 48px;
|
|
color: var(--color-ink-4, #ccc);
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.messages-empty__text {
|
|
font-size: 14px;
|
|
color: var(--color-ink-3, #666);
|
|
}
|
|
|
|
.messages-empty__hint {
|
|
margin-top: 4px;
|
|
font-size: 12px;
|
|
color: var(--color-ink-4, #999);
|
|
}
|
|
|
|
/* ---- 分页 ---- */
|
|
.messages-pagination {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
margin-top: 24px;
|
|
}
|
|
|
|
/* ---- 响应式 ---- */
|
|
@media (max-width: 767px) {
|
|
.messages-center {
|
|
grid-template-columns: 1fr;
|
|
gap: 16px;
|
|
padding-top: 16px;
|
|
}
|
|
|
|
.messages-center__nav {
|
|
position: static;
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.messages-nav__list {
|
|
display: flex;
|
|
overflow-x: auto;
|
|
gap: 4px;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.messages-nav__list::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.messages-nav__item {
|
|
white-space: nowrap;
|
|
padding: 8px 12px;
|
|
font-size: 13px;
|
|
border-radius: 20px;
|
|
}
|
|
|
|
.messages-nav__actions {
|
|
flex-direction: row;
|
|
margin-top: 12px;
|
|
padding-top: 10px;
|
|
}
|
|
|
|
.message-item {
|
|
padding: 12px 14px;
|
|
}
|
|
|
|
.message-item__actions {
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
}
|
|
|
|
/* ---- 暗色模式 ---- */
|
|
html.dark .messages-center__nav,
|
|
html.dark .messages-center__nav {
|
|
background: var(--surface-1);
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
html.dark .messages-nav__item:hover,
|
|
html.dark .messages-nav__item:hover {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
html.dark .messages-nav__item.is-active,
|
|
html.dark .messages-nav__item.is-active {
|
|
background: var(--color-primary-soft, rgba(240, 68, 148, 0.16));
|
|
}
|
|
|
|
html.dark .messages-nav__action-btn,
|
|
html.dark .messages-nav__action-btn {
|
|
background: var(--surface-2);
|
|
color: var(--color-ink-3);
|
|
}
|
|
|
|
html.dark .messages-nav__action-btn:hover,
|
|
html.dark .messages-nav__action-btn:hover {
|
|
background: var(--surface-3);
|
|
}
|
|
|
|
html.dark .messages-list,
|
|
html.dark .messages-list {
|
|
background: var(--surface-1);
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
html.dark .message-item,
|
|
html.dark .message-item {
|
|
background: var(--surface-1);
|
|
border-bottom-color: var(--color-line);
|
|
}
|
|
|
|
html.dark .message-item:hover,
|
|
html.dark .message-item:hover {
|
|
background: var(--surface-2);
|
|
}
|
|
|
|
html.dark .message-item__icon,
|
|
html.dark .message-item__icon {
|
|
background: var(--color-primary-soft, rgba(240, 68, 148, 0.16));
|
|
}
|
|
|
|
html.dark .message-item__action-btn:hover,
|
|
html.dark .message-item__action-btn:hover {
|
|
background: var(--surface-3);
|
|
}
|
|
|
|
html.dark .messages-empty,
|
|
html.dark .messages-empty {
|
|
background: var(--surface-1);
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
html.dark .messages-nav__actions,
|
|
html.dark .messages-nav__actions {
|
|
border-top-color: var(--color-line);
|
|
}
|
|
|
|
/* ============================================================
|
|
* Private Messages / Conversations
|
|
* ============================================================ */
|
|
|
|
.aksrt-pm__list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.aksrt-pm__item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 14px 16px;
|
|
cursor: pointer;
|
|
border-bottom: 1px solid var(--color-line, #f0f0f0);
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.aksrt-pm__item:hover {
|
|
background: var(--surface-1, #f8f9fa);
|
|
}
|
|
|
|
.aksrt-pm__item.is-unread {
|
|
background: var(--surface-2, #f0f5ff);
|
|
}
|
|
|
|
.aksrt-pm__avatar {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.aksrt-pm__info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.aksrt-pm__name {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: var(--color-ink);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.aksrt-pm__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
border-radius: 9px;
|
|
background: var(--color-primary);
|
|
color: #fff;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
padding: 0 5px;
|
|
}
|
|
|
|
.aksrt-pm__preview {
|
|
font-size: 12px;
|
|
color: var(--text-secondary, #8a909c);
|
|
margin-top: 3px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.aksrt-pm__time {
|
|
font-size: 11px;
|
|
color: var(--text-tertiary, #c0c4cc);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Thread view */
|
|
.aksrt-pm__thread {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
min-height: 400px;
|
|
}
|
|
|
|
.aksrt-pm__thread-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--color-line, #f0f0f0);
|
|
}
|
|
|
|
.aksrt-pm__back-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--color-primary);
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.aksrt-pm__back-btn:hover {
|
|
background: var(--surface-1, #f0f5ff);
|
|
}
|
|
|
|
.aksrt-pm__thread-name {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--color-ink);
|
|
}
|
|
|
|
.aksrt-pm__messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.aksrt-pm__msg {
|
|
display: flex;
|
|
max-width: 75%;
|
|
}
|
|
|
|
.aksrt-pm__msg--mine {
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.aksrt-pm__msg--mine .aksrt-pm__msg-bubble {
|
|
background: var(--color-primary);
|
|
color: #fff;
|
|
border-radius: 12px 12px 4px 12px;
|
|
}
|
|
|
|
.aksrt-pm__msg:not(.aksrt-pm__msg--mine) .aksrt-pm__msg-bubble {
|
|
background: var(--surface-2, #f0f0f0);
|
|
color: var(--color-ink);
|
|
border-radius: 12px 12px 12px 4px;
|
|
}
|
|
|
|
.aksrt-pm__msg-bubble {
|
|
padding: 10px 14px;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.aksrt-pm__msg-time {
|
|
font-size: 11px;
|
|
margin-top: 4px;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.aksrt-pm__compose {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--color-line, #f0f0f0);
|
|
}
|
|
|
|
.aksrt-pm__compose textarea {
|
|
flex: 1;
|
|
border: 1px solid var(--color-line, #d9d9d9);
|
|
border-radius: 8px;
|
|
padding: 8px 12px;
|
|
font-size: 14px;
|
|
resize: none;
|
|
outline: none;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.aksrt-pm__compose textarea:focus {
|
|
border-color: var(--color-primary);
|
|
}
|
|
|
|
.aksrt-pm__send-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
border: none;
|
|
background: var(--color-primary);
|
|
color: #fff;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.aksrt-pm__send-btn:hover {
|
|
opacity: 0.85;
|
|
}
|
|
|
|
/* Dark mode */
|
|
html.dark .aksrt-pm__item:hover,
|
|
html.dark .aksrt-pm__item:hover {
|
|
background: var(--surface-2);
|
|
}
|
|
|
|
html.dark .aksrt-pm__item.is-unread,
|
|
html.dark .aksrt-pm__item.is-unread {
|
|
background: rgba(240, 68, 148, 0.08);
|
|
}
|
|
|
|
|
|
/* Page header */
|
|
.messages-center__header {
|
|
margin: 8px 0 16px;
|
|
}
|
|
.messages-center__title {
|
|
margin: 0 0 6px;
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
color: var(--color-ink, #1f2937);
|
|
}
|
|
.messages-center__subtitle {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
color: var(--color-ink-3, #6b7280);
|
|
}
|
|
|
|
.messages-center--disabled {
|
|
display: block;
|
|
min-height: 40vh;
|
|
}
|
|
|
|
/* PM thread uses hidden attribute instead of inline style */
|
|
.aksrt-pm__thread[hidden] {
|
|
display: none !important;
|
|
}
|
|
|
|
.message-item__new-badge {
|
|
display: inline-block;
|
|
margin-left: 6px;
|
|
padding: 1px 6px;
|
|
border-radius: 999px;
|
|
background: var(--color-primary, #3b82f6);
|
|
color: #fff;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
vertical-align: middle;
|
|
}
|