最新代码

This commit is contained in:
2026-03-20 18:13:52 +08:00
parent 73cdf5ac23
commit 6c74bef8da
18 changed files with 944 additions and 939 deletions

View File

@@ -59,7 +59,22 @@
color: #fff;
}
/* ==================== 弹出面板样式 ==================== */
/* ==================== 弹出面板通用样式 ==================== */
.close-panel-button {
background: none;
border: none;
font-size: 20px;
cursor: pointer;
color: #666;
padding: 5px 10px;
margin-left: auto;
transition: color 0.2s;
}
.close-panel-button:hover {
color: #333;
}
.panel-overlay {
position: fixed;
@@ -124,411 +139,12 @@
color: #333;
}
.current-info {
display: flex;
gap: 20px;
font-size: 13px;
color: #666;
}
.panel-body {
padding: 20px;
overflow-y: auto;
flex: 1;
}
/* ==================== 角色面板样式 ==================== */
.role-panel {
max-width: 1200px;
}
.panel-controls {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.search-box {
flex: 1;
margin-right: 16px;
}
.search-box input {
width: 100%;
padding: 10px 16px;
border: 1px solid #e0e0e0;
border-radius: 6px;
font-size: 14px;
transition: border-color 0.2s ease;
}
.search-box input:focus {
outline: none;
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
.add-button {
display: flex;
align-items: center;
gap: 6px;
padding: 10px 20px;
background-color: #1890ff;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: all 0.2s ease;
}
.add-button:hover {
background-color: #40a9ff;
transform: translateY(-1px);
box-shadow: 0 2px 6px rgba(24, 144, 255, 0.2);
}
.add-button .icon {
font-size: 16px;
font-weight: bold;
}
.panel-list-container {
display: flex;
flex-direction: column;
height: calc(100% - 80px);
}
.loading-container {
display: flex;
align-items: center;
justify-content: center;
padding: 40px;
gap: 12px;
color: #666;
}
.loading-spinner {
display: inline-block;
width: 20px;
height: 20px;
border: 2px solid rgba(24, 144, 255, 0.2);
border-radius: 50%;
border-top-color: #1890ff;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.empty-state {
display: flex;
align-items: center;
justify-content: center;
padding: 40px;
color: #999;
}
/* ==================== 角色卡片网格布局 ==================== */
.role-cards-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
/* ==================== 角色卡片样式 ==================== */
.role-card {
border-radius: 8px;
cursor: pointer;
position: relative;
transition: all 0.2s ease;
background-color: #fff;
border: 1px solid #e0e0e0;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.role-card:hover {
background-color: #f5f5f5;
border-color: #1890ff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
.role-card.selected {
background-color: #e6f7ff;
border-color: #1890ff;
box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}
.role-card-header {
padding: 16px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f0f0f0;
}
.role-name {
font-size: 15px;
color: #333;
font-weight: 500;
}
.role-card.selected .role-name {
color: #1890ff;
}
.role-chat-count {
font-size: 12px;
color: #999;
background-color: #f0f0f0;
padding: 4px 10px;
border-radius: 12px;
}
.role-card-actions {
display: flex;
justify-content: flex-end;
padding: 8px 12px;
opacity: 0;
transition: opacity 0.2s ease;
}
.role-card:hover .role-card-actions,
.role-card.clicked .role-card-actions {
opacity: 1;
}
.action-button {
width: 28px;
height: 28px;
border-radius: 4px;
border: none;
background-color: #f5f5f5;
color: #666;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
transition: all 0.2s ease;
}
.action-button:hover {
background-color: #e6f7ff;
color: #1890ff;
}
.edit-button:hover {
background-color: #e6f7ff;
color: #1890ff;
}
.delete-button:hover {
background-color: #fff1f0;
color: #ff4d4f;
}
.role-card-header input {
padding: 6px 10px;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 14px;
width: 150px;
}
.role-card-header input:focus {
outline: none;
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
/* ==================== 聊天列表样式 ==================== */
.chat-list {
margin-top: 0;
border-top: 1px solid #e0e0e0;
padding: 12px;
background-color: #fafafa;
animation: slideDown 0.2s ease;
max-height: 300px;
overflow-y: auto;
}
.chat-list-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 8px;
}
.chat-list-header span {
font-size: 13px;
font-weight: 500;
color: #333;
}
.add-chat-button {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
background-color: #1890ff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
transition: all 0.2s ease;
}
.add-chat-button:hover {
background-color: #40a9ff;
}
.add-chat-button .icon {
font-size: 14px;
font-weight: bold;
}
.chat-item {
padding: 10px 12px;
cursor: pointer;
transition: background-color 0.2s ease;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 4px;
margin-bottom: 4px;
}
.chat-item:hover {
background-color: #f0f0f0;
}
.chat-item.selected {
background-color: #e6f7ff;
color: #1890ff;
}
.chat-name {
font-size: 13px;
color: #333;
}
.chat-item.selected .chat-name {
color: #1890ff;
font-weight: 500;
}
.chat-actions {
display: flex;
gap: 6px;
opacity: 0;
transition: opacity 0.2s ease;
}
.chat-item:hover .chat-actions {
opacity: 1;
}
.chat-content input {
padding: 6px 10px;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 13px;
width: 180px;
}
.chat-content input:focus {
outline: none;
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
/* ==================== 模态框样式 ==================== */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
animation: fadeIn 0.2s ease;
}
.modal-content {
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
width: 90%;
max-width: 400px;
padding: 24px;
animation: slideDown 0.3s ease;
}
.modal-content h3 {
margin: 0 0 16px 0;
font-size: 16px;
font-weight: 500;
color: #333;
}
.modal-content p {
margin: 0 0 24px 0;
font-size: 14px;
color: #666;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 12px;
}
.modal-button {
padding: 8px 16px;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
border: none;
}
.cancel-button {
background-color: #f5f5f5;
color: #666;
}
.cancel-button:hover {
background-color: #e6e6e6;
color: #333;
}
.confirm-button {
background-color: #ff4d4f;
color: white;
}
.confirm-button:hover {
background-color: #ff7875;
}
/* 主内容区域 */
.main-container {
margin-top: 50px;