mirror of
https://github.com/velocitatem/cvfs.git
synced 2026-05-31 16:53:38 +00:00
rename to cvfs, remove dashboard heading, add branch delete buttons
Agent-Logs-Url: https://github.com/velocitatem/cvfs/sessions/2bd56e04-d1e0-4e38-93b6-a99afc1d2b3c Co-authored-by: velocitatem <60182044+velocitatem@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7543402c83
commit
77d454cf09
@@ -3,12 +3,5 @@ export default function DashboardLayout({
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<div>
|
||||
<nav>
|
||||
<h1>Dashboard</h1>
|
||||
</nav>
|
||||
<main>{children}</main>
|
||||
</div>
|
||||
)
|
||||
return <>{children}</>;
|
||||
}
|
||||
@@ -567,7 +567,12 @@ export default function Dashboard() {
|
||||
};
|
||||
|
||||
const handleDeleteVersion = async (versionId: string) => {
|
||||
if (!confirm('Delete this branch? This cannot be undone.')) return;
|
||||
const version = selectedDoc?.versions.find(v => v.id === versionId);
|
||||
const hasChildren = selectedDoc?.versions.some(v => v.parent_version_id === versionId);
|
||||
const msg = hasChildren
|
||||
? 'Delete this branch and all its sub-branches? This cannot be undone.'
|
||||
: 'Delete this branch? This cannot be undone.';
|
||||
if (!confirm(msg)) return;
|
||||
try {
|
||||
await deleteVersion(versionId);
|
||||
const fresh = await refreshDocs();
|
||||
@@ -610,7 +615,7 @@ export default function Dashboard() {
|
||||
☰
|
||||
</button>
|
||||
<Link href="/" style={{ fontSize: 13, fontWeight: 600, color: 'var(--text)', textDecoration: 'none' }}>
|
||||
Resume Branches
|
||||
cvfs
|
||||
</Link>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
|
||||
|
||||
Reference in New Issue
Block a user