From fd4edbd6a854275c10c5b21173f0875921d547d1 Mon Sep 17 00:00:00 2001
From: "Thomas F. K. Jorna" <hello@tefkah.com>
Date: Thu, 7 Oct 2021 01:42:14 +0200
Subject: feat(preview): hover links + ui upgrade

---
 components/contextmenu.tsx | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

(limited to 'components/contextmenu.tsx')

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>
-- 
cgit v1.2.3

