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: make ui reactive
thecodrrf290569214df
diff --git a/apps/web/src/app.js b/apps/web/src/app.jsindex a61d6cccb..210a167c8 100644--- a/apps/web/src/app.js+++ b/apps/web/src/app.js@@ -21,7 +21,10 @@ const NavMenuItem = props => {width: "full",borderRadius: "none",textAlign: "center",- color: props.selected ? "primary" : "text"+ color: props.selected ? "primary" : "text",+ ":hover": {+ backgroundColor: "shade"+ }}}px={0}>diff --git a/apps/web/src/components/button/index.js b/apps/web/src/components/button/index.jsindex 26d3504e3..8dbe92764 100644--- a/apps/web/src/components/button/index.js+++ b/apps/web/src/components/button/index.js@@ -1,31 +1,38 @@import React from "react";import { Flex, Text } from "rebass";import { ButtonPressedStyle } from "../../utils/theme";+import { useTheme } from "emotion-theming";-const Button = props => (- <Flex- bg="primary"- width={props.width || "full"}- py={3}- px={3}- flexDirection="row"- alignItems="center"- sx={{- borderRadius: "default",- marginBottom: 2,- color: "static",- fontFamily: "body",- fontWeight: "body",- ...ButtonPressedStyle,- ...props.style- }}- onClick={props.onClick}- >- {props.Icon && <props.Icon />}- <Text as="span" mx={1} flex="1 1 auto">- {props.content}- </Text>- </Flex>-);-+const Button = props => {+ const theme = useTheme();+ return (+ <Flex+ bg="primary"+ width={props.width || "full"}+ py={3}+ px={3}+ flexDirection="row"+ alignItems="center"+ sx={{+ borderRadius: "default",+ marginBottom: 2,+ color: "static",+ fontFamily: "body",+ fontWeight: "body",+ ":hover": {+ cursor: "pointer",+ bg: theme.colors.primary + "dd"+ },+ ...ButtonPressedStyle,+ ...props.style+ }}+ onClick={props.onClick}+ >+ {props.Icon && <props.Icon />}+ <Text as="span" mx={1} flex="1 1 auto">+ {props.content}+ </Text>+ </Flex>+ );+};export default Button;diff --git a/apps/web/src/components/list-item/index.js b/apps/web/src/components/list-item/index.jsindex 0904dd264..d42c5d74a 100644--- a/apps/web/src/components/list-item/index.js+++ b/apps/web/src/components/list-item/index.js@@ -6,16 +6,10 @@ import Menu from "../menu";const ListItem = props => (<Flex- onClick={e => {- e.stopPropagation();- if (props.onClick) {- props.onClick();- }- }}alignItems="center"justifyContent="space-between"py={1}- bg={props.pinned ? "#1790F310" : "background"}+ bg={props.pinned ? "shade" : "background"}px={3}sx={{position: "relative",@@ -23,7 +17,11 @@ const ListItem = props => (marginTop: props.pinned ? 4 : 0,borderBottom: "1px solid",borderBottomColor: "navbg",- cursor: "default"+ cursor: "default",+ ":hover": {+ borderBottomColor: "primary",+ cursor: "pointer"+ }//TODO add onpressed reaction}}>@@ -55,8 +53,17 @@ const ListItem = props => (</Flex>)}<Box+ onClick={e => {+ e.stopPropagation();+ if (props.onClick) {+ props.onClick();+ }+ }}sx={{- paddingTop: props.pinned ? 4 : 0+ paddingTop: props.pinned ? 4 : 0,+ ":hover": {+ cursor: "pointer"+ }}}><Flex flexDirection="row" justifyContent="space-between">@@ -67,7 +74,12 @@ const ListItem = props => (<Textdisplay={props.body ? "flex" : "none"}variant="body"- sx={{ marginBottom: 1 }}+ sx={{+ marginBottom: 1,+ ":hover": {+ cursor: "pointer"+ }+ }}>{props.body}</Text>@@ -86,11 +98,13 @@ const ListItem = props => (ref={ref => (props.dropdownRefs[props.index] = ref)}><DropdownTrigger>- <Icon.MoreVertical- size={24}- strokeWidth={1.5}- style={{ marginRight: -5 }}- />+ <Text sx={{ ":active, :hover": { color: "primary" } }}>+ <Icon.MoreVertical+ size={24}+ strokeWidth={1.5}+ style={{ marginRight: -5 }}+ />+ </Text></DropdownTrigger><DropdownContent style={{ zIndex: 2, marginLeft: -110 }}><Menudiff --git a/apps/web/src/utils/theme.js b/apps/web/src/utils/theme.jsindex adb2a2d2a..6ea7768bb 100644--- a/apps/web/src/utils/theme.js+++ b/apps/web/src/utils/theme.js@@ -184,7 +184,7 @@ function makeTheme({return {background,primary,- shade: primary + "12",+ shade: primary + "10",//secondary: "",accent,//custom