feat(file-browser): rename menu item to Copy name and download link

This commit is contained in:
yiling
2026-07-27 22:17:07 +08:00
parent 216538fcfa
commit b876af464e
14 changed files with 107 additions and 107 deletions
@@ -228,7 +228,7 @@ export function useFileActions({
}
}
const handleCopyNameAndPath = async (items: AssetInfo[]) => {
const handleCopyNameAndDownloadLink = async (items: AssetInfo[]) => {
if (items.length === 0) return
try {
const res = await getDownloadLinks({
@@ -246,10 +246,10 @@ export function useFileActions({
const ok = await copyToClipboard(text)
if (ok) {
toast.success(m.copied_name_and_path_to_clipboard())
toast.success(m.copied_name_and_download_link_to_clipboard())
}
} catch (error) {
toast.error('Failed to copy name and path')
toast.error('Failed to copy name and download link')
console.error(error)
}
}
@@ -350,7 +350,7 @@ export function useFileActions({
}
const handleAction = (
action: 'rename' | 'delete' | 'download' | 'restore' | 'copy-name-and-path',
action: 'rename' | 'delete' | 'download' | 'restore' | 'copy-name-and-download-link',
item: AssetInfo,
) => {
const isSelected = selectedIds.has(item.id!)
@@ -371,8 +371,8 @@ export function useFileActions({
case 'restore':
handleRestore(targetItems)
break
case 'copy-name-and-path':
handleCopyNameAndPath(targetItems)
case 'copy-name-and-download-link':
handleCopyNameAndDownloadLink(targetItems)
break
}
}
@@ -384,7 +384,7 @@ export function useFileActions({
handleDelete,
handleRestore,
handleDownload,
handleCopyNameAndPath,
handleCopyNameAndDownloadLink,
handleNewFolder,
handleAction,
onRenameSubmit,