Commit a95f1746 authored by gxkai's avatar gxkai

chore: 下载文件夹

parent 7f3319bd
......@@ -235,7 +235,7 @@ const saveAs = (blob, name) => {
}
}, 0) // 40s
}
// todo 选中目标下载
// todo 选中文件下载
export const downloadFile = async (folder?: string ) => {
try {
tooltip('preparing files for download, please wait..')
......
......@@ -178,7 +178,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
const downloadFile = () => {
const parentFolder = getFocusedFolder()
props.dispatchDownloadFile(parentFolder)
props.dispatchDownloadFile(parentFolder !== name ? `${name}/${parentFolder}` : parentFolder)
}
const copyFile = (src: string, dest: string) => {
......
......@@ -36,13 +36,15 @@ export const contextMenuActions: MenuItems = [{
type: ['gist'],
multiselect: false,
label: ''
}, {
id: 'publishFolderToGist',
name: 'Publish folder to gist',
type: ['folder'],
multiselect: false,
label: ''
}, {
},
// {
// id: 'publishFolderToGist',
// name: 'Publish folder to gist',
// type: ['folder'],
// multiselect: false,
// label: ''
// },
{
id: 'publishFileToGist',
name: 'Publish file to gist',
type: ['file'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment