Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

ui: add trash item type

thecodrr98cbb5dcce38
diff --git a/apps/web/src/components/notebook/index.js b/apps/web/src/components/notebook/index.js
index a9e86ccff..e2559eae9 100644
--- a/apps/web/src/components/notebook/index.js
+++ b/apps/web/src/components/notebook/index.js
@@ -74,7 +74,10 @@ const Notebook = ({ item, index, onClick, onTopicClick }) => {
info={
<Flex justifyContent="center" alignItems="center">
{new Date(notebook.dateCreated).toDateString().substring(4)}
- <Text as="span">{" • " + notebook.totalNotes} Notes</Text>
+ <Text as="span" mx={1}>
+ •
+ </Text>
+ <Text>{notebook.totalNotes} Notes</Text>
{notebook.favorite && (
<Icon.Star size={16} style={{ marginLeft: 5 }} />
)}
diff --git a/apps/web/src/components/trash/index.js b/apps/web/src/components/trash/index.js
index ac5e8d45e..905a733d3 100644
--- a/apps/web/src/components/trash/index.js
+++ b/apps/web/src/components/trash/index.js
@@ -1,8 +1,6 @@
import React from "react";
-import * as Icon from "react-feather";
+import { Flex, Text } from "rebass";
import TimeAgo from "timeago-react";
-import { db, ev } from "../../common";
-import { showSnack } from "../snackbar";
import ListItem from "../list-item";
const dropdownRefs = [];
@@ -22,7 +20,17 @@ const Trash = ({ item, index }) => {
body={trashItem.headline}
index={index}
onClick={() => {}} //TODO
- info={<TimeAgo datetime={trashItem.dateDeleted} />}
+ info={
+ <Flex justifyContent="center" alignItems="center">
+ <TimeAgo datetime={trashItem.dateDeleted} />
+ <Text as="span" mx={1}>
+ •
+ </Text>
+ <Text color="primary">
+ {trashItem.type[0].toUpperCase() + trashItem.type.substring(1)}
+ </Text>
+ </Flex>
+ }
menuData={trashItem}
menuItems={menuItems}
dropdownRefs={dropdownRefs}