418 lines
25 KiB
HTML
418 lines
25 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>SVN管理器 - 多项目管理界面</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<style>
|
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
* {
|
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
}
|
|
|
|
.project-card {
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.project-card:hover {
|
|
transform: translateX(4px);
|
|
}
|
|
|
|
.project-card.active {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
}
|
|
|
|
.project-card.active .project-icon {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.action-btn {
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.action-btn:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.status-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
|
|
.file-item {
|
|
transition: background-color 0.15s ease;
|
|
}
|
|
|
|
.file-item:hover {
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
.sidebar {
|
|
border-right: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.main-content {
|
|
background: #f8fafc;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="bg-gray-50">
|
|
<div class="flex h-screen overflow-hidden">
|
|
<!-- 左侧边栏 - 项目列表 -->
|
|
<div class="sidebar w-80 bg-white flex flex-col">
|
|
<!-- 头部 -->
|
|
<div class="p-6 border-b border-gray-200">
|
|
<div class="flex items-center gap-3 mb-4">
|
|
<div class="w-10 h-10 bg-gradient-to-br from-indigo-500 to-purple-600 rounded-lg flex items-center justify-center">
|
|
<svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
|
|
</svg>
|
|
</div>
|
|
<div>
|
|
<h1 class="text-xl font-bold text-gray-900">SVN管理器</h1>
|
|
<p class="text-sm text-gray-500">多项目管理</p>
|
|
</div>
|
|
</div>
|
|
<button class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2.5 px-4 rounded-lg transition-colors duration-200 flex items-center justify-center gap-2">
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
|
|
</svg>
|
|
添加新项目
|
|
</button>
|
|
</div>
|
|
|
|
<!-- 项目列表 -->
|
|
<div class="flex-1 overflow-y-auto p-4 space-y-2">
|
|
<!-- 项目A -->
|
|
<div class="project-card active p-4 rounded-xl cursor-pointer" onclick="selectProject('project-a')">
|
|
<div class="flex items-start gap-3">
|
|
<div class="project-icon w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center flex-shrink-0">
|
|
<svg class="w-6 h-6 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="flex-1 min-w-0">
|
|
<h3 class="font-semibold text-sm mb-1 truncate">项目A - 前端开发</h3>
|
|
<p class="text-xs opacity-80 mb-2 truncate">/Users/workspace/project-a</p>
|
|
<div class="flex items-center gap-2">
|
|
<span class="status-badge text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700">
|
|
<span class="status-dot bg-green-500"></span>
|
|
已同步
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 项目B -->
|
|
<div class="project-card p-4 rounded-xl cursor-pointer bg-gray-50 hover:bg-gray-100" onclick="selectProject('project-b')">
|
|
<div class="flex items-start gap-3">
|
|
<div class="project-icon w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center flex-shrink-0">
|
|
<svg class="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="flex-1 min-w-0">
|
|
<h3 class="font-semibold text-sm mb-1 truncate text-gray-900">项目B - 后端服务</h3>
|
|
<p class="text-xs text-gray-500 mb-2 truncate">/Users/workspace/project-b</p>
|
|
<div class="flex items-center gap-2">
|
|
<span class="status-badge text-xs px-2 py-0.5 rounded-full bg-yellow-100 text-yellow-700">
|
|
<span class="status-dot bg-yellow-500"></span>
|
|
有更新
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 项目C -->
|
|
<div class="project-card p-4 rounded-xl cursor-pointer bg-gray-50 hover:bg-gray-100" onclick="selectProject('project-c')">
|
|
<div class="flex items-start gap-3">
|
|
<div class="project-icon w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center flex-shrink-0">
|
|
<svg class="w-6 h-6 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="flex-1 min-w-0">
|
|
<h3 class="font-semibold text-sm mb-1 truncate text-gray-900">项目C - 移动端</h3>
|
|
<p class="text-xs text-gray-500 mb-2 truncate">/Users/workspace/project-c</p>
|
|
<div class="flex items-center gap-2">
|
|
<span class="status-badge text-xs px-2 py-0.5 rounded-full bg-gray-100 text-gray-700">
|
|
<span class="status-dot bg-gray-400"></span>
|
|
未连接
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 底部信息 -->
|
|
<div class="p-4 border-t border-gray-200">
|
|
<div class="text-xs text-gray-500 text-center">
|
|
共 3 个项目
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 右侧主内容区 -->
|
|
<div class="main-content flex-1 flex flex-col overflow-hidden">
|
|
<!-- 顶部工具栏 -->
|
|
<div class="bg-white border-b border-gray-200 px-6 py-4">
|
|
<div class="flex items-center justify-between">
|
|
<div>
|
|
<h2 class="text-2xl font-bold text-gray-900" id="project-title">项目A - 前端开发</h2>
|
|
<p class="text-sm text-gray-500 mt-1" id="project-path">/Users/workspace/project-a</p>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<button class="action-btn px-4 py-2 bg-gray-100 hover:bg-gray-200 text-gray-700 font-medium rounded-lg text-sm">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
|
|
</svg>
|
|
刷新状态
|
|
</button>
|
|
<button class="action-btn px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white font-medium rounded-lg text-sm">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path>
|
|
</svg>
|
|
执行操作
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 操作按钮组 -->
|
|
<div class="bg-white px-6 py-4 border-b border-gray-200">
|
|
<div class="flex items-center gap-3 flex-wrap">
|
|
<button class="action-btn px-4 py-2 bg-blue-50 hover:bg-blue-100 text-blue-700 font-medium rounded-lg text-sm border border-blue-200">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"></path>
|
|
</svg>
|
|
Checkout
|
|
</button>
|
|
<button class="action-btn px-4 py-2 bg-green-50 hover:bg-green-100 text-green-700 font-medium rounded-lg text-sm border border-green-200">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path>
|
|
</svg>
|
|
Update
|
|
</button>
|
|
<button class="action-btn px-4 py-2 bg-purple-50 hover:bg-purple-100 text-purple-700 font-medium rounded-lg text-sm border border-purple-200">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"></path>
|
|
</svg>
|
|
Commit
|
|
</button>
|
|
<button class="action-btn px-4 py-2 bg-yellow-50 hover:bg-yellow-100 text-yellow-700 font-medium rounded-lg text-sm border border-yellow-200">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
|
</svg>
|
|
Status
|
|
</button>
|
|
<button class="action-btn px-4 py-2 bg-indigo-50 hover:bg-indigo-100 text-indigo-700 font-medium rounded-lg text-sm border border-indigo-200">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
</svg>
|
|
Log
|
|
</button>
|
|
<button class="action-btn px-4 py-2 bg-gray-50 hover:bg-gray-100 text-gray-700 font-medium rounded-lg text-sm border border-gray-200">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
|
|
</svg>
|
|
Diff
|
|
</button>
|
|
<button class="action-btn px-4 py-2 bg-gray-50 hover:bg-gray-100 text-gray-700 font-medium rounded-lg text-sm border border-gray-200">
|
|
<svg class="w-4 h-4 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
</svg>
|
|
Info
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 内容区域 -->
|
|
<div class="flex-1 overflow-y-auto p-6">
|
|
<!-- 项目信息卡片 -->
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
|
<div class="bg-white rounded-xl p-5 border border-gray-200 shadow-sm">
|
|
<div class="flex items-center justify-between mb-3">
|
|
<span class="text-sm text-gray-500">当前版本</span>
|
|
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="text-2xl font-bold text-gray-900">r1234</div>
|
|
<div class="text-xs text-gray-500 mt-1">最新版本</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl p-5 border border-gray-200 shadow-sm">
|
|
<div class="flex items-center justify-between mb-3">
|
|
<span class="text-sm text-gray-500">工作副本</span>
|
|
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="text-2xl font-bold text-gray-900">r1230</div>
|
|
<div class="text-xs text-gray-500 mt-1">需要更新</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-xl p-5 border border-gray-200 shadow-sm">
|
|
<div class="flex items-center justify-between mb-3">
|
|
<span class="text-sm text-gray-500">修改文件</span>
|
|
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="text-2xl font-bold text-gray-900">5</div>
|
|
<div class="text-xs text-gray-500 mt-1">待提交</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 文件状态列表 -->
|
|
<div class="bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden">
|
|
<div class="px-6 py-4 border-b border-gray-200 bg-gray-50">
|
|
<h3 class="font-semibold text-gray-900">文件状态</h3>
|
|
</div>
|
|
<div class="divide-y divide-gray-100">
|
|
<div class="file-item px-6 py-4 flex items-center justify-between hover:bg-gray-50">
|
|
<div class="flex items-center gap-3 flex-1">
|
|
<div class="w-2 h-2 rounded-full bg-green-500"></div>
|
|
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
|
</svg>
|
|
<div class="flex-1 min-w-0">
|
|
<div class="text-sm font-medium text-gray-900">src/components/Header.vue</div>
|
|
<div class="text-xs text-gray-500">已修改</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<span class="text-xs px-2 py-1 bg-green-100 text-green-700 rounded">M</span>
|
|
<button class="text-gray-400 hover:text-gray-600">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="file-item px-6 py-4 flex items-center justify-between hover:bg-gray-50">
|
|
<div class="flex items-center gap-3 flex-1">
|
|
<div class="w-2 h-2 rounded-full bg-yellow-500"></div>
|
|
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
|
</svg>
|
|
<div class="flex-1 min-w-0">
|
|
<div class="text-sm font-medium text-gray-900">src/utils/api.js</div>
|
|
<div class="text-xs text-gray-500">冲突</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<span class="text-xs px-2 py-1 bg-yellow-100 text-yellow-700 rounded">C</span>
|
|
<button class="text-gray-400 hover:text-gray-600">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="file-item px-6 py-4 flex items-center justify-between hover:bg-gray-50">
|
|
<div class="flex items-center gap-3 flex-1">
|
|
<div class="w-2 h-2 rounded-full bg-blue-500"></div>
|
|
<svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
|
</svg>
|
|
<div class="flex-1 min-w-0">
|
|
<div class="text-sm font-medium text-gray-900">src/styles/main.css</div>
|
|
<div class="text-xs text-gray-500">已添加</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<span class="text-xs px-2 py-1 bg-blue-100 text-blue-700 rounded">A</span>
|
|
<button class="text-gray-400 hover:text-gray-600">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// 项目数据
|
|
const projects = {
|
|
'project-a': {
|
|
title: '项目A - 前端开发',
|
|
path: '/Users/workspace/project-a',
|
|
version: 'r1234',
|
|
workingCopy: 'r1230',
|
|
modifiedFiles: 5
|
|
},
|
|
'project-b': {
|
|
title: '项目B - 后端服务',
|
|
path: '/Users/workspace/project-b',
|
|
version: 'r2456',
|
|
workingCopy: 'r2456',
|
|
modifiedFiles: 2
|
|
},
|
|
'project-c': {
|
|
title: '项目C - 移动端',
|
|
path: '/Users/workspace/project-c',
|
|
version: 'r1890',
|
|
workingCopy: 'r1885',
|
|
modifiedFiles: 0
|
|
}
|
|
};
|
|
|
|
function selectProject(projectId) {
|
|
// 更新项目卡片状态
|
|
document.querySelectorAll('.project-card').forEach(card => {
|
|
card.classList.remove('active');
|
|
card.classList.add('bg-gray-50', 'hover:bg-gray-100');
|
|
});
|
|
|
|
const clickedCard = event.currentTarget;
|
|
clickedCard.classList.add('active');
|
|
clickedCard.classList.remove('bg-gray-50', 'hover:bg-gray-100');
|
|
|
|
// 更新主内容区
|
|
const project = projects[projectId];
|
|
if (project) {
|
|
document.getElementById('project-title').textContent = project.title;
|
|
document.getElementById('project-path').textContent = project.path;
|
|
|
|
// 更新统计信息
|
|
const stats = document.querySelectorAll('.bg-white.rounded-xl.p-5');
|
|
if (stats.length >= 3) {
|
|
stats[0].querySelector('.text-2xl').textContent = project.version;
|
|
stats[1].querySelector('.text-2xl').textContent = project.workingCopy;
|
|
stats[2].querySelector('.text-2xl').textContent = project.modifiedFiles;
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |