mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 06:19:26 +00:00
fix(ui): address PR feedback on share link validation and version stack context menu
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user