Skip to content

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

feat: add favorites placeholder

thecodrr1ace0a280173
diff --git a/apps/web/src/components/listview/index.js b/apps/web/src/components/listview/index.js
index eb4fdde7b..8fc700838 100644
--- a/apps/web/src/components/listview/index.js
+++ b/apps/web/src/components/listview/index.js
@@ -4,10 +4,11 @@ import ListItem from "../list-item";
import TimeAgo from "timeago-react";
import ListContainer from "../list-container";
-function ListView({ items, menu, button, onClick, noType }) {
+function ListView({ items, menu, button, onClick, noType, placeholder }) {
return (
items && (
<ListContainer
+ placeholder={placeholder}
itemsLength={items.length}
item={index => {
const item = items[index];
diff --git a/apps/web/src/components/placeholders/favorites-placeholder.js b/apps/web/src/components/placeholders/favorites-placeholder.js
index 8964f7ead..5c5bdf84a 100644
--- a/apps/web/src/components/placeholders/favorites-placeholder.js
+++ b/apps/web/src/components/placeholders/favorites-placeholder.js
@@ -31,7 +31,7 @@ const FavoritesPlaceholder = props => {
position: "relative"
}}
animate={{
- opacity: [0, 0.5, 1, 0.5, 0],
+ opacity: [0.1, 0.5, 1, 0.5, 0],
scaleX: [0.7, 0.75, 0.85, 0.9, 1],
scaleY: [0.7, 0.75, 0.85, 0.9, 1]
}}
@@ -48,13 +48,12 @@ const FavoritesPlaceholder = props => {
</Flex>
<Text
- color="icon"
- width="80%"
+ color="gray"
marginTop={50}
alignSelf="center"
sx={{
textAlign: "center",
- fontSize: "body"
+ fontSize: "title"
}}
>
Notes you favorite appear here.
diff --git a/apps/web/src/components/placeholders/notebooks-placeholder.js b/apps/web/src/components/placeholders/notebooks-placeholder.js
index fe6443db4..2d965c7db 100644
--- a/apps/web/src/components/placeholders/notebooks-placeholder.js
+++ b/apps/web/src/components/placeholders/notebooks-placeholder.js
@@ -105,7 +105,6 @@ const NotebooksPlaceholder = props => {
sx={{
borderRadius: "5px",
boxShadow: "1px 1px 5px 0px #00000060",
- borderRadius: "5px",
height: "150px",
width: "120px",
justifyContent: "center",
diff --git a/apps/web/src/views/Favorites.js b/apps/web/src/views/Favorites.js
index a04fc8d3a..15e70ef83 100644
--- a/apps/web/src/views/Favorites.js
+++ b/apps/web/src/views/Favorites.js
@@ -2,6 +2,7 @@ import React, { useEffect } from "react";
import ListView from "../components/listview";
import { useStore, store, LIST_TYPES } from "../stores/note-store";
import { useStore as useEditorStore } from "../stores/editor-store";
+import FavoritesPlaceholder from "../components/placeholders/favorites-placeholder";
const dropdownRefs = [];
const menuItems = item => [
{
@@ -17,6 +18,7 @@ function Favorites() {
return (
<ListView
type="Favorites"
+ placeholder={FavoritesPlaceholder}
items={items}
menu={{ menuItems, dropdownRefs }}
noType