|
|
@ -13,7 +13,7 @@ declare global { |
|
|
|
const _paq = window._paq = window._paq || [] //eslint-disable-line
|
|
|
|
const _paq = window._paq = window._paq || [] //eslint-disable-line
|
|
|
|
|
|
|
|
|
|
|
|
export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => { |
|
|
|
export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => { |
|
|
|
const { actions, createNewFile, createNewFolder, deletePath, renamePath, hideContextMenu, pushChangesToGist, publishFileToGist, publishFolderToGist, copy, copyFileName, copyPath, paste, runScript, emit, pageX, pageY, path, type, focus, ...otherProps } = props |
|
|
|
const { actions, createNewFile, createNewFolder, deletePath, renamePath, downloadPath, hideContextMenu, pushChangesToGist, publishFileToGist, publishFolderToGist, copy, copyFileName, copyPath, paste, runScript, emit, pageX, pageY, path, type, focus, ...otherProps } = props |
|
|
|
const contextMenuRef = useRef(null) |
|
|
|
const contextMenuRef = useRef(null) |
|
|
|
const intl = useIntl() |
|
|
|
const intl = useIntl() |
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
@ -88,6 +88,10 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => |
|
|
|
deletePath(getPath()) |
|
|
|
deletePath(getPath()) |
|
|
|
_paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'delete']) |
|
|
|
_paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'delete']) |
|
|
|
break |
|
|
|
break |
|
|
|
|
|
|
|
case 'Download': |
|
|
|
|
|
|
|
downloadPath(path) |
|
|
|
|
|
|
|
_paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'download']) |
|
|
|
|
|
|
|
break |
|
|
|
case 'Push changes to gist': |
|
|
|
case 'Push changes to gist': |
|
|
|
_paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'pushToChangesoGist']) |
|
|
|
_paq.push(['trackEvent', 'fileExplorer', 'contextMenu', 'pushToChangesoGist']) |
|
|
|
pushChangesToGist(path, type) |
|
|
|
pushChangesToGist(path, type) |
|
|
|