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
ui: start the editor sidebar
thecodrr0d0a3fdc19d3
diff --git a/apps/web/src/app.js b/apps/web/src/app.jsindex bedd64840..59a90e862 100644--- a/apps/web/src/app.js+++ b/apps/web/src/app.js@@ -5,7 +5,8 @@ import { ThemeProvider } from "emotion-theming";import { Flex, Box, Button } from "rebass";import theme from "./theme";import { routes, navigate } from "./navigation";-+import CheckBox from "./components/checkbox";+import * as Icon from "react-feather";const NavMenuItem = props => {useEffect(() => {if (props.selected) {@@ -69,9 +70,22 @@ function App() {flex="1 1 auto"px={2}py={2}- width={["100%", "40%", "13%"]}+ width={["100%", "40%", "15%"]}/><Editor />+ <Flex+ sx={{ borderRight: "1px solid", borderColor: "border" }}+ flexDirection="column"+ bg="navbg"+ flex="1 1 auto"+ px={2}+ py={2}+ width={["0%", "0%", "10%"]}+ >+ <CheckBox icon={Icon.MapPin} label="Pin" />+ <CheckBox icon={Icon.Star} label="Favorite" />+ <CheckBox icon={Icon.Lock} label="Lock" />+ </Flex></Flex><Box id="snackbarContainer" /></Flex>diff --git a/apps/web/src/components/checkbox/index.js b/apps/web/src/components/checkbox/index.jsnew file mode 100644index 000000000..ec4a6cbc5--- /dev/null+++ b/apps/web/src/components/checkbox/index.js@@ -0,0 +1,40 @@+import React, { useState } from "react";+import { Flex, Text } from "rebass";+import * as Icon from "react-feather";++const CheckBox = props => {+ const [checked, setChecked] = useState(props.checked);+ return (+ <Flex+ onClick={() => {+ setChecked(!checked);+ if (props.onCheckChanged) {+ props.onCheckChanged(checked);+ }+ }}+ className="unselectable"+ width="full"+ alignItems="center"+ justifyContent="space-between"+ sx={{ cursor: "pointer", marginBottom: 1 }}+ >+ <Flex+ className="unselectable"+ fontSize="body"+ sx={{ cursor: "pointer" }}+ alignItems="center"+ >+ <props.icon size={18} />+ <Text sx={{ marginLeft: 1 }}>{props.label}</Text>+ </Flex>+ <Text color={checked ? "primary" : "foreground"}>+ <Icon.CheckCircle+ className="unselectable"+ style={{ cursor: "pointer" }}+ />+ </Text>+ </Flex>+ );+};++export default CheckBox;diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.jsindex 7b2732071..d7fd05497 100644--- a/apps/web/src/components/editor/index.js+++ b/apps/web/src/components/editor/index.js@@ -138,7 +138,7 @@ const Editor = props => {return (<FlexclassName="editor"- width={["0%", "60%", "70%"]}+ width={["0%", "50%", "55%"]}flex="1 1 auto"flexDirection="column">