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
fix: small ui inconsistencies
thecodrr7fa68f178d07
diff --git a/apps/web/src/app.js b/apps/web/src/app.jsindex 644ab1cc6..4c0f774b4 100644--- a/apps/web/src/app.js+++ b/apps/web/src/app.js@@ -108,10 +108,10 @@ function App() {<Flex variant="rowFill"><Animated.Flexvariant="columnFill"- initial={{ width: "30%", opacity: 1, scaleY: 1 }}+ initial={{ width: "30%", opacity: 1, x: 0 }}animate={{width: show ? "30%" : "0%",- scaleY: show ? 1 : 0.8,+ x: show ? 0 : "-30%",opacity: show ? 1 : 0,zIndex: show ? 0 : -1,}}diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.jsindex 23cbf704d..7a6bcb686 100644--- a/apps/web/src/components/editor/index.js+++ b/apps/web/src/components/editor/index.js@@ -1,4 +1,4 @@-import React, { useEffect, useRef } from "react";+import React, { useEffect, useMemo, useRef } from "react";import "./editor.css";import ReactQuill from "./react-quill";import { Box, Flex } from "rebass";@@ -17,6 +17,7 @@ import SplitEditor from "../spliteditor";import Unlock from "../unlock";import RouteContainer from "../route-container";import useMobile from "../../utils/use-mobile";+import useTablet from "../../utils/use-tablet";import { SUBSCRIPTION_STATUS } from "../../common";import Toolbar from "./toolbar";import Footer from "./footer";@@ -32,10 +33,16 @@ function Editor() {const init = useStore((store) => store.init);const isFocusMode = useAppStore((store) => store.isFocusMode);const isMobile = useMobile();+ const isTablet = useTablet();+const isTrial = useUserStore((store) => store.user?.subscription?.status === SUBSCRIPTION_STATUS.TRIAL);const isLoggedin = useUserStore((store) => store.isLoggedIn);+ const editorMargins = useMemo(() => {+ if (isMobile || isTablet) return "0%";+ else return "15%";+ }, [isTablet, isMobile]);const quillRef = useRef();const [diff] = useHashParam("diff");@@ -116,10 +123,10 @@ function Editor() {<Animated.Flexvariant="columnFill"className="editor"- sx={{ mx: [0, 0, "15%"] }}+ sx={{ mx: [0, 0, editorMargins] }}animate={{- marginRight: isFocusMode ? "25%" : "15%",- marginLeft: isFocusMode ? "25%" : "15%",+ marginRight: isFocusMode ? "25%" : editorMargins,+ marginLeft: isFocusMode ? "25%" : editorMargins,}}transition={{ duration: 0.3, ease: "easeOut" }}mt={[0, 0, 50]}diff --git a/apps/web/src/components/editor/titlebox.js b/apps/web/src/components/editor/titlebox.jsindex b6c5c8942..6be6c68c4 100644--- a/apps/web/src/components/editor/titlebox.js+++ b/apps/web/src/components/editor/titlebox.js@@ -14,7 +14,7 @@ function TitleBox(props) {const textarea = document.querySelector(".editorTitle");const dummy = document.querySelector(".dummyEditorTitle");dummy.innerHTML = textarea.value;- setHeight(dummy.scrollHeight);+ setHeight(dummy.scrollHeight || 60);}, []);useEffect(() => {diff --git a/apps/web/src/components/editor/toolbar.js b/apps/web/src/components/editor/toolbar.jsindex 475abc1e2..0ad1bd5a7 100644--- a/apps/web/src/components/editor/toolbar.js+++ b/apps/web/src/components/editor/toolbar.js@@ -11,6 +11,7 @@ import Animated from "../animated";function Toolbar(props) {const { quill } = props;const sessionState = useStore((store) => store.session.state);+ const sessionId = useStore((store) => store.session.sessionId);const [undoable, setUndoable] = useState(false);const [redoable, setRedoable] = useState(false);const isFocusMode = useAppStore((store) => store.isFocusMode);@@ -92,8 +93,8 @@ function Toolbar(props) {}}size={30}onClick={() => {+ if (sessionId) showToast("success", "Note saved!");clearSession();- showToast("success", "Note saved!");}}/><Animated.Textdiff --git a/apps/web/src/components/unlock/index.js b/apps/web/src/components/unlock/index.jsindex a1c942da4..1c7e64cdd 100644--- a/apps/web/src/components/unlock/index.js+++ b/apps/web/src/components/unlock/index.js@@ -31,60 +31,59 @@ function Unlock(props) {return (<Flex- width={"100%"}- flex="1 1 auto"+ flex="1"+ flexDirection="column"justifyContent="center"alignItems="center"+ mx={2}>- <Flex flex="1" flexDirection="column" alignItems="center">- <Flex justifyContent="center" alignItems="center">- <Icon.Unlock size={48} color="text" />- <Text variant="heading" ml={2} fontSize={48}>- Unlock Note- </Text>- </Flex>- <Text variant="body" color="gray">- Please unlock this note using your vault password.+ <Flex justifyContent="center" alignItems="center">+ <Icon.Unlock size={"heading"} color="text" />+ <Text variant="heading" ml={2} fontSize={48}>+ Unlock Note</Text>- <Input- ref={passwordRef}- autoFocus- variant={isWrong ? "error" : "input"}- mt={5}- maxWidth={["95%", "95%", "50%"]}- placeholder="Enter vault password"- type="password"- onKeyUp={async (e) => {- if (e.key === "Enter") {- await submit();- } else {- setIsWrong(false);- }- }}- />- {isWrong && (- <Flex- alignItems="center"- justifyContent="center"- alignSelf="flex-start"- color="error"- mt={2}- >- <Icon.Alert color="error" />- <Text ml={1} fontSize={"body"}>- Wrong password- </Text>- </Flex>- )}- <Button- mt={3}- onClick={async () => {+ </Flex>+ <Text variant="body" color="gray" textAlign="center">+ Please unlock this note using your vault password.+ </Text>+ <Input+ ref={passwordRef}+ autoFocus+ variant={isWrong ? "error" : "input"}+ mt={5}+ maxWidth={["95%", "95%", "50%"]}+ placeholder="Enter vault password"+ type="password"+ onKeyUp={async (e) => {+ if (e.key === "Enter") {await submit();- }}+ } else {+ setIsWrong(false);+ }+ }}+ />+ {isWrong && (+ <Flex+ alignItems="center"+ justifyContent="center"+ alignSelf="flex-start"+ color="error"+ mt={2}>- Unlock- </Button>- </Flex>+ <Icon.Alert color="error" />+ <Text ml={1} fontSize={"body"}>+ Wrong password+ </Text>+ </Flex>+ )}+ <Button+ mt={3}+ onClick={async () => {+ await submit();+ }}+ >+ Unlock+ </Button></Flex>);}diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.jsindex f4f6fc4e7..0e749bb23 100644--- a/apps/web/src/views/settings.js+++ b/apps/web/src/views/settings.js@@ -155,7 +155,7 @@ function Settings(props) {</Flex><Flex variant="columnCenter" alignItems="flex-start"><Text variant="subBody">You are not logged in</Text>- <Text variant="body" color="primary" fontSize={14}>+ <Text variant="body" color="primary" fontSize={"body"}>Login to sync your notes</Text></Flex>