Skip to content

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

ui: hide back button from editor

thecodrr76df635dde1f
diff --git a/apps/web/src/components/editor/editormenu.js b/apps/web/src/components/editor/editormenu.js
index 5aab1a7b8..1afe31757 100644
--- a/apps/web/src/components/editor/editormenu.js
+++ b/apps/web/src/components/editor/editormenu.js
@@ -3,18 +3,18 @@ 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 saveSession = useStore((store) => store.saveSession);
+ const newSession = useStore((store) => store.newSession);
const { quill } = props;
return (
<Flex
sx={{
- height: [0,"100%", "100%"],
+ height: [0, "auto", "auto"],
visibility: ["collapse", "visible", "visible"],
borderBottom: "1px solid",
borderColor: "border",
- fontSize: 13
+ fontSize: 13,
}}
>
<Button variant="menu" onClick={() => newSession()}>
diff --git a/apps/web/src/components/editor/header.js b/apps/web/src/components/editor/header.js
index 8255f213d..b592273e4 100644
--- a/apps/web/src/components/editor/header.js
+++ b/apps/web/src/components/editor/header.js
@@ -32,20 +32,29 @@ function Header() {
return (
<Flex>
<Flex flex="1 1 auto" flexDirection="column">
- <Flex justifyContent="center" alignItems="center"
+ <Flex
+ justifyContent="center"
+ alignItems="center"
sx={{
- paddingTop: [1,2,2],
- }}>
- <Icon.ChevronLeft size={30} onClick={() => EditorNavigator.navigate(null)}/>
- <TitleBox
- shouldFocus={sessionState === SESSION_STATES.new}
- title={title}
- setTitle={(title) =>
- setSession((state) => {
- state.session.title = title;
- })
- }
- />
+ paddingTop: [1, 2, 2],
+ }}
+ >
+ <Icon.ChevronLeft
+ sx={{
+ display: ["block", "none", "none"],
+ }}
+ size={30}
+ onClick={() => EditorNavigator.navigate(null)}
+ />
+ <TitleBox
+ shouldFocus={sessionState === SESSION_STATES.new}
+ title={title}
+ setTitle={(title) =>
+ setSession((state) => {
+ state.session.title = title;
+ })
+ }
+ />
</Flex>
<Text
fontSize={"subBody"}
@@ -54,8 +63,9 @@ function Header() {
sx={{
display: "flex",
alignItems: "center",
- marginTop: dateEdited || text.length || id.length ? 0 : [0,2,2],
- marginBottom: dateEdited || text.length || id.length ? [1,2,2] : 0,
+ marginTop: dateEdited || text.length || id.length ? 0 : [0, 2, 2],
+ marginBottom:
+ dateEdited || text.length || id.length ? [1, 2, 2] : 0,
}}
>
{dateEdited > 0 ? (
@@ -75,7 +85,7 @@ function Header() {
</Flex>
<Flex
sx={{
- visibility: ["collapse", "visible", "visible"]
+ visibility: ["collapse", "visible", "visible"],
}}
alignItems="center"
pr={3}