|
|
|
@ -344,8 +344,13 @@ export const emitContextMenuEvent = async (cmd: customAction) => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export const handleClickFile = async (path: string, type: 'file' | 'folder' | 'gist') => { |
|
|
|
|
await plugin.fileManager.open(path) |
|
|
|
|
dispatch(focusElement([{ key: path, type }])) |
|
|
|
|
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) |
|
|
|
|
dispatch(focusElement([{ key: path, type }])) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export const handleExpandPath = (paths: string[]) => { |
|
|
|
|