fix(ui): address PR feedback on share link validation and version stack context menu

This commit is contained in:
yiling
2026-05-24 19:36:42 +08:00
parent 3c0d058cdc
commit 851a6d552a
2 changed files with 3 additions and 2 deletions
@@ -212,7 +212,7 @@ export function FileBrowserContextMenu({
<span>Download</span>
</ContextMenuItem>
{item.type === 'file' && (
{(item.type === 'file' || item.type === 'version_stack') && (
<ContextMenuItem onSelect={() => onNewVersion(item)}>
<UploadCloud className="mr-2 h-4 w-4" />
<span>Create new version</span>
@@ -145,10 +145,11 @@ export function FileBrowser({
const share = await res.json()
// Add assets to the new share link
await client.api.teams[':teamId'].shares[':shareId'].assets.$post({
const assetsRes = await client.api.teams[':teamId'].shares[':shareId'].assets.$post({
param: { teamId, shareId: share.id },
json: { assetIds: items.map((i) => i.id!) },
})
if (!assetsRes.ok) throw new Error('Failed to add assets to share link')
return share
},