Files
JoyD/Claw/client/wechat_app/pages/chat/chat.wxss

427 lines
6.5 KiB
Plaintext
Raw Normal View History

2026-04-21 13:46:20 +08:00
/* 聊天页面样式 - 深色主题 */
@import '../../utils/constant.wxss';
2026-03-16 15:47:55 +08:00
.chat-container {
display: flex;
flex-direction: column;
height: 100vh;
2026-04-21 13:46:20 +08:00
background-color: #0d0d0d;
2026-03-16 15:47:55 +08:00
}
.message-list {
flex: 1;
padding: 20rpx;
overflow-y: auto;
padding-bottom: 140rpx; /* 为输入区域预留空间 */
}
.empty-message {
display: flex;
justify-content: center;
align-items: center;
height: 400rpx;
2026-04-21 13:46:20 +08:00
color: #555555;
}
.empty-text {
font-size: 28rpx;
2026-04-21 13:46:20 +08:00
color: #555555;
}
.history-tip {
display: flex;
justify-content: center;
padding: 10rpx;
margin: 10rpx 0;
}
.history-tip text {
font-size: 24rpx;
2026-04-21 13:46:20 +08:00
color: #666666;
background-color: #1a1a1a;
padding: 5rpx 20rpx;
border-radius: 20rpx;
2026-03-16 15:47:55 +08:00
}
.message-item {
display: flex;
margin: 20rpx 0;
align-items: flex-start;
padding: 0 10rpx;
2026-03-16 15:47:55 +08:00
}
.message-left {
flex-direction: row;
}
.message-right {
flex-direction: row-reverse;
}
.message-avatar {
width: 72rpx;
height: 72rpx;
margin: 0 16rpx;
2026-03-16 15:47:55 +08:00
flex-shrink: 0;
border-radius: 12rpx;
overflow: hidden;
2026-03-16 15:47:55 +08:00
}
.message-avatar image {
width: 100%;
height: 100%;
border-radius: 12rpx;
2026-03-16 15:47:55 +08:00
}
.message-content {
max-width: 75%;
2026-03-16 15:47:55 +08:00
display: flex;
flex-direction: column;
}
.message-header {
margin-bottom: 8rpx;
2026-03-16 15:47:55 +08:00
}
.message-nickname {
font-size: 24rpx;
2026-04-21 13:46:20 +08:00
color: #666666;
font-weight: 500;
}
.message-body {
padding: 20rpx 24rpx;
word-wrap: break-word;
position: relative;
}
.message-left .message-body {
2026-04-21 13:46:20 +08:00
background-color: #1e1e1e;
border-radius: 16rpx 16rpx 16rpx 4rpx;
2026-04-21 13:46:20 +08:00
border: 2rpx solid rgba(255,255,255,0.06);
}
.message-right .message-body {
background-color: #1677FF;
border-radius: 16rpx 16rpx 4rpx 16rpx;
2026-04-21 13:46:20 +08:00
box-shadow: 0 4rpx 16rpx rgba(22,119,255,0.25);
}
.message-text-container {
line-height: 1.5;
}
.message-text {
font-size: 28rpx;
line-height: 1.5;
}
.message-left .message-text {
2026-04-21 13:46:20 +08:00
color: #e8e8e8;
}
.message-right .message-text {
color: white;
}
.message-footer {
margin-top: 8rpx;
display: flex;
justify-content: flex-end;
2026-03-16 15:47:55 +08:00
}
.message-time {
font-size: 20rpx;
2026-04-21 13:46:20 +08:00
color: #444444;
margin-right: 16rpx;
2026-03-16 15:47:55 +08:00
}
.message-image {
max-width: 400rpx;
max-height: 400rpx;
border-radius: 12rpx;
margin: 4rpx 0;
2026-03-16 15:47:55 +08:00
}
2026-04-21 13:46:20 +08:00
/* 代码块样式 - 深色 */
.message-code {
2026-04-21 13:46:20 +08:00
background-color: #141414;
border-radius: 12rpx;
overflow: hidden;
margin: 8rpx 0;
2026-04-21 13:46:20 +08:00
border: 2rpx solid #252525;
}
.code-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12rpx 16rpx;
2026-04-21 13:46:20 +08:00
background-color: #1a1a1a;
border-bottom: 2rpx solid #252525;
}
.code-language {
font-size: 24rpx;
color: #666;
font-family: monospace;
}
.copy-btn {
background: none;
border: none;
display: flex;
align-items: center;
font-size: 22rpx;
color: #1677FF;
padding: 0;
}
.copy-icon {
margin-right: 4rpx;
}
.copy-text {
font-size: 22rpx;
}
.code-body {
padding: 16rpx;
max-height: 400rpx;
overflow-y: auto;
2026-04-21 13:46:20 +08:00
background-color: #0d0d0d;
}
.code-text {
font-size: 24rpx;
line-height: 1.4;
2026-04-21 13:46:20 +08:00
color: #a8dadc;
font-family: 'Courier New', Courier, monospace;
white-space: pre-wrap;
}
2026-04-21 13:46:20 +08:00
/* 按钮卡片样式 - 深色 */
.message-button-card {
2026-04-21 13:46:20 +08:00
background-color: #1e1e1e;
border-radius: 12rpx;
padding: 20rpx;
margin: 8rpx 0;
2026-04-21 13:46:20 +08:00
border: 2rpx solid rgba(255,255,255,0.06);
}
.card-title {
font-size: 26rpx;
font-weight: 500;
2026-04-21 13:46:20 +08:00
color: #ffffff;
margin-bottom: 16rpx;
}
.card-buttons {
display: flex;
flex-direction: column;
gap: 12rpx;
}
.card-button {
2026-04-21 13:46:20 +08:00
background-color: #141414;
border: 2rpx solid #252525;
border-radius: 8rpx;
padding: 16rpx;
font-size: 26rpx;
color: #1677FF;
text-align: left;
transition: all 0.2s ease;
}
.card-button:active {
background-color: #f0f0f0;
}
/* 加载动画 */
.typing-container {
margin: 20rpx 0;
}
.typing-indicator {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 8rpx;
}
.typing-dot {
width: 12rpx;
height: 12rpx;
background-color: #1677FF;
border-radius: 50%;
animation: typing-bounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) {
animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
animation-delay: -0.16s;
}
.typing-text {
font-size: 24rpx;
2026-04-21 13:46:20 +08:00
color: #666666;
}
@keyframes typing-bounce {
0%, 80%, 100% {
transform: scale(0);
}
40% {
transform: scale(1);
}
}
2026-04-21 13:46:20 +08:00
/* 输入区域 - 深色 */
2026-03-16 15:47:55 +08:00
.input-container {
position: fixed;
bottom: 0;
left: 0;
right: 0;
2026-04-21 13:46:20 +08:00
background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
border-top: 2rpx solid rgba(255,255,255,0.06);
2026-03-16 15:47:55 +08:00
padding: 20rpx;
z-index: 1000;
}
.input-wrapper {
display: flex;
align-items: flex-end;
gap: 16rpx;
2026-03-16 15:47:55 +08:00
}
.message-input {
flex: 1;
2026-04-21 13:46:20 +08:00
border: 2rpx solid #252525;
border-radius: 28rpx;
padding: 20rpx 28rpx;
2026-03-16 15:47:55 +08:00
font-size: 28rpx;
2026-04-21 13:46:20 +08:00
background-color: #0d0d0d;
color: #ffffff;
min-height: 80rpx;
max-height: 200rpx;
overflow-y: auto;
line-height: 1.4;
2026-03-16 15:47:55 +08:00
}
.message-input:focus {
border-color: #1677FF;
2026-03-16 15:47:55 +08:00
background-color: white;
box-shadow: 0 0 0 2rpx rgba(22, 119, 255, 0.1);
2026-03-16 15:47:55 +08:00
}
.send-btn {
background-color: #1677FF;
2026-03-16 15:47:55 +08:00
color: white;
border: none;
border-radius: 50%;
width: 80rpx;
height: 80rpx;
font-size: 26rpx;
2026-03-16 15:47:55 +08:00
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
2026-03-16 15:47:55 +08:00
transition: all 0.3s ease;
flex-shrink: 0;
2026-03-16 15:47:55 +08:00
}
.send-btn:active {
transform: scale(0.95);
background-color: #0e66e0;
2026-03-16 15:47:55 +08:00
}
.send-btn:disabled {
background: #ccc;
color: #999;
transform: none;
}
2026-04-21 13:46:20 +08:00
/* 富文本样式 - 深色主题 */
rich-text {
line-height: 1.5;
2026-03-16 15:47:55 +08:00
}
rich-text :deep(p) {
margin: 12rpx 0;
2026-03-16 15:47:55 +08:00
}
rich-text :deep(h1),
rich-text :deep(h2),
rich-text :deep(h3) {
font-weight: 600;
margin: 16rpx 0 12rpx 0;
2026-03-16 15:47:55 +08:00
}
rich-text :deep(h1) {
font-size: 32rpx;
2026-04-21 13:46:20 +08:00
color: #ffffff;
}
rich-text :deep(h2) {
font-size: 28rpx;
2026-04-21 13:46:20 +08:00
color: #e5e5e5;
}
rich-text :deep(h3) {
font-size: 26rpx;
2026-04-21 13:46:20 +08:00
color: #cccccc;
}
rich-text :deep(ul),
rich-text :deep(ol) {
margin: 12rpx 0;
padding-left: 40rpx;
}
rich-text :deep(li) {
margin: 8rpx 0;
line-height: 1.5;
2026-04-21 13:46:20 +08:00
color: #d0d0d0;
}
rich-text :deep(strong) {
font-weight: 600;
}
/* 响应式设计 */
@media (max-width: 375px) {
.message-content {
max-width: 70%;
}
.message-avatar {
width: 64rpx;
height: 64rpx;
margin: 0 12rpx;
}
.message-body {
padding: 16rpx 20rpx;
}
.message-text {
font-size: 26rpx;
}
}
@media (min-width: 768px) {
.message-content {
max-width: 60%;
}
.message-body {
padding: 24rpx 28rpx;
}
.message-text {
font-size: 30rpx;
}
2026-03-16 15:47:55 +08:00
}