π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
refactor(photos):remove-unused-navigation-styling-paths
Aswin Asoke7f32d5d7880
diff --git a/web/apps/photos/src/components/SearchBar.tsx b/web/apps/photos/src/components/SearchBar.tsxindex ec2af8a39b..69f0ace0fd 100644--- a/web/apps/photos/src/components/SearchBar.tsx+++ b/web/apps/photos/src/components/SearchBar.tsx@@ -71,10 +71,7 @@ export interface SearchBarProps {onSelectPerson: (personID: string) => void;}-export const SearchBar: React.FC<- SearchBarProps & { placement?: "header" | "rail" }-> = ({ placement = "header", ...props }) => {- const isRail = placement === "rail";+export const SearchBar: React.FC<SearchBarProps> = (props) => {const isSmallWidth = useIsSmallWidth();const [open, setOpen] = useState(false);const [searchResetKey, setSearchResetKey] = useState(0);@@ -111,13 +108,9 @@ export const SearchBar: React.FC<return () => document.removeEventListener("keydown", handleKeyDown);}, []);- const closeButton = (!isRail || isSmallWidth) && props.isInSearchMode && (+ const closeButton = isSmallWidth && props.isInSearchMode && (<Tooltip title={t("close")}>- <IconButton- aria-label={t("close")}- onClick={clearSearch}- sx={{ mr: isRail ? 0 : "8px" }}- >+ <IconButton aria-label={t("close")} onClick={clearSearch}><CloseIcon /></IconButton></Tooltip>@@ -125,10 +118,7 @@ export const SearchBar: React.FC<return (<>- <Stack- direction={isRail ? "column" : "row"}- sx={{ alignItems: "center", gap: isRail ? "12px" : 0 }}- >+ <Stack sx={{ alignItems: "center", gap: "12px" }}>{closeButton}<Tooltip title={`Search (${shortcut})`}><FocusVisibleButton@@ -138,11 +128,10 @@ export const SearchBar: React.FC<onClick={showSearch}sx={{minWidth: 0,- width: isRail ? 38 : isSmallWidth ? 40 : 48,- height: isRail ? 38 : isSmallWidth ? 40 : 48,+ width: 38,+ height: 38,p: 0,- mr: isRail ? 0 : "8px",- borderRadius: isRail ? "12px" : "16px",+ borderRadius: "12px",}}><HugeiconsIcon icon={Search01Icon} size={20} />diff --git a/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx b/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsxindex 04a0511f3e..534e329264 100644--- a/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx+++ b/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx@@ -27,14 +27,12 @@ export const PhotosNavigationShell: React.FC<PhotosNavigationShellProps & {showRail: boolean;showNormalNavigation: boolean;- hasSelection: boolean;alternateHeader: ReactNode;}>> = ({showRail,showNormalNavigation,- hasSelection,alternateHeader,children,...props@@ -59,15 +57,12 @@ export const PhotosNavigationShell: React.FC<>{showRail && (<NavbarBase- sx={[- {- pl: { xs: "9px", sm: "16px" },- pr: { xs: "12px", sm: "16px" },- flexBasis: { xs: "60px", sm: "76px" },- borderBottom: "none",- },- hasSelection && { borderColor: "accent.main" },- ]}+ sx={{+ pl: { xs: "9px", sm: "16px" },+ pr: { xs: "12px", sm: "16px" },+ flexBasis: { xs: "60px", sm: "76px" },+ borderBottom: "none",+ }}>{showNormalNavigation ? (<NormalHeaderContents@@ -203,7 +198,7 @@ const NormalNavigationRail: React.FC<> = ({ onSidebar, onHome, ...props }) => (<><HomeButton onClick={onHome} />- <SearchBar {...props} placement="rail" />+ <SearchBar {...props} /><Box sx={{ flex: 1 }} /><Tooltip title={t("settings")}><FocusVisibleButtondiff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex 6803d4a740..aedfba0f42 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -1989,7 +1989,6 @@ const Page: React.FC = () => {<PhotosNavigationShellshowRail={!isCleanupViewOpen}showNormalNavigation={showNormalNavigation}- hasSelection={showSelectionBar}isInSearchMode={isInSearchMode}onSidebar={showSidebar}onUpload={openUploader}