nex_docus/frontend/src/pages/ProjectList/ProjectList.css

487 lines
11 KiB
CSS

.project-list-card .ant-card-body {
display: flex;
flex-direction: column;
gap: 16px;
}
.project-results-section {
display: flex;
flex-direction: column;
gap: 12px;
}
.project-results-summary {
color: var(--text-color-secondary);
font-size: 14px;
}
.project-search-file-meta {
font-size: 12px;
color: var(--text-color-secondary);
}
/* ========== 项目卡片(统一骨架 + 固定高度) ========== */
.project-card {
height: 236px;
display: flex;
flex-direction: column;
cursor: pointer;
transition: all 0.3s;
position: relative;
overflow: hidden;
background: var(--card-bg);
border-color: var(--border-color);
}
.project-card:hover {
transform: translateY(-4px);
box-shadow: var(--panel-shadow);
}
.project-card .ant-card-body {
flex: 1;
display: flex;
flex-direction: column;
padding: 16px 18px 14px;
min-height: 0;
}
.project-card .ant-card-actions {
flex: none;
}
.project-card .ant-card-actions > li:not(:last-child) {
border-inline-end-color: rgba(15, 23, 42, 0.18) !important;
}
body.dark .project-card .ant-card-actions > li:not(:last-child) {
border-inline-end-color: rgba(255, 255, 255, 0.2) !important;
}
.project-card-public-badge {
position: absolute;
top: 8px;
right: -28px;
background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
color: white;
padding: 2px 32px;
font-size: 11px;
font-weight: 500;
transform: rotate(45deg);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
z-index: 1;
}
/* 参与项目右上角:未读更新通知数角标 */
.project-card-update-badge {
position: absolute;
top: 12px;
right: 12px;
z-index: 2;
min-width: 20px;
height: 20px;
padding: 0 6px;
border-radius: 999px;
background: linear-gradient(135deg, #ff4d4f 0%, #f5222d 100%);
color: #fff;
font-size: 11px;
font-weight: 600;
line-height: 20px;
text-align: center;
box-shadow: 0 2px 6px rgba(245, 34, 45, 0.45);
animation: project-badge-pop 0.25s ease-out;
}
@keyframes project-badge-pop {
from {
transform: scale(0.6);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}
/* 卡片主体:标题在上、描述占中间弹性空间、元信息贴底 */
.project-card-body {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
.project-card-title-row {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
margin-bottom: 8px;
}
.project-card-title-icon {
flex: none;
width: 32px;
height: 32px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
font-size: 17px;
color: #fff;
}
.project-card-title-icon.is-owner {
background: linear-gradient(135deg, #1677ff 0%, #69b1ff 100%);
box-shadow: 0 3px 8px rgba(22, 119, 255, 0.25);
}
body.dark .project-card-title-icon.is-owner {
background: linear-gradient(135deg, #1668dc 0%, #3c89e8 100%);
}
.project-card-title-icon.is-shared {
background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
box-shadow: 0 3px 8px rgba(82, 196, 26, 0.25);
}
/* 卡片操作栏 Git 仓库图标:未配置 = 灰色分支图标;已配置 = 实心 GitHub 图标(品牌色区分) */
.project-card-git-action-icon {
color: var(--text-color-secondary);
font-size: 16px;
transition: color 0.2s;
}
.project-card-git-action-icon.configured {
color: #24292e;
font-size: 17px;
}
body.dark .project-card-git-action-icon.configured {
color: #e6edf3;
}
.project-card h3 {
flex: 1;
min-width: 0;
font-size: 15px;
font-weight: 600;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--text-color);
}
/* 描述为卡片主要信息,占据剩余空间保证高度一致 */
.project-description {
flex: 1;
font-size: 13px;
line-height: 1.6;
color: var(--text-color-secondary);
margin: 0 0 10px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
/* 底部元信息区:三项信息三等分网格(三分格,无分隔线) */
.project-card-meta {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
align-items: center;
column-gap: 6px;
padding-top: 10px;
border-top: 1px dashed var(--border-color);
color: var(--text-color-secondary);
font-size: 12px;
}
/* 每格内容水平垂直居中,超长省略 */
.project-card-meta > * {
display: flex;
align-items: center;
justify-content: center;
min-width: 0;
overflow: hidden;
}
.project-stat-item {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
white-space: nowrap;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.project-card-owner {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
min-width: 0;
max-width: 100%;
}
.project-card-owner-avatar {
flex: none;
width: 22px;
height: 22px;
border-radius: 50%;
background: linear-gradient(135deg, #1677ff 0%, #69b1ff 100%);
color: #fff;
font-size: 11px;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
}
.project-card-share .project-card-owner-avatar {
background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
}
.project-card-owner-name {
font-size: 12px;
font-weight: 500;
color: var(--text-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}
/* 项目角色徽章(重新设计:药丸式彩色徽章 + 角色图标) */
.project-card-role-badge {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
padding: 2px 9px;
border-radius: 999px;
font-size: 11px;
line-height: 16px;
font-weight: 500;
white-space: nowrap;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
/* 所有者 / 管理者:金色徽章 */
.project-card-role-badge.role-owner,
.project-card-role-badge.role-admin {
background: rgba(250, 173, 20, 0.16);
color: #d48806;
}
body.dark .project-card-role-badge.role-owner,
body.dark .project-card-role-badge.role-admin {
background: rgba(250, 173, 20, 0.22);
color: #ffc53d;
}
/* 编辑者:蓝色徽章 */
.project-card-role-badge.role-editor {
background: rgba(22, 119, 255, 0.12);
color: var(--link-color);
}
body.dark .project-card-role-badge.role-editor {
background: rgba(23, 125, 220, 0.25);
color: #4c9be8;
}
/* 查看者:灰色徽章 */
.project-card-role-badge.role-viewer {
background: var(--item-hover-bg);
color: var(--text-color-secondary);
}
/* ========== 我的项目卡片:蓝色管理风(无顶边) ========== */
.project-card-my {
text-align: left;
}
.project-card-my .ant-card-actions {
background: var(--bg-color-secondary);
}
/* ========== 参与的项目卡片:绿色协作风(无顶边) ========== */
.project-card-share {
text-align: left;
}
.project-card-share .ant-card-actions {
background: var(--bg-color-secondary);
}
/* 参与项目底部功能项:与我的项目操作项风格保持一致(普通操作项,无药丸背景) */
.project-card-view-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
padding: 0 4px;
min-width: 32px;
font-size: 14px;
line-height: 22px;
cursor: pointer;
transition: color 0.2s ease;
}
.project-card-view-action:hover {
color: var(--link-color);
}
.project-card-member-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
cursor: pointer;
transition: color 0.2s ease;
}
.project-card-member-action:hover {
color: var(--link-color);
}
/* ========== 搜索结果卡片(保持旧版居中风格) ========== */
.project-card-icon {
margin-bottom: 16px;
text-align: center;
}
/* 知识库向量化弹窗:未配置向量模型时的提示条 */
.kb-warning-banner {
margin-bottom: 16px;
padding: 10px 14px;
border-radius: 8px;
background: #fff7e6;
border: 1px solid #ffe7ba;
color: #d46b08;
}
body.dark .kb-warning-banner {
background: rgba(250, 173, 20, 0.12);
border-color: rgba(250, 173, 20, 0.4);
color: #ffc53d;
}
.project-empty-state {
padding: 12px 0;
}
.project-list-pagination {
display: flex;
justify-content: center;
margin-top: 8px;
}
/* ========== 圆点分页指示器(对称布局) ========== */
.dot-pagination.ant-pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 2px;
flex-wrap: nowrap;
}
.dot-pagination .ant-pagination-item,
.dot-pagination .ant-pagination-prev,
.dot-pagination .ant-pagination-next {
border: none !important;
background: transparent !important;
margin: 0 !important;
min-width: 24px !important;
height: 24px !important;
line-height: 24px !important;
display: inline-flex !important;
align-items: center;
justify-content: center;
vertical-align: middle;
}
.dot-pagination .ant-pagination-item a {
display: none !important;
}
.dot-pagination .pagination-dot {
display: block;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: var(--text-color-secondary);
opacity: 0.3;
transition: all 0.3s;
}
.dot-pagination .ant-pagination-item-active .pagination-dot {
background-color: var(--link-color);
opacity: 1;
transform: scale(1.25);
}
.dot-pagination .ant-pagination-jump-prev,
.dot-pagination .ant-pagination-jump-next {
border: none !important;
background: transparent !important;
margin: 0 !important;
min-width: 24px !important;
height: 24px !important;
line-height: 24px !important;
display: inline-flex !important;
align-items: center;
justify-content: center;
color: var(--text-color-secondary);
font-size: 12px;
}
.dot-pagination .ant-pagination-jump-prev .ant-pagination-item-container,
.dot-pagination .ant-pagination-jump-next .ant-pagination-item-container {
display: inline-flex;
align-items: center;
justify-content: center;
}
.dot-pagination .ant-pagination-prev .ant-pagination-item-link,
.dot-pagination .ant-pagination-next .ant-pagination-item-link {
border: none !important;
background: transparent !important;
color: var(--text-color-secondary);
font-size: 12px;
line-height: 1;
height: 100%;
width: 100%;
display: inline-flex !important;
align-items: center;
justify-content: center;
border-radius: 6px;
padding: 0;
transition: all 0.2s;
}
.dot-pagination .ant-pagination-prev:hover .ant-pagination-item-link,
.dot-pagination .ant-pagination-next:hover .ant-pagination-item-link {
color: var(--link-color);
background: var(--item-hover-bg) !important;
}
.dot-pagination .ant-pagination-prev:active .ant-pagination-item-link,
.dot-pagination .ant-pagination-next:active .ant-pagination-item-link {
background: var(--item-hover-bg) !important;
}
.dot-pagination .ant-pagination-disabled .ant-pagination-item-link {
color: var(--text-color-secondary) !important;
opacity: 0.35;
cursor: not-allowed;
}