mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-02 14:04:50 +00:00
feat(webui): add manage versions option to file card context menu (#364)
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
Plus,
|
||||
ArrowRight,
|
||||
Copy,
|
||||
Layers,
|
||||
} from 'lucide-react'
|
||||
|
||||
interface FileBrowserContextMenuProps {
|
||||
@@ -36,6 +37,7 @@ interface FileBrowserContextMenuProps {
|
||||
onUploadFile: () => void
|
||||
onUploadFolder: () => void
|
||||
onNewVersion: (item: AssetInfo) => void
|
||||
onManageVersions?: (item: AssetInfo) => void
|
||||
onMoveTo: (items: AssetInfo[]) => void
|
||||
onCopyTo: (items: AssetInfo[]) => void
|
||||
folders: AssetInfo[]
|
||||
@@ -63,6 +65,7 @@ export function FileBrowserContextMenu({
|
||||
onUploadFile,
|
||||
onUploadFolder,
|
||||
onNewVersion,
|
||||
onManageVersions,
|
||||
onMoveTo,
|
||||
onCopyTo,
|
||||
folders,
|
||||
@@ -296,6 +299,13 @@ export function FileBrowserContextMenu({
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
|
||||
{canEdit && item.type === 'version_stack' && (
|
||||
<ContextMenuItem onSelect={() => onManageVersions?.(item)}>
|
||||
<Layers className="mr-2 h-4 w-4" />
|
||||
<span>{m.manage_versions()}</span>
|
||||
</ContextMenuItem>
|
||||
)}
|
||||
|
||||
{item.type === 'folder' && onOpenAgentsMd && (
|
||||
<ContextMenuItem onSelect={() => onOpenAgentsMd(item)}>
|
||||
<FileText className="mr-2 h-4 w-4" />
|
||||
|
||||
Reference in New Issue
Block a user