From 61604463350430553ea7211eb80dd6f2f491fe4b Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 3 Dec 2024 14:19:32 +0530 Subject: [PATCH] Inline --- web/apps/photos/src/components/Export.tsx | 3 ++- web/apps/photos/src/components/ExportInProgress.tsx | 3 +-- web/apps/photos/src/services/export/index.ts | 12 +++++++++++- web/apps/photos/src/services/export/migration.ts | 2 +- web/apps/photos/src/types/export/index.ts | 13 ------------- 5 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 web/apps/photos/src/types/export/index.ts diff --git a/web/apps/photos/src/components/Export.tsx b/web/apps/photos/src/components/Export.tsx index 2f6f4b71d9..8e3ea7d7c6 100644 --- a/web/apps/photos/src/components/Export.tsx +++ b/web/apps/photos/src/components/Export.tsx @@ -36,8 +36,9 @@ import exportService, { ExportStage, selectAndPrepareExportDirectory, type ExportOpts, + type ExportProgress, + type ExportSettings, } from "services/export"; -import { ExportProgress, ExportSettings } from "types/export"; import ExportFinished from "./ExportFinished"; import ExportInProgress from "./ExportInProgress"; import ExportInit from "./ExportInit"; diff --git a/web/apps/photos/src/components/ExportInProgress.tsx b/web/apps/photos/src/components/ExportInProgress.tsx index b1bb7341a9..b812f27a55 100644 --- a/web/apps/photos/src/components/ExportInProgress.tsx +++ b/web/apps/photos/src/components/ExportInProgress.tsx @@ -12,8 +12,7 @@ import { } from "@mui/material"; import { t } from "i18next"; import { Trans } from "react-i18next"; -import { ExportStage } from "services/export"; -import { ExportProgress } from "types/export"; +import { ExportStage, type ExportProgress } from "services/export"; export const ComfySpan = styled("span")` padding: 0 0.5rem; diff --git a/web/apps/photos/src/services/export/index.ts b/web/apps/photos/src/services/export/index.ts index d7c810f672..e61f186421 100644 --- a/web/apps/photos/src/services/export/index.ts +++ b/web/apps/photos/src/services/export/index.ts @@ -25,7 +25,6 @@ import { PromiseQueue } from "@/utils/promise"; import { CustomError } from "@ente/shared/error"; import { LS_KEYS, getData, setData } from "@ente/shared/storage/localStorage"; import i18n from "i18next"; -import { ExportProgress, ExportSettings, ExportUIUpdaters } from "types/export"; import { getAllLocalCollections } from "../collectionService"; import { migrateExport, type ExportRecord } from "./migration"; @@ -49,6 +48,17 @@ export enum ExportStage { FINISHED = 7, } +export interface ExportProgress { + success: number; + failed: number; + total: number; +} + +export interface ExportSettings { + folder: string; + continuousExport: boolean; +} + export type CollectionExportNames = Record; export type FileExportNames = Record; diff --git a/web/apps/photos/src/services/export/migration.ts b/web/apps/photos/src/services/export/migration.ts index 6c17ced792..41ee11aa43 100644 --- a/web/apps/photos/src/services/export/migration.ts +++ b/web/apps/photos/src/services/export/migration.ts @@ -17,7 +17,6 @@ import { wait } from "@/utils/promise"; import { LS_KEYS, getData } from "@ente/shared/storage/localStorage"; import type { User } from "@ente/shared/user/types"; import { getLocalCollections } from "services/collectionService"; -import { ExportProgress } from "types/export"; import { getIDBasedSortedFiles, getPersonalFiles } from "utils/file"; import { getCollectionIDFromFileUID, @@ -25,6 +24,7 @@ import { getLivePhotoExportName, getMetadataFolderExportPath, type CollectionExportNames, + type ExportProgress, type ExportStage, type FileExportNames, } from "."; diff --git a/web/apps/photos/src/types/export/index.ts b/web/apps/photos/src/types/export/index.ts deleted file mode 100644 index d2c5887650..0000000000 --- a/web/apps/photos/src/types/export/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { EnteFile } from "@/media/file"; -import type { ExportStage } from "services/export"; - -export interface ExportProgress { - success: number; - failed: number; - total: number; -} - -export interface ExportSettings { - folder: string; - continuousExport: boolean; -}