feat: add GitHub import flow, project delete fix, and analyze API
- Mirror GitHub repos to Gitea as-is on import (skip scaffold) - Auto-trigger ImportAnalyzer agent after successful mirror - Add POST/GET /api/projects/[projectId]/analyze route - Fix project delete button visibility (was permanently opacity:0) - Store isImport, importAnalysisStatus, importAnalysisJobId on projects Made-with: Cursor
This commit is contained in:
@@ -76,6 +76,7 @@ export default function ProjectsPage() {
|
||||
const [showNew, setShowNew] = useState(false);
|
||||
const [projectToDelete, setProjectToDelete] = useState<ProjectWithStats | null>(null);
|
||||
const [isDeleting, setIsDeleting] = useState(false);
|
||||
const [hoveredId, setHoveredId] = useState<string | null>(null);
|
||||
|
||||
const fetchProjects = async () => {
|
||||
try {
|
||||
@@ -193,10 +194,12 @@ export default function ProjectsPage() {
|
||||
transition: "all 0.15s",
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
setHoveredId(p.id);
|
||||
e.currentTarget.style.borderColor = "#d0ccc4";
|
||||
e.currentTarget.style.boxShadow = "0 2px 8px #1a1a1a0a";
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
setHoveredId(null);
|
||||
e.currentTarget.style.borderColor = "#e8e4dc";
|
||||
e.currentTarget.style.boxShadow = "0 1px 2px #1a1a1a05";
|
||||
}}
|
||||
@@ -247,19 +250,19 @@ export default function ProjectsPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Delete (hover) */}
|
||||
{/* Delete (visible on row hover) */}
|
||||
<button
|
||||
onClick={(e) => { e.preventDefault(); setProjectToDelete(p); }}
|
||||
onClick={(e) => { e.preventDefault(); e.stopPropagation(); setProjectToDelete(p); }}
|
||||
style={{
|
||||
marginLeft: 16, padding: "5px 8px", borderRadius: 6,
|
||||
marginLeft: 16, padding: "6px 8px", borderRadius: 6,
|
||||
border: "none", background: "transparent",
|
||||
color: "#b5b0a6", cursor: "pointer",
|
||||
opacity: 0, transition: "opacity 0.15s",
|
||||
fontFamily: "Outfit, sans-serif",
|
||||
color: "#c0bab2", cursor: "pointer",
|
||||
opacity: hoveredId === p.id ? 1 : 0,
|
||||
transition: "opacity 0.15s, color 0.15s",
|
||||
fontFamily: "Outfit, sans-serif", flexShrink: 0,
|
||||
}}
|
||||
className="delete-btn"
|
||||
onMouseEnter={(e) => e.currentTarget.style.color = "#d32f2f"}
|
||||
onMouseLeave={(e) => e.currentTarget.style.color = "#b5b0a6"}
|
||||
onMouseEnter={(e) => { e.currentTarget.style.color = "#d32f2f"; }}
|
||||
onMouseLeave={(e) => { e.currentTarget.style.color = "#c0bab2"; }}
|
||||
title="Delete project"
|
||||
>
|
||||
<Trash2 style={{ width: 14, height: 14 }} />
|
||||
|
||||
Reference in New Issue
Block a user