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
refactor: fix all warnings
thecodrraa8a257c35f8
diff --git a/apps/web/src/common/dialogcontroller.js b/apps/web/src/common/dialogcontroller.jsindex 8db5144c8..989a6db6a 100644--- a/apps/web/src/common/dialogcontroller.js+++ b/apps/web/src/common/dialogcontroller.js@@ -7,7 +7,6 @@ import { store as notebookStore } from "../stores/notebook-store";import { store as appStore } from "../stores/app-store";import { db } from "./db";import { showToast } from "../utils/toast";-import { CHECK_IDS } from "notes-core/common";import { Flex, Text } from "rebass";import * as Icon from "../components/icons";import download from "../utils/download";diff --git a/apps/web/src/common/index.js b/apps/web/src/common/index.jsindex 7bb59c227..49b229130 100644--- a/apps/web/src/common/index.js+++ b/apps/web/src/common/index.js@@ -9,7 +9,6 @@ import {showPasswordDialog,} from "../common/dialog-controller";import Config from "../utils/config";-import { store as userstore } from "../stores/user-store";import { hashNavigate, getCurrentHash } from "../navigation";import { db } from "./db";import { sanitizeFilename } from "../utils/filename";diff --git a/apps/web/src/components/dialogs/buydialog.js b/apps/web/src/components/dialogs/buydialog.jsindex 617146f8e..b95ddcf2d 100644--- a/apps/web/src/components/dialogs/buydialog.js+++ b/apps/web/src/components/dialogs/buydialog.js@@ -3,7 +3,6 @@ import { Text, Flex, Button } from "rebass";import Dialog from "./dialog";import * as Icon from "../icons";import { useStore as useUserStore } from "../../stores/user-store";-import { useStore as useThemeStore } from "../../stores/theme-store";import { getCouponData, upgrade } from "../../common/checkout";import { showLogInDialog } from "../../common/dialog-controller";import { ReactComponent as Personalization } from "../../assets/accent.svg";diff --git a/apps/web/src/components/dialogs/password-dialog.js b/apps/web/src/components/dialogs/password-dialog.jsindex edc29be1e..bbda3548f 100644--- a/apps/web/src/components/dialogs/password-dialog.js+++ b/apps/web/src/components/dialogs/password-dialog.js@@ -4,7 +4,6 @@ import Dialog from "./dialog";import Field from "../field";import { Checkbox, Label } from "@rebass/forms";-const requiredValues = ["password", "newPassword", "oldPassword"];function PasswordDialog(props) {const { type, checks } = props;const [error, setError] = useState();diff --git a/apps/web/src/components/diff-viewer/index.js b/apps/web/src/components/diff-viewer/index.jsindex e529fea93..66b8c9720 100644--- a/apps/web/src/components/diff-viewer/index.js+++ b/apps/web/src/components/diff-viewer/index.js@@ -1,4 +1,4 @@-import React, { useState, useEffect, useCallback } from "react";+import { useState, useEffect, useCallback } from "react";import { Flex, Box, Text, Button } from "rebass";import * as Icon from "../icons";import ContentToggle from "./content-toggle";@@ -6,7 +6,6 @@ import { store as notesStore } from "../../stores/note-store";import { db } from "../../common/db";import { useStore as useAppStore } from "../../stores/app-store";import { useStore as useThemeStore } from "../../stores/theme-store";-import { useStore as useUserStore } from "../../stores/user-store";import { useStore as useEditorStore } from "../../stores/editor-store";import { hashNavigate } from "../../navigation";import HTMLDiffer from "./differ";@@ -127,7 +126,7 @@ function DiffViewer(props) {conflicts = undefined;currentConflict = undefined;})();- }, []);+ }, [noteId, resolveConflict]);useEffect(() => {let cssPath = "";diff --git a/apps/web/src/stores/app-store.js b/apps/web/src/stores/app-store.jsindex fa8268986..e1bed0090 100644--- a/apps/web/src/stores/app-store.js+++ b/apps/web/src/stores/app-store.js@@ -3,7 +3,6 @@ import { db } from "../common/db";import { store as noteStore } from "./note-store";import { store as notebookStore } from "./notebook-store";import { store as trashStore } from "./trash-store";-import { store as editorStore } from "./editor-store";import { store as tagStore } from "./tag-store";import BaseStore from "./index";import { isMobile } from "../utils/dimensions";diff --git a/apps/web/src/views/email-confirmed.js b/apps/web/src/views/email-confirmed.jsindex 1353e0c0b..5b8d46ecc 100644--- a/apps/web/src/views/email-confirmed.js+++ b/apps/web/src/views/email-confirmed.js@@ -1,8 +1,6 @@-import React, { useEffect } from "react";+import { useEffect } from "react";import { Button, Flex, Text } from "rebass";import ThemeProvider from "../components/theme-provider";-import { db } from "../common/db";-import { showBuyDialog } from "../common/dialog-controller";import { trackEvent } from "../utils/analytics";import { useQueryParams } from "../navigation";@@ -107,74 +105,74 @@ function BlogPromoBanner(props) {);}-function SaleBanner(props) {- const { discount, coupon, userId } = props;+// function SaleBanner(props) {+// const { discount, coupon, userId } = props;- return (- <Flex flexDirection="column" p={4}>- <Text- as="p"- variant="body"- fontSize="title"- lineHeight="22px"- textAlign="center"- >- We started out building Notesnook in November 2019. Our mission was to- make privacy simple. It is one thing to say,{" "}- <Text as="span" color="primary">- "Privacy is our basic right"- </Text>{" "}- and quite another to actually prove it.- <br />- Almost 1 and a half year later, we are here with over 2000 users, 5000+- downloads on Google Play Store, 10,000+ encrypted notes, and 100+- members in our Discord community; all proof that{" "}- <Text as="span" color="primary">- privacy matters.- </Text>- <br />- </Text>- <Text variant="title" mt={2} textAlign="center">- In celebration of this happy day, we are giving a special discount to- all our new members.- </Text>- <Text- variant="heading"- fontSize={32}- color="primary"- textAlign="center"- fontWeight="bold"- mt={2}- >- {discount}% OFF if you subscribe today!- </Text>- <Button- mt={2}- fontSize="title"- width="100%"- fontWeight="bold"- sx={{ boxShadow: "2px 2px 15px 0px #00000044" }}- onClick={async () => {- trackEvent(`Email verification offer`, "offers");- let user = await db.user.getUser();- if (user && user.id !== userId) await db.user.logout(true);- await showBuyDialog(coupon);- }}- >- Subscribe now and stand up for privacy!- </Button>- <Text variant="body" textAlign="center" mt={2} color="fontTertiary">- Big companies say, "X feature won't be possible if we went- zero-knowledge." We are here to call them out. Your contribution will- help us prove that giving up on privacy is just an excuse to rip users- off, sell their data and make money.- <Text variant="body" fontSize="subBody" mt={1}>- *Use code <b>{coupon}</b> at checkout to get your discount.- </Text>- <Text variant="body" fontSize="subBody" mt={1}>- ** Only the first 10 people get to claim the discount. Be the first.- </Text>- </Text>- </Flex>- );-}+// return (+// <Flex flexDirection="column" p={4}>+// <Text+// as="p"+// variant="body"+// fontSize="title"+// lineHeight="22px"+// textAlign="center"+// >+// We started out building Notesnook in November 2019. Our mission was to+// make privacy simple. It is one thing to say,{" "}+// <Text as="span" color="primary">+// "Privacy is our basic right"+// </Text>{" "}+// and quite another to actually prove it.+// <br />+// Almost 1 and a half year later, we are here with over 2000 users, 5000++// downloads on Google Play Store, 10,000+ encrypted notes, and 100++// members in our Discord community; all proof that{" "}+// <Text as="span" color="primary">+// privacy matters.+// </Text>+// <br />+// </Text>+// <Text variant="title" mt={2} textAlign="center">+// In celebration of this happy day, we are giving a special discount to+// all our new members.+// </Text>+// <Text+// variant="heading"+// fontSize={32}+// color="primary"+// textAlign="center"+// fontWeight="bold"+// mt={2}+// >+// {discount}% OFF if you subscribe today!+// </Text>+// <Button+// mt={2}+// fontSize="title"+// width="100%"+// fontWeight="bold"+// sx={{ boxShadow: "2px 2px 15px 0px #00000044" }}+// onClick={async () => {+// trackEvent(`Email verification offer`, "offers");+// let user = await db.user.getUser();+// if (user && user.id !== userId) await db.user.logout(true);+// await showBuyDialog(coupon);+// }}+// >+// Subscribe now and stand up for privacy!+// </Button>+// <Text variant="body" textAlign="center" mt={2} color="fontTertiary">+// Big companies say, "X feature won't be possible if we went+// zero-knowledge." We are here to call them out. Your contribution will+// help us prove that giving up on privacy is just an excuse to rip users+// off, sell their data and make money.+// <Text variant="body" fontSize="subBody" mt={1}>+// *Use code <b>{coupon}</b> at checkout to get your discount.+// </Text>+// <Text variant="body" fontSize="subBody" mt={1}>+// ** Only the first 10 people get to claim the discount. Be the first.+// </Text>+// </Text>+// </Flex>+// );+// }diff --git a/apps/web/src/views/search.js b/apps/web/src/views/search.jsindex 3116b379e..b916179ef 100644--- a/apps/web/src/views/search.js+++ b/apps/web/src/views/search.js@@ -1,4 +1,4 @@-import React, { useEffect, useMemo, useState } from "react";+import { useMemo, useState } from "react";import ListContainer from "../components/list-container";import SearchPlaceholder from "../components/placeholders/search-placeholder";import { db } from "../common/db";