A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: improve placeholders and add c2a
thecodrr2c5623c2115f
diff --git a/apps/web/src/components/placeholders/favorites-placeholder.js b/apps/web/src/components/placeholders/favorites-placeholder.jsindex b7ed86ead..c805341af 100644--- a/apps/web/src/components/placeholders/favorites-placeholder.js+++ b/apps/web/src/components/placeholders/favorites-placeholder.js@@ -3,6 +3,12 @@ import { ReactComponent as Fav } from "../../assets/fav.svg";import Placeholder from "./index";function FavoritesPlaceholder() {- return <Placeholder image={Fav} />;+ return (+ <Placeholder+ image={Fav}+ title="Your favorites"+ text="Notes you favorite will appear here."+ />+ );}export default FavoritesPlaceholder;diff --git a/apps/web/src/components/placeholders/index.js b/apps/web/src/components/placeholders/index.jsindex f542a40cd..f6938aa6a 100644--- a/apps/web/src/components/placeholders/index.js+++ b/apps/web/src/components/placeholders/index.js@@ -1,5 +1,5 @@import React, { useEffect } from "react";-import { Flex } from "rebass";+import { Button, Flex, Text } from "rebass";import { useStore } from "../../stores/theme-store";import { changeSvgTheme } from "../../utils/css";@@ -8,7 +8,7 @@ function Placeholder(props) {useEffect(() => {changeSvgTheme(accent);}, [accent]);- const { image: Image } = props;+ const { image: Image, title, text, callToAction } = props;return (<>@@ -17,7 +17,22 @@ function Placeholder(props) {alignSelf="stretch"sx={{ position: "relative" }}>- <Image width={"100%"} height={"120px"} />+ <Image width={"100%"} height={"100px"} />+ <Text variant="body" mt={2} color="fontTertiary">+ {text}+ </Text>+ {callToAction && (+ <Button+ mt={1}+ display="flex"+ sx={{ alignItems: "center", justifyContent: "center" }}+ variant="tool"+ onClick={callToAction.onClick}+ >+ <callToAction.icon size={18} color="primary" />+ <Text ml={1}>{callToAction.text}</Text>+ </Button>+ )}</Flex></>);diff --git a/apps/web/src/components/placeholders/notebooks-placeholder.js b/apps/web/src/components/placeholders/notebooks-placeholder.jsindex 8cadb1f8f..573540bd2 100644--- a/apps/web/src/components/placeholders/notebooks-placeholder.js+++ b/apps/web/src/components/placeholders/notebooks-placeholder.js@@ -1,8 +1,21 @@import React from "react";import { ReactComponent as Notebook } from "../../assets/notebook.svg";import Placeholder from "./index";+import * as Icon from "../icons";+import { hashNavigate } from "../../navigation";function NotebooksPlaceholder() {- return <Placeholder image={Notebook} />;+ return (+ <Placeholder+ image={Notebook}+ title="Your notebooks"+ text="You have not made any notebooks yet."+ callToAction={{+ text: "Make your first notebook",+ icon: Icon.Plus,+ onClick: () => hashNavigate("/notebooks/create"),+ }}+ />+ );}export default NotebooksPlaceholder;diff --git a/apps/web/src/components/placeholders/notesplacholder.js b/apps/web/src/components/placeholders/notesplacholder.jsindex ad21df705..407d53302 100644--- a/apps/web/src/components/placeholders/notesplacholder.js+++ b/apps/web/src/components/placeholders/notesplacholder.js@@ -1,8 +1,21 @@import React from "react";import { ReactComponent as Note } from "../../assets/note.svg";import Placeholder from "./index";+import * as Icon from "../icons";+import { hashNavigate } from "../../navigation";function NotesPlaceholder() {- return <Placeholder image={Note} />;+ return (+ <Placeholder+ image={Note}+ title="Your notes"+ text="You have not made any notes yet."+ callToAction={{+ text: "Make your first note",+ icon: Icon.Plus,+ onClick: () => hashNavigate("/notes/create"),+ }}+ />+ );}export default NotesPlaceholder;diff --git a/apps/web/src/components/placeholders/search-placeholder.js b/apps/web/src/components/placeholders/search-placeholder.jsindex a66f16b58..3452c86d7 100644--- a/apps/web/src/components/placeholders/search-placeholder.js+++ b/apps/web/src/components/placeholders/search-placeholder.js@@ -3,6 +3,6 @@ import { ReactComponent as Search } from "../../assets/search.svg";import Placeholder from "./index";function SearchPlaceholder() {- return <Placeholder image={Search} />;+ return <Placeholder image={Search} text="Nothing to show." />;}export default SearchPlaceholder;diff --git a/apps/web/src/components/placeholders/tags-placeholder.js b/apps/web/src/components/placeholders/tags-placeholder.jsindex e52306895..8a7de8ce4 100644--- a/apps/web/src/components/placeholders/tags-placeholder.js+++ b/apps/web/src/components/placeholders/tags-placeholder.js@@ -3,6 +3,12 @@ import { ReactComponent as Tag } from "../../assets/tag.svg";import Placeholder from "./index";function TagsPlaceholder() {- return <Placeholder image={Tag} />;+ return (+ <Placeholder+ image={Tag}+ title="Your tags"+ text="You have not tagged any notes yet."+ />+ );}export default TagsPlaceholder;diff --git a/apps/web/src/components/placeholders/trash-placeholder.js b/apps/web/src/components/placeholders/trash-placeholder.jsindex aaecac94b..90bcfcc34 100644--- a/apps/web/src/components/placeholders/trash-placeholder.js+++ b/apps/web/src/components/placeholders/trash-placeholder.js@@ -3,6 +3,12 @@ import { ReactComponent as Trash } from "../../assets/trash.svg";import Placeholder from "./index";function TrashPlaceholder() {- return <Placeholder image={Trash} />;+ return (+ <Placeholder+ image={Trash}+ title="Your trash"+ text="All items here are permanently deleted after 7 days."+ />+ );}export default TrashPlaceholder;