From ca5cfb62c1cc1e2850103ba13ede59380e6808ba Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 18 Oct 2021 00:52:21 +0200 Subject: feat: exclude nodes from local graph (#115) --- components/Sidebar/Title.tsx | 25 +++++++++++++++++++++++++ components/contextmenu.tsx | 4 ++++ 2 files changed, 29 insertions(+) create mode 100644 components/Sidebar/Title.tsx (limited to 'components') diff --git a/components/Sidebar/Title.tsx b/components/Sidebar/Title.tsx new file mode 100644 index 0000000..5d39190 --- /dev/null +++ b/components/Sidebar/Title.tsx @@ -0,0 +1,25 @@ +import { Flex, Heading } from '@chakra-ui/react' +import React from 'react' +import { BiFile } from 'react-icons/bi' + +import { OrgRoamNode } from '../../api' +export interface TitleProps { + previewNode: OrgRoamNode +} + +export const Title = (props: TitleProps) => { + const { previewNode } = props + return ( + + {/* { + * // e.preventDefault() + * // openContextMenu(previewNode, e) + * // }} + * /> */} + + {previewNode?.title} + + + ) +} diff --git a/components/contextmenu.tsx b/components/contextmenu.tsx index 77deb48..54a8c85 100644 --- a/components/contextmenu.tsx +++ b/components/contextmenu.tsx @@ -40,6 +40,7 @@ import { ExternalLinkIcon, ChevronRightIcon, PlusSquareIcon, + MinusIcon, } from '@chakra-ui/icons' import { OrgRoamGraphReponse, OrgRoamLink, OrgRoamNode } from '../api' @@ -119,6 +120,9 @@ export const ContextMenu = (props: ContextMenuProps) => { > Open local graph for this node + handleLocal(target!, 'remove')} icon={}> + Exclude node from local graph + )} {!target?.properties?.FILELESS ? ( -- cgit v1.2.3