Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

style(photos):center-navbar-logo-on-all-screen-sizes

Aswin Asoke751efb6d64c
diff --git a/web/apps/photos/src/components/SearchBar.tsx b/web/apps/photos/src/components/SearchBar.tsx
index cf76d9983e..75ebccf797 100644
--- a/web/apps/photos/src/components/SearchBar.tsx
+++ b/web/apps/photos/src/components/SearchBar.tsx
@@ -22,7 +22,6 @@ import {
useTheme,
type Theme,
} from "@mui/material";
-import { EnteLogo, EnteLogoBox } from "ente-base/components/EnteLogo";
import type { ButtonishProps } from "ente-base/components/mui";
import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";
import { useIsSmallWidth } from "ente-base/components/utils/hooks";
@@ -95,13 +94,6 @@ export const SearchBar: React.FC<SearchBarProps> = (props) => {
return (
<>
- <Box sx={{ flex: 1 }}>
- {isSmallWidth && (
- <EnteLogoBox sx={{ mx: "auto", pl: "24px" }}>
- <EnteLogo height={15} />
- </EnteLogoBox>
- )}
- </Box>
<Tooltip title={`Search (${shortcut})`}>
<FocusVisibleButton
color="secondary"
diff --git a/web/apps/photos/src/components/gallery/NormalNavbarContents.tsx b/web/apps/photos/src/components/gallery/NormalNavbarContents.tsx
index 7c76430bc2..a740d4b139 100644
--- a/web/apps/photos/src/components/gallery/NormalNavbarContents.tsx
+++ b/web/apps/photos/src/components/gallery/NormalNavbarContents.tsx
@@ -3,7 +3,8 @@ import { uploadManager } from "@/services/upload-manager";
import { Upload01Icon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/react";
import MenuIcon from "@mui/icons-material/Menu";
-import { IconButton } from "@mui/material";
+import { Box, IconButton } from "@mui/material";
+import { EnteLogo, EnteLogoBox } from "ente-base/components/EnteLogo";
import type { ButtonishProps } from "ente-base/components/mui";
import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";
import { useIsSmallWidth } from "ente-base/components/utils/hooks";
@@ -19,11 +20,30 @@ export const NormalNavbarContents: React.FC<NormalNavbarContentsProps> = ({
onUpload,
...props
}) => (
- <>
+ <Box
+ sx={{
+ position: "relative",
+ display: "flex",
+ alignItems: "center",
+ flex: 1,
+ }}
+ >
<SidebarButton onClick={onSidebar} />
+ <EnteLogoBox
+ sx={{
+ position: "absolute",
+ left: "50%",
+ transform: "translateX(-50%)",
+ pointerEvents: "none",
+ "& svg": { height: { xs: "15px", sm: "20px" } },
+ }}
+ >
+ <EnteLogo height={15} />
+ </EnteLogoBox>
+ <Box sx={{ flex: 1 }} />
<SearchBar {...props} />
<UploadButton onClick={onUpload} />
- </>
+ </Box>
);
const SidebarButton: React.FC<ButtonishProps> = ({ onClick }) => (