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: minor improvements, font change
thecodrrbfbe6e7adcc1
diff --git a/apps/web/src/components/editor/editor.css b/apps/web/src/components/editor/editor.cssindex 5b02fa0a6..8c6afed4d 100644--- a/apps/web/src/components/editor/editor.css+++ b/apps/web/src/components/editor/editor.css@@ -32,6 +32,7 @@border: none !important;border-top: 1px solid var(--border) !important;padding: 5px !important;+ padding-left: 0px !important;}/*Color Overrides*/diff --git a/apps/web/src/components/editor/editormenu.js b/apps/web/src/components/editor/editormenu.jsnew file mode 100644index 000000000..943c74efc--- /dev/null+++ b/apps/web/src/components/editor/editormenu.js@@ -0,0 +1,36 @@+import React from "react";+import { useStore } from "../../stores/editor-store";+import { Flex, Button } from "rebass";++function EditorMenu(props) {+ const saveSession = useStore(store => store.saveSession);+ const newSession = useStore(store => store.newSession);+ const { quill } = props;++ return (+ <Flex+ sx={{+ borderBottom: "1px solid",+ borderColor: "border",+ fontSize: 13+ }}+ >+ <Button variant="menu" onClick={() => newSession()}>+ <span style={{ textDecoration: "underline" }}>N</span>ew+ </Button>+ <Button variant="menu" onClick={() => quill.history.undo()}>+ Undo+ </Button>+ <Button variant="menu" onClick={() => quill.history.redo()}>+ Redo+ </Button>+ <Button variant="menu" onClick={() => saveSession()}>+ <span style={{ textDecoration: "underline" }}>S</span>ave+ </Button>+ <Button variant="menu">+ <span style={{ textDecoration: "underline" }}>E</span>xport+ </Button>+ </Flex>+ );+}+export default EditorMenu;diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.jsindex 563c2419b..d401a37a8 100644--- a/apps/web/src/components/editor/index.js+++ b/apps/web/src/components/editor/index.js@@ -9,6 +9,7 @@ import { timeConverter } from "../../utils/time";import { countWords } from "../../utils/string";import { useStore as useAppStore } from "../../stores/app-store";import Animated from "../animated";+import EditorMenu from "./editormenu";const TextSeperator = () => {return (@@ -33,6 +34,7 @@ function Editor() {const isFocusMode = useAppStore(store => store.isFocusMode);const hideProperties = useAppStore(store => store.hideProperties);const quillRef = useRef();+useEffect(() => {// move the toolbar outside (easiest way)const toolbar = document.querySelector(".ql-toolbar.ql-snow");@@ -63,7 +65,7 @@ function Editor() {variant="columnFill"className="editor"onFocus={() => {- hideProperties();+ //hideProperties();}}><TitleBox@@ -105,35 +107,7 @@ function Editor() {{id && id.length > 0 && <>{isSaving ? "Saving" : "Saved"}</>}</Text><Box id="toolbar" display={["none", "flex", "flex"]} />- <Flex- sx={{- borderBottom: "1px solid",- borderColor: "border",- fontSize: 13- }}- >- <Text variant="menu" ml={1} onClick={() => newSession()}>- <span style={{ textDecoration: "underline" }}>N</span>ew- </Text>- <Text- variant="menu"- onClick={() => quillRef.current.quill.history.undo()}- >- Undo- </Text>- <Text- variant="menu"- onClick={() => quillRef.current.quill.history.redo()}- >- Redo- </Text>- <Text variant="menu" onClick={() => saveSession()}>- <span style={{ textDecoration: "underline" }}>S</span>ave- </Text>- <Text variant="menu">- <span style={{ textDecoration: "underline" }}>E</span>xport- </Text>- </Flex>+ <EditorMenu quill={quillRef.current && quillRef.current.quill} /><ReactQuillref={quillRef}refresh={sessionState === SESSION_STATES.new}diff --git a/apps/web/src/components/menu/index.js b/apps/web/src/components/menu/index.jsindex 7f7cd94f5..8a14cd8e0 100644--- a/apps/web/src/components/menu/index.js+++ b/apps/web/src/components/menu/index.js@@ -12,7 +12,8 @@ function Menu(props) {sx={{position: "relative",borderRadius: "default",- boxShadow: 2,+ border: "2px solid",+ borderColor: "border",width: 140,...props.sx}}diff --git a/apps/web/src/components/navigation-menu/index.js b/apps/web/src/components/navigation-menu/index.jsindex 7c1c918cd..84b650c5f 100644--- a/apps/web/src/components/navigation-menu/index.js+++ b/apps/web/src/components/navigation-menu/index.js@@ -38,7 +38,7 @@ function NavigationMenu(props) {transition={{ duration: 0.3, ease: "easeOut" }}sx={{borderRight: "1px solid",- borderRightColor: "primary",+ borderRightColor: "border",minWidth: ["85%", 50, 50],maxWidth: ["85%", 50, 50],display: [isSideMenuOpen ? "flex" : "none", "flex", "flex"],diff --git a/apps/web/src/components/navitem/index.js b/apps/web/src/components/navitem/index.jsindex 1a306a24f..06328637a 100644--- a/apps/web/src/components/navitem/index.js+++ b/apps/web/src/components/navitem/index.js@@ -14,7 +14,7 @@ function NavItem(props) {}, [isSyncing, setIsLoading, animatable, key]);return (- <Button variant="menu" py={3} title={title} onClick={props.onSelected}>+ <Button variant="icon" py={3} title={title} onClick={props.onSelected}><FlexjustifyContent={["flex-start", "center", "center"]}alignItems="center"diff --git a/apps/web/src/index.css b/apps/web/src/index.cssindex d3e5a865f..c880c9c37 100644--- a/apps/web/src/index.css+++ b/apps/web/src/index.css@@ -1,4 +1,4 @@-@import url("https://fonts.googleapis.com/css?family=Noto+Sans+JP:400|Noto+Serif:700&display=swap");+@import url("https://fonts.googleapis.com/css2?family=DM+Sans&family=DM+Serif+Text&display=swap");:root,body,@@ -17,7 +17,7 @@ body,}* {- font-family: "Noto Sans JP", sans-serif;+ font-family: "DM Sans", sans-serif;}@keyframes fadeUp {diff --git a/apps/web/src/theme/colorscheme/light.js b/apps/web/src/theme/colorscheme/light.jsindex 5ba3a8c8f..765e0e95a 100644--- a/apps/web/src/theme/colorscheme/light.js+++ b/apps/web/src/theme/colorscheme/light.js@@ -8,7 +8,7 @@ class LightColorSchemeFactory {background: "white",accent: "white",bgSecondary: "#f0f0f0",- border: "#f0f0f0",+ border: "#e0e0e0",hover: "#e0e0e0",fontSecondary: "white",text: "#000000",diff --git a/apps/web/src/theme/font/fontsize.js b/apps/web/src/theme/font/fontsize.jsindex c1162c2c0..a48100069 100644--- a/apps/web/src/theme/font/fontsize.js+++ b/apps/web/src/theme/font/fontsize.js@@ -2,10 +2,10 @@ class FontSizeFactory {constructor(scaleFactor) {return {heading: 28 * scaleFactor,- input: 14 * scaleFactor,+ input: 16 * scaleFactor,title: 18 * scaleFactor,subtitle: 16 * scaleFactor,- body: 14 * scaleFactor,+ body: 16 * scaleFactor,menu: 14 * scaleFactor,subBody: 11 * scaleFactor};diff --git a/apps/web/src/theme/font/index.js b/apps/web/src/theme/font/index.jsindex 210db6d8f..6175612e4 100644--- a/apps/web/src/theme/font/index.js+++ b/apps/web/src/theme/font/index.js@@ -6,11 +6,12 @@ class FontFactory {fontSizes: new FontSizeFactory(scale),fontWeights: {body: 400,- bold: 700+ heading: 400,+ bold: 400},fonts: {- body: "Noto Sans JP, sans-serif",- heading: "Noto Serif, serif"+ body: "DM Sans, sans-serif",+ heading: `"DM Serif Text", serif`}};}diff --git a/apps/web/src/theme/index.js b/apps/web/src/theme/index.jsindex 73b4021b2..d1c8928e3 100644--- a/apps/web/src/theme/index.js+++ b/apps/web/src/theme/index.js@@ -5,7 +5,8 @@ import TransformerFactory from "./transformer";class ThemeFactory {transform(type, theme) {- return new TransformerFactory(type, theme);+ const factory = new TransformerFactory();+ return factory.construct(type, theme);}construct(config) {diff --git a/apps/web/src/theme/transformer/index.js b/apps/web/src/theme/transformer/index.jsindex 8b5e2424a..b8b829b00 100644--- a/apps/web/src/theme/transformer/index.js+++ b/apps/web/src/theme/transformer/index.js@@ -5,7 +5,7 @@ const transformers = {};class TransformerFactory {- constructor(type, theme) {+ construct(type, theme) {return transformers[type](theme);}}diff --git a/apps/web/src/theme/variants/button.js b/apps/web/src/theme/variants/button.jsindex 32a4abf75..e7222f054 100644--- a/apps/web/src/theme/variants/button.js+++ b/apps/web/src/theme/variants/button.js@@ -7,7 +7,8 @@ class ButtonFactory {tertiary: new Tertiary(),list: new List(),anchor: new Anchor(),- menu: new Menu()+ menu: new Menu(),+ icon: new Icon()};}}@@ -81,10 +82,25 @@ class Anchor {}}+class Icon {+ constructor() {+ return {+ variant: "buttons.default",+ color: "text",+ borderRadius: "none",+ ":hover": {+ backgroundColor: "shade"+ }+ };+ }+}+class Menu {constructor() {return {variant: "buttons.default",+ color: "text",+ p: 2,borderRadius: "none",":hover": {backgroundColor: "shade"diff --git a/apps/web/src/views/Home.js b/apps/web/src/views/Home.jsindex f286394fe..3640fb687 100644--- a/apps/web/src/views/Home.js+++ b/apps/web/src/views/Home.js@@ -33,16 +33,7 @@ function Home() {notes.groups[groupIndex].title === "Pinned" ? (<Box px={2} bg="background" py={1} />) : (- <Box- mx={2}- bg="background"- py={2}- sx={{- borderBottom: "1px solid",- borderBottomColor: "primary",- marginBottom: 2- }}- >+ <Box mx={2} bg="background" py={0}><Text variant="heading" color="primary" fontSize="subtitle">{notes.groups[groupIndex].title}</Text>