Commit a95f1746 authored by gxkai's avatar gxkai

chore: 下载文件夹

parent 7f3319bd
...@@ -235,7 +235,7 @@ const saveAs = (blob, name) => { ...@@ -235,7 +235,7 @@ const saveAs = (blob, name) => {
} }
}, 0) // 40s }, 0) // 40s
} }
// todo 选中目标下载 // todo 选中文件下载
export const downloadFile = async (folder?: string ) => { export const downloadFile = async (folder?: string ) => {
try { try {
tooltip('preparing files for download, please wait..') tooltip('preparing files for download, please wait..')
......
...@@ -178,7 +178,7 @@ export const FileExplorer = (props: FileExplorerProps) => { ...@@ -178,7 +178,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
const downloadFile = () => { const downloadFile = () => {
const parentFolder = getFocusedFolder() const parentFolder = getFocusedFolder()
props.dispatchDownloadFile(parentFolder) props.dispatchDownloadFile(parentFolder !== name ? `${name}/${parentFolder}` : parentFolder)
} }
const copyFile = (src: string, dest: string) => { const copyFile = (src: string, dest: string) => {
......
...@@ -36,13 +36,15 @@ export const contextMenuActions: MenuItems = [{ ...@@ -36,13 +36,15 @@ export const contextMenuActions: MenuItems = [{
type: ['gist'], type: ['gist'],
multiselect: false, multiselect: false,
label: '' label: ''
}, { },
id: 'publishFolderToGist', // {
name: 'Publish folder to gist', // id: 'publishFolderToGist',
type: ['folder'], // name: 'Publish folder to gist',
multiselect: false, // type: ['folder'],
label: '' // multiselect: false,
}, { // label: ''
// },
{
id: 'publishFileToGist', id: 'publishFileToGist',
name: 'Publish file to gist', name: 'Publish file to gist',
type: ['file'], 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