Skip to content

armgit / ente

Public Imported from GitHub
0

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

Swap

Manav Rathifd29a262101e
diff --git a/web/apps/photos/src/components/Collections/CollectionHeader.tsx b/web/apps/photos/src/components/Collections/CollectionHeader.tsx
index 505a557c84..706de41ac7 100644
--- a/web/apps/photos/src/components/Collections/CollectionHeader.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionHeader.tsx
@@ -1,5 +1,6 @@
import { assertionFailed } from "@/base/assert";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
+import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { useModalVisibility } from "@/base/components/utils/modal";
import log from "@/base/log";
import type { Collection } from "@/media/collection";
@@ -8,7 +9,6 @@ import {
GalleryItemsHeaderAdapter,
GalleryItemsSummary,
} from "@/new/photos/components/gallery/ListHeader";
-import { SpaceBetweenFlex } from "@/new/photos/components/mui";
import {
ALL_SECTION,
HIDDEN_ITEMS_SECTION,
diff --git a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
index 3d267cab03..2aec5562f0 100644
--- a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
+++ b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
@@ -1,6 +1,6 @@
+import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { useIsTouchscreen } from "@/base/hooks";
-import { SpaceBetweenFlex } from "@/new/photos/components/mui";
import { DialogCloseIconButton } from "@/new/photos/components/mui/Dialog";
import DialogTitleWithCloseButton, {
dialogCloseHandler,
diff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsx
index 24ca230b2f..66b851dcb8 100644
--- a/web/apps/photos/src/pages/shared-albums.tsx
+++ b/web/apps/photos/src/pages/shared-albums.tsx
@@ -1,5 +1,6 @@
import { EnteLogoSVG } from "@/base/components/EnteLogo";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
+import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { NavbarBase, SelectionBar } from "@/base/components/Navbar";
import { sharedCryptoWorker } from "@/base/crypto";
import { useIsSmallWidth, useIsTouchscreen } from "@/base/hooks";
@@ -10,7 +11,6 @@ import {
GalleryItemsHeaderAdapter,
GalleryItemsSummary,
} from "@/new/photos/components/gallery/ListHeader";
-import { SpaceBetweenFlex } from "@/new/photos/components/mui";
import {
ALL_SECTION,
isHiddenCollection,
diff --git a/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx b/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx
index eb52dd7aab..5859c2b8f5 100644
--- a/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx
+++ b/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx
@@ -1,3 +1,4 @@
+import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import type { ModalVisibilityProps } from "@/base/components/utils/modal";
import type { CollectionMapping } from "@/base/types/ipc";
@@ -12,7 +13,6 @@ import {
} from "@mui/material";
import { t } from "i18next";
import React from "react";
-import { SpaceBetweenFlex } from "./mui";
import { DialogCloseIconButton } from "./mui/Dialog";
type CollectionMappingChoiceModalProps = ModalVisibilityProps & {
diff --git a/web/packages/new/photos/components/CollectionSelector.tsx b/web/packages/new/photos/components/CollectionSelector.tsx
index cb052c7186..3619b3ab0a 100644
--- a/web/packages/new/photos/components/CollectionSelector.tsx
+++ b/web/packages/new/photos/components/CollectionSelector.tsx
@@ -1,3 +1,4 @@
+import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import type { ModalVisibilityProps } from "@/base/components/utils/modal";
import type { Collection } from "@/media/collection";
import {
@@ -24,7 +25,7 @@ import {
} from "@mui/material";
import { t } from "i18next";
import React, { useEffect, useState } from "react";
-import { SpaceBetweenFlex, type ButtonishProps } from "./mui";
+import { type ButtonishProps } from "./mui";
import { DialogCloseIconButton } from "./mui/Dialog";
export type CollectionSelectorAction =
diff --git a/web/packages/new/photos/components/gallery/PeopleHeader.tsx b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
index 79a17945c3..2629c9f868 100644
--- a/web/packages/new/photos/components/gallery/PeopleHeader.tsx
+++ b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
@@ -2,7 +2,7 @@ import {
ActivityIndicator,
ErrorIndicator,
} from "@/base/components/mui/ActivityIndicator";
-import { CenteredBox } from "@/base/components/mui/Container";
+import { CenteredBox, SpaceBetweenFlex } from "@/base/components/mui/Container";
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { LoadingButton } from "@/base/components/mui/LoadingButton";
import {
@@ -61,7 +61,7 @@ import { t } from "i18next";
import React, { useEffect, useReducer, useState } from "react";
import type { FaceCluster } from "../../services/ml/cluster";
import { useAppContext } from "../../types/context";
-import { SpaceBetweenFlex, type ButtonishProps } from "../mui";
+import { type ButtonishProps } from "../mui";
import { DialogCloseIconButton } from "../mui/Dialog";
import { SuggestionFaceList } from "../PeopleList";
import { SingleInputDialog } from "../SingleInputForm";
diff --git a/web/packages/new/photos/components/mui/index.tsx b/web/packages/new/photos/components/mui/index.tsx
index a3cd1d867c..f39034bd11 100644
--- a/web/packages/new/photos/components/mui/index.tsx
+++ b/web/packages/new/photos/components/mui/index.tsx
@@ -1,4 +1,4 @@
-import { Box, IconButton, styled } from "@mui/material";
+import { IconButton, styled } from "@mui/material";
/** Convenience typed props for a component that acts like a push button. */
export interface ButtonishProps {
@@ -11,19 +11,3 @@ export interface ButtonishProps {
export const FilledIconButton = styled(IconButton)(({ theme }) => ({
backgroundColor: theme.colors.fill.faint,
}));
-
-/**
- * A flexbox with justify content set to space-between and center alignment.
- *
- * There is also another SpaceBetweenFlex in the old shared package, but that
- * one also sets width: 100%. As such, that one should be considered deprecated
- * and its uses moved to this one when possible (so that we can then see where
- * the width: 100% is essential).
- *
- * TODO: Moved to base.
- */
-export const SpaceBetweenFlex = styled(Box)`
- display: flex;
- justify-content: space-between;
- align-items: center;
-`;