diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-10-07 01:42:14 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-10-07 01:42:14 +0200 |
commit | fd4edbd6a854275c10c5b21173f0875921d547d1 (patch) | |
tree | ae25a9a95609636be0fadf79f70f4ef8eb01b4b5 /components/contextmenu.tsx | |
parent | 33839479e269bed905f9eefc374060b9d3ee7e19 (diff) |
feat(preview): hover links + ui upgrade
Diffstat (limited to 'components/contextmenu.tsx')
-rw-r--r-- | components/contextmenu.tsx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/components/contextmenu.tsx b/components/contextmenu.tsx index 09d9cff..73758a5 100644 --- a/components/contextmenu.tsx +++ b/components/contextmenu.tsx @@ -44,6 +44,7 @@ import { import { OrgRoamGraphReponse, OrgRoamLink, OrgRoamNode } from '../api' import { deleteNodeInEmacs, openNodeInEmacs, createNodeInEmacs } from '../util/webSocketFunctions' +import { BiNetworkChart } from 'react-icons/bi' export default interface ContextMenuProps { background: Boolean @@ -116,7 +117,7 @@ export const ContextMenu = (props: ContextMenuProps) => { <MenuItem icon={<ExternalLinkIcon />}>Open in Zotero</MenuItem> )} {scope.nodeIds.length === 0 && ( - <MenuItem icon={<ViewIcon />} onClick={() => handleLocal(node!, 'replace')}> + <MenuItem icon={<BiNetworkChart />} onClick={() => handleLocal(node!, 'replace')}> Open local graph </MenuItem> )} @@ -149,6 +150,15 @@ export const ContextMenu = (props: ContextMenuProps) => { </Popover> </Box> </MenuItem> */} + + <MenuItem + icon={<ViewIcon />} + onClick={() => { + setPreviewNode(node) + }} + > + Preview + </MenuItem> {node?.level === 0 && ( <MenuItem closeOnSelect={false} @@ -159,13 +169,6 @@ export const ContextMenu = (props: ContextMenuProps) => { Permenantly delete note </MenuItem> )} - <MenuItem - onClick={() => { - setPreviewNode(node) - }} - > - Preview - </MenuItem> </MenuList> </Menu> </Box> |