Skip to content

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

ui: fix multiple topbar showing in nb & settings view

thecodrr8a82143d886a
diff --git a/apps/web/src/navigation/index.js b/apps/web/src/navigation/index.js
index 56650c912..cc718f141 100644
--- a/apps/web/src/navigation/index.js
+++ b/apps/web/src/navigation/index.js
@@ -84,27 +84,31 @@ const NavigationContainer = props => {
onClick={props.backAction}
height={38}
color="fontPrimary"
- sx={{ marginLeft: -2 /*correction */, marginRight: 2 }}
+ sx={{ marginLeft: -1, marginRight: 2 }}
>
<Icon.ChevronLeft size={38} />
</Box>
)}
- <Box
- onClick={() => ev.emit("openSideMenu")}
- height={36}
- color="fontPrimary"
- sx={{
- marginRight: 3,
- display: ["block", "none", "none"]
- }}
- >
- <Icon.Menu size={36} />
- </Box>
- <Heading fontSize="heading">
- {props.route.title || props.route.params.title}
- </Heading>
+ {!props.route.topBarHidden && (
+ <>
+ <Box
+ onClick={() => ev.emit("openSideMenu")}
+ height={36}
+ color="fontPrimary"
+ sx={{
+ marginRight: 3,
+ display: [props.canGoBack ? "none" : "block", "none", "none"]
+ }}
+ >
+ <Icon.Menu size={36} />
+ </Box>
+ <Heading fontSize="heading">
+ {props.route.title || props.route.params.title}
+ </Heading>
+ </>
+ )}
</Flex>
- <Text variant="title" color="primary">
+ <Text variant="title" color="primary" sx={{ marginBottom: 1 }}>
{props.route.params.subtitle}
</Text>
</Flex>
diff --git a/apps/web/src/navigation/navigators/rootnavigator.js b/apps/web/src/navigation/navigators/rootnavigator.js
index aa699b29e..ac815bfae 100644
--- a/apps/web/src/navigation/navigators/rootnavigator.js
+++ b/apps/web/src/navigation/navigators/rootnavigator.js
@@ -42,7 +42,8 @@ const bottomRoutes = {
...createRoute("settings", SettingsContainer, {
icon: Icon.Settings,
bottom: true,
- title: "Settings"
+ title: "Settings",
+ topBarHidden: true
})
};
@@ -50,7 +51,8 @@ const routes = {
...createNormalRoute("home", Home, Icon.Home),
...createRoute("notebooks", NotebooksContainer, {
icon: Icon.Book,
- title: "Notebooks"
+ title: "Notebooks",
+ topBarHidden: true
}),
...createNormalRoute("favorites", Favorites, Icon.Star),
...createNormalRoute("trash", Trash, Icon.Trash2),