|
|
@ -344,8 +344,13 @@ export const emitContextMenuEvent = async (cmd: customAction) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const handleClickFile = async (path: string, type: 'file' | 'folder' | 'gist') => { |
|
|
|
export const handleClickFile = async (path: string, type: 'file' | 'folder' | 'gist') => { |
|
|
|
|
|
|
|
if (type === 'file' && path.endsWith('.md')) { |
|
|
|
|
|
|
|
// just opening the preview
|
|
|
|
|
|
|
|
await plugin.call('doc-viewer' as any, 'viewDocs', [path]) |
|
|
|
|
|
|
|
} else { |
|
|
|
await plugin.fileManager.open(path) |
|
|
|
await plugin.fileManager.open(path) |
|
|
|
dispatch(focusElement([{ key: path, type }])) |
|
|
|
dispatch(focusElement([{ key: path, type }])) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const handleExpandPath = (paths: string[]) => { |
|
|
|
export const handleExpandPath = (paths: string[]) => { |
|
|
|