Add delete button to project list on main page
All checks were successful
ci/woodpecker/push/build Pipeline was successful

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mikhail Kilin
2026-03-19 15:22:37 +03:00
parent 94bf067c41
commit 5cd6f5b96d
2 changed files with 26 additions and 0 deletions

View File

@@ -70,6 +70,22 @@ h2 {
font-size: 0.85rem;
}
.project-delete {
background: #c0392b;
color: white;
border: none;
border-radius: 4px;
padding: 0.2rem 0.5rem;
font-size: 0.8rem;
cursor: pointer;
margin-left: 0.5rem;
flex-shrink: 0;
}
.project-delete:hover {
background: #e74c3c;
}
.back-btn {
padding: 0.4rem 1rem;
font-size: 0.9rem;

View File

@@ -54,6 +54,16 @@ function ProjectList({
<span className="project-date">
{new Date(p.created_at).toLocaleString()}
</span>
<button
className="project-delete"
onClick={async (e) => {
e.stopPropagation();
await deleteProject(p.id);
await load();
}}
>
X
</button>
</div>
))}
</div>