feat(explore): allow deleting source categories

This commit is contained in:
2026-07-24 10:37:46 +08:00
parent fd8a2110a1
commit 7c9d5e4560
5 changed files with 7 additions and 15 deletions

View File

@@ -710,6 +710,7 @@
.explore-source-row {
min-width: 0;
row-gap: 12px;
}
.explore-source-card.arco-card {
@@ -1078,10 +1079,6 @@
max-width: 100%;
}
.explore-source-row {
row-gap: 10px;
}
.explore-reader-layout {
grid-template-columns: minmax(0, 1fr);
}

View File

@@ -372,9 +372,7 @@ export function WorkspaceExplorePage({
{source.id !== 'all' ? (
<span className="explore-source-actions" onClick={(event) => event.stopPropagation()}>
<Button aria-label={`编辑${source.name}`} type="text" size="mini" icon={<IconEdit />} onClick={() => openEditSource(source)} />
{!source.builtIn ? (
<Button aria-label={`删除${source.name}`} type="text" size="mini" status="danger" icon={<IconDelete />} onClick={() => deleteSource(source)} />
) : null}
<Button aria-label={`删除${source.name}`} type="text" size="mini" status="danger" icon={<IconDelete />} onClick={() => deleteSource(source)} />
</span>
) : null}
</Card>