From eef204000abc79c9a83f3ce268f051dcfff6bf7d Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 26 Jul 2021 01:42:10 +0200 Subject: file viewer, prettier things --- pages/_app.tsx | 3 ++- pages/index.tsx | 41 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 4 deletions(-) (limited to 'pages') diff --git a/pages/_app.tsx b/pages/_app.tsx index 9a11798..3804c64 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -48,7 +48,8 @@ function MyApp({ Component, pageProps }: AppProps) { white: emacsTheme.bg, black: emacsTheme.fg, gray: { - 200: emacsTheme.base1, + 100: emacsTheme.base1, + 200: d3int.interpolate(emacsTheme.base1, emacsTheme.base3)(0.3), 300: emacsTheme.base2, 400: emacsTheme.base3, 500: emacsTheme.base4, diff --git a/pages/index.tsx b/pages/index.tsx index 8c97a79..4451a44 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -9,14 +9,17 @@ import type { import { OrgRoamGraphReponse, OrgRoamLink, OrgRoamNode } from '../api' import { GraphData, NodeObject } from 'force-graph' +import Head from 'next/head' + import { useWindowSize } from '@react-hook/window-size' import { useAnimation } from '@lilib/hooks' -import { Button, Box, IconButton, useTheme } from '@chakra-ui/react' +import { Button, Box, IconButton, useTheme, useDisclosure } from '@chakra-ui/react' import { SettingsIcon } from '@chakra-ui/icons' import { initialPhysics, initialFilter } from '../components/config' import { Tweaks } from '../components/tweaks' +import { Sidebar } from '../components/sidebar' // react-force-graph fails on import when server-rendered // https://github.com/vasturiano/react-force-graph/issues/155 @@ -54,6 +57,7 @@ export function GraphPage() { const [filter, setFilter] = usePersistantState('filter', initialFilter) const [graphData, setGraphData] = useState(null) const [emacsNodeId, setEmacsNodeId] = useState(null) + const { isOpen, onOpen, onClose } = useDisclosure() const nodeByIdRef = useRef({}) const linksByNodeIdRef = useRef({}) @@ -135,7 +139,32 @@ export function GraphPage() { } return ( - + + + Org Roam UI + + + + {threeDim ? ( - + ) : ( )} -- cgit v1.2.3