Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

ui: fixes for dark theme

thecodrr7f4674359fb3
diff --git a/apps/web/public/index.html b/apps/web/public/index.html
index 5c91c0e33..6f9042fd8 100644
--- a/apps/web/public/index.html
+++ b/apps/web/public/index.html
@@ -9,10 +9,10 @@
name="description"
content="Web site created using create-react-app"
/>
- <link
+ <!-- <link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/styles/monokai.css"
- />
+ /> -->
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
@@ -32,7 +32,8 @@
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
- <script src="https://cdn.jsdelivr.net/npm/[email protected]/highlight.pack.min.js"></script>
+ <!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/highlight.pack.min.js"></script>
+ -->
<div id="root"></div>
<!--
This HTML file is a template.
diff --git a/apps/web/src/components/editor/editor.css b/apps/web/src/components/editor/editor.css
index 8c6afed4d..a6e6b15dd 100644
--- a/apps/web/src/components/editor/editor.css
+++ b/apps/web/src/components/editor/editor.css
@@ -36,6 +36,10 @@
}
/*Color Overrides*/
+.ql-toolbar.ql-snow svg {
+ fill: var(--text) !important;
+}
+
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
@@ -47,6 +51,7 @@
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active {
color: var(--primary) !important;
+ fill: var(--primary) !important;
transition: color 300ms linear;
}
@@ -79,6 +84,7 @@
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
stroke: var(--primary) !important;
+ fill: var(--primary) !important;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
@@ -110,6 +116,7 @@
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: var(--primary) !important;
+ stroke: var(--primary) !important;
}
.ql-snow.ql-toolbar :not(.ql-background).ql-picker .ql-picker-item:hover,
@@ -158,4 +165,5 @@ code {
.ql-editor {
font-size: 16px;
+ color: var(--text) !important;
}
diff --git a/apps/web/src/components/editor/react-quill.js b/apps/web/src/components/editor/react-quill.js
index 9278bb774..f0c488600 100644
--- a/apps/web/src/components/editor/react-quill.js
+++ b/apps/web/src/components/editor/react-quill.js
@@ -30,7 +30,7 @@ const quillModules = {
["link", "image", "video"],
[{ direction: "rtl" }, "clean"],
],
- syntax: true,
+ // syntax: true,
markdownShortcuts: {},
magicUrl: true,
};
@@ -98,6 +98,7 @@ export default class ReactQuill extends Component {
}
componentWillUnmount() {
+ if (!this.quill) return;
this.quill.off("text-change", this.textChangeHandler);
}
diff --git a/apps/web/src/components/editor/titlebox.js b/apps/web/src/components/editor/titlebox.js
index 5ca3a88d0..de2073e79 100644
--- a/apps/web/src/components/editor/titlebox.js
+++ b/apps/web/src/components/editor/titlebox.js
@@ -24,6 +24,7 @@ class TitleBox extends React.Component {
fontFamily="heading"
fontWeight="heading"
fontSize="heading"
+ color="text"
display={["none", "flex", "flex"]}
px={2}
sx={{
diff --git a/apps/web/src/components/properties/index.js b/apps/web/src/components/properties/index.js
index 594761281..8b6bcba92 100644
--- a/apps/web/src/components/properties/index.js
+++ b/apps/web/src/components/properties/index.js
@@ -76,7 +76,6 @@ function Properties() {
>
<Text
variant="title"
- color="primary"
my={2}
alignItems="center"
justifyContent="space-between"
@@ -104,7 +103,7 @@ function Properties() {
/>
))}
</Flex>
- <Button>Add to notebook</Button>
+ <Button color="static">Add to notebook</Button>
<Flex flexDirection="column" sx={{ my: 2 }}>
{objectMap(COLORS, (label, code) => (
<Flex
@@ -115,7 +114,9 @@ function Properties() {
>
<Flex key={label} my={1}>
<Icon.Circle size={24} color={code} />
- <Text ml={2}>{label}</Text>
+ <Text ml={2} color="text">
+ {label}
+ </Text>
</Flex>
{colors.includes(label) && (
<Icon.Checkmark color="primary" size={20} />
diff --git a/apps/web/src/theme/variants/input.js b/apps/web/src/theme/variants/input.js
index b785c8881..6189406c7 100644
--- a/apps/web/src/theme/variants/input.js
+++ b/apps/web/src/theme/variants/input.js
@@ -2,7 +2,7 @@ class InputFactory {
constructor() {
return {
input: new Default(),
- error: new Error()
+ error: new Error(),
};
}
}
@@ -17,13 +17,14 @@ class Default {
fontFamily: "body",
fontWeight: "body",
fontSize: "input",
+ color: "text",
":focus": {
outline: "none",
- borderColor: "primary"
+ borderColor: "primary",
},
":hover": {
- borderColor: "dimPrimary"
- }
+ borderColor: "dimPrimary",
+ },
};
}
}
@@ -35,11 +36,11 @@ class Error {
borderColor: "red",
":focus": {
outline: "none",
- borderColor: "red"
+ borderColor: "red",
},
":hover": {
- borderColor: "darkred"
- }
+ borderColor: "darkred",
+ },
};
}
}