From 41e999d0dc9b77765c8fbb153e6d781462bc71c2 Mon Sep 17 00:00:00 2001 From: Gabriel Handford Date: Sat, 8 Aug 2020 12:01:51 -0700 Subject: [PATCH] DB view changes --- src/renderer/views/db/index.tsx | 111 ++++++++++++-------------------- 1 file changed, 42 insertions(+), 69 deletions(-) diff --git a/src/renderer/views/db/index.tsx b/src/renderer/views/db/index.tsx index 311af4f..eb83e44 100644 --- a/src/renderer/views/db/index.tsx +++ b/src/renderer/views/db/index.tsx @@ -4,6 +4,7 @@ import { Box, Button, Divider, + Drawer, Paper, Table, TableBody, @@ -84,75 +85,47 @@ export default class DBView extends React.Component { render() { const {collections, documents} = this.state return ( - - - - - - {/* - - - Path - - - - */} - - {collections.map((col, index) => ( - this.selectCollection(col)} key={col.path}> - - {col.path} - - - ))} - -
-
- - - - {/* - - - - - - - - - - */} - - {documents.map((doc: Document, index: number) => ( - this.selectDocument(doc)} key={doc.path}> - - - {doc.path} - - - - - {doc.value} - - - {dateString(doc.createdAt)} - - - {dateString(doc.updatedAt)} - - - - ))} - -
-
-
+ + + + {collections.map((col, index) => ( + this.selectCollection(col)} + key={col.path} + style={{cursor: 'pointer'}} + > + + {col.path} + + + ))} + +
+ + + + {documents.map((doc: Document, index: number) => ( + this.selectDocument(doc)} key={doc.path}> + + + {doc.path} + + + {doc.value} + + + {dateString(doc.createdAt)} + + + {dateString(doc.updatedAt)} + + + + + ))} + +
) }