Skip to content

armgit / ente

Public Imported from GitHub
0

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

Move to base (since it in used in accounts)

Manav Rathid7fd432f6e5f
diff --git a/web/apps/accounts/src/pages/passkeys/verify.tsx b/web/apps/accounts/src/pages/passkeys/verify.tsx
index b3b98b1df9..a533d0f645 100644
--- a/web/apps/accounts/src/pages/passkeys/verify.tsx
+++ b/web/apps/accounts/src/pages/passkeys/verify.tsx
@@ -1,6 +1,6 @@
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import log from "@/base/log";
import type { TwoFactorAuthorizationResponse } from "@/base/types/credentials";
-import { FocusVisibleButton } from "@/new/photos/components/mui/FocusVisibleButton";
import { ensure } from "@/utils/ensure";
import { nullToUndefined } from "@/utils/transform";
import { VerticallyCentered } from "@ente/shared/components/Container";
diff --git a/web/apps/photos/src/components/DeleteAccountModal.tsx b/web/apps/photos/src/components/DeleteAccountModal.tsx
index 4dae3be7a1..bea1098000 100644
--- a/web/apps/photos/src/components/DeleteAccountModal.tsx
+++ b/web/apps/photos/src/components/DeleteAccountModal.tsx
@@ -1,6 +1,6 @@
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
+import { LoadingButton } from "@/base/components/mui/LoadingButton";
import log from "@/base/log";
-import { FocusVisibleButton } from "@/new/photos/components/mui/FocusVisibleButton";
-import { LoadingButton } from "@/new/photos/components/mui/LoadingButton";
import { initiateEmail } from "@/new/photos/utils/web";
import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";
import { Link, Stack, useMediaQuery } from "@mui/material";
diff --git a/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx b/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
index 0b868f4b9a..a1c62ac86c 100644
--- a/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
+++ b/web/apps/photos/src/components/PhotoViewer/ImageEditorOverlay/index.tsx
@@ -13,7 +13,6 @@ import {
CenteredFlex,
HorizontalFlex,
} from "@ente/shared/components/Container";
-import EnteButton from "@ente/shared/components/EnteButton";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import { downloadUsingAnchor } from "@ente/shared/utils";
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
diff --git a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
index b989983f20..e353ee69f7 100644
--- a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
+++ b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
@@ -1,7 +1,7 @@
+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 { FocusVisibleButton } from "@/new/photos/components/mui/FocusVisibleButton";
import DialogTitleWithCloseButton, {
dialogCloseHandler,
} from "@ente/shared/components/DialogBox/TitleWithCloseButton";
diff --git a/web/packages/new/photos/components/mui/FocusVisibleButton.tsx b/web/packages/base/components/mui/FocusVisibleButton.tsx
similarity index 100%
rename from web/packages/new/photos/components/mui/FocusVisibleButton.tsx
rename to web/packages/base/components/mui/FocusVisibleButton.tsx
diff --git a/web/packages/new/photos/components/mui/LoadingButton.tsx b/web/packages/base/components/mui/LoadingButton.tsx
similarity index 92%
rename from web/packages/new/photos/components/mui/LoadingButton.tsx
rename to web/packages/base/components/mui/LoadingButton.tsx
index af328e3457..319c8538bf 100644
--- a/web/packages/new/photos/components/mui/LoadingButton.tsx
+++ b/web/packages/base/components/mui/LoadingButton.tsx
@@ -1,6 +1,6 @@
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { CircularProgress, type ButtonProps } from "@mui/material";
import React from "react";
-import { FocusVisibleButton } from "./FocusVisibleButton";
/**
* A button that shows a indeterminate progress indicator if the {@link loading}
diff --git a/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx b/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx
index 89ea187304..c862fed2ee 100644
--- a/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx
+++ b/web/packages/new/photos/components/CollectionMappingChoiceDialog.tsx
@@ -1,3 +1,4 @@
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import type { CollectionMapping } from "@/base/types/ipc";
import FolderIcon from "@mui/icons-material/Folder";
import FolderCopyIcon from "@mui/icons-material/FolderCopy";
@@ -15,7 +16,6 @@ import {
DialogCloseIconButton,
type DialogVisibilityProps,
} from "./mui/Dialog";
-import { FocusVisibleButton } from "./mui/FocusVisibleButton";
type CollectionMappingChoiceModalProps = DialogVisibilityProps & {
didSelect: (mapping: CollectionMapping) => void;
diff --git a/web/packages/new/photos/components/DevSettings.tsx b/web/packages/new/photos/components/DevSettings.tsx
index 89e0273fb7..1c17b9cabc 100644
--- a/web/packages/new/photos/components/DevSettings.tsx
+++ b/web/packages/new/photos/components/DevSettings.tsx
@@ -1,3 +1,4 @@
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { useIsMobileWidth } from "@/base/hooks";
import { ensureOk } from "@/base/http";
import { getKVS, removeKV, setKV } from "@/base/kv";
@@ -18,7 +19,6 @@ import { useFormik } from "formik";
import { t } from "i18next";
import React, { useEffect, useState } from "react";
import { z } from "zod";
-import { FocusVisibleButton } from "./mui/FocusVisibleButton";
import { SlideUpTransition } from "./mui/SlideUpTransition";
interface DevSettingsProps {
diff --git a/web/packages/new/photos/components/SingleInputFormV2.tsx b/web/packages/new/photos/components/SingleInputFormV2.tsx
index a13287683e..eeb4b47fe8 100644
--- a/web/packages/new/photos/components/SingleInputFormV2.tsx
+++ b/web/packages/new/photos/components/SingleInputFormV2.tsx
@@ -1,3 +1,5 @@
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
+import { LoadingButton } from "@/base/components/mui/LoadingButton";
import log from "@/base/log";
import { wait } from "@/utils/promise";
import {
@@ -12,8 +14,6 @@ import { useFormik } from "formik";
import { t } from "i18next";
import React from "react";
import type { DialogVisibilityProps } from "./mui/Dialog";
-import { FocusVisibleButton } from "./mui/FocusVisibleButton";
-import { LoadingButton } from "./mui/LoadingButton";
type SingleInputFormProps = Pick<
TextFieldProps,
diff --git a/web/packages/new/photos/components/WhatsNew.tsx b/web/packages/new/photos/components/WhatsNew.tsx
index 1a8555d244..30bcb1f81a 100644
--- a/web/packages/new/photos/components/WhatsNew.tsx
+++ b/web/packages/new/photos/components/WhatsNew.tsx
@@ -1,3 +1,4 @@
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { ensureElectron } from "@/base/electron";
import { useIsMobileWidth } from "@/base/hooks";
import { ut } from "@/base/i18n";
@@ -14,7 +15,6 @@ import {
} from "@mui/material";
import React, { useEffect } from "react";
import { didShowWhatsNew } from "../services/changelog";
-import { FocusVisibleButton } from "./mui/FocusVisibleButton";
import { SlideUpTransition } from "./mui/SlideUpTransition";
interface WhatsNewProps {
diff --git a/web/packages/shared/components/DialogBox/index.tsx b/web/packages/shared/components/DialogBox/index.tsx
index b0f4b67928..5393e1112d 100644
--- a/web/packages/shared/components/DialogBox/index.tsx
+++ b/web/packages/shared/components/DialogBox/index.tsx
@@ -1,4 +1,4 @@
-import { FocusVisibleButton } from "@/new/photos/components/mui/FocusVisibleButton";
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import {
Breakpoint,
DialogActions,
diff --git a/web/packages/shared/components/DialogBoxV2/index.tsx b/web/packages/shared/components/DialogBoxV2/index.tsx
index 698f9c8609..ecec83f7a5 100644
--- a/web/packages/shared/components/DialogBoxV2/index.tsx
+++ b/web/packages/shared/components/DialogBoxV2/index.tsx
@@ -1,5 +1,5 @@
-import { FocusVisibleButton } from "@/new/photos/components/mui/FocusVisibleButton";
-import { LoadingButton } from "@/new/photos/components/mui/LoadingButton";
+import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
+import { LoadingButton } from "@/base/components/mui/LoadingButton";
import { dialogCloseHandler } from "@ente/shared/components/DialogBox/TitleWithCloseButton";
import {
Box,